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.
Since tapestry is not an EJB container (and likewise EJB is not a tapestry container) there is no way for tapestry to know what the annotation @EJB means and it is ignored. 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. Hope that helps Bastian Voigt wrote: > Hi *, > > in Suns EJB tutorials all EJB calls are made via annotations like so: > > @EJB private MyBeanInterface myBean; > . > . > void someMethod() > { > myBean.callEJBMethod(); > } > . > . > > > In Tapestry (4.0.2) Page and Component classes this annotation does > not seem to work (NullPointerException) although it gives no compiler > errors or anything like that. Can someone tell me why it does not work > this way? How can I efficiently access EJB3s via their local interface > from a tapestry application? > > The problem is that glassfish supports only remote interfaces when > using JNDI lookup. But I would rather like to use local interfaces as > this should be faster. > > Thank you very much for your help... > > Regards, > Bastian > > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Walsh http://www.ewage.co.za