As an ugly work-around, you could define "dumb" servlets who would
store their EJB references (the value stored into the field) into a
ServletContext using a well-known name.

The issue here is that the servlet spec wants to run the world from a
very limited view of what an application is (for them, application ==
servlet).  Tapestry pages and components, even in T5, are not servlets
and not subject to special treatment by the servlet class loader.

You might want to look into your server (JBoss, most likely) and see
if there's a way to go beyond the normal specification and let the
container do its magic on additional classes, such as Tapestry pages
and components.

On 3/8/07, Bastian Voigt <[EMAIL PROTECTED]> wrote:
Justin Walsh schrieb:
> Well tapestry and EJB3 are two very different animals.
>
> The @EJB annotation works /_within/_ an EJB component (EJB
> stateless/stateful session bean) because the EJB3 container is in
> control of your EJB components (you probably annotated it with
> @Stateless of @Stateful) and thus injects the referenced EJB3 element
> into your component (behind the scenes) before you get hold of it.
>
Well, that's not all there is to @EJB annotations. They also work in
web applications, e.g. when used in servlet classes.

> If you really wanted to, I suspect you may be able to write a custom
> enhancement worker (I think thats what they call them?) which inspects
> tapestry components (pages etc) for ejb3 annotations, injecting the
> appropriate references - but that would be up to you.
>
Maybe this is what I need. Unfortunately I am not very familiar with annotation workers 
and especially how to inject the "appropriate reference". Where can I start?




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to