This content has been marked as final.
Show 6 replies
-
1. Re: A question about dependency injection @EJB
jaikiran May 9, 2008 6:21 AM (in response to thomas2008ch)In JBoss-4.2.x (or prior versions) the injection will not work for standalone clients or servlets. It works only in the EJB layer. The injection in application clients and servlets is supported in JBoss-5 (which is in Beta).
-
2. Re: A question about dependency injection @EJB
thomas2008ch May 9, 2008 9:22 AM (in response to thomas2008ch)"jaikiran" wrote:
In JBoss-4.2.x (or prior versions) the injection will not work for standalone clients or servlets. It works only in the EJB layer. The injection in application clients and servlets is supported in JBoss-5 (which is in Beta).
1.
I've downloaded the JBoss 5 Beta4. But it's the same, i.e. I got the NULL-Pointer Exception.
2.
With JBoss 4.2.1 I can use the"@RemoteBinding(jndiBinding = "MyJNDIName")" which you told me yesterday.
But this doesn't work in JBoss 5 Beta4. I can't find the JNDI Name in the JNDI View List. If I run my client, I got Exception like:javax.naming.NameNotFoundException: MyJNDIName not bound
-
3. Re: A question about dependency injection @EJB
jaikiran May 9, 2008 10:24 AM (in response to thomas2008ch)"thomas2008ch" wrote:
1.
I've downloaded the JBoss 5 Beta4. But it's the same, i.e. I got the NULL-Pointer Exception.
I haven't tested it myself. I have seen users mentioning that the injection works in servlets with JBoss-5 Beta 4. But i don't know whether it works in application clients yet."thomas2008ch" wrote:
2.
With JBoss 4.2.1 I can use the"@RemoteBinding(jndiBinding = "MyJNDIName")" which you told me yesterday.
But this doesn't work in JBoss 5 Beta4. I can't find the JNDI Name in the JNDI View List.
In JBoss-4.2.x, the @RemoteBinding was part of org.jboss.annotation.ejb package.import org.jboss.annotation.ejb.RemoteBinding;
In JBoss-5, the @Remote binding is now part of org.jboss.ejb3.annotation package.import org.jboss.ejb3.annotation.RemoteBinding;
Did you ensure that you changed your bean to use this new package? -
4. Re: A question about dependency injection @EJB
thomas2008ch May 9, 2008 10:58 AM (in response to thomas2008ch)In JBoss-4.2.x, the @RemoteBinding was part of org.jboss.annotation.ejb package.
import org.jboss.annotation.ejb.RemoteBinding;
In JBoss-5, the @Remote binding is now part of org.jboss.ejb3.annotation package.import org.jboss.ejb3.annotation.RemoteBinding;
Did you ensure that you changed your bean to use this new package? -
5. Re: A question about dependency injection @EJB
thomas2008ch May 9, 2008 11:00 AM (in response to thomas2008ch)But this doesn't work in JBoss 5 Beta4. I can't find the JNDI Name in the JNDI View List.
In JBoss-4.2.x, the @RemoteBinding was part of org.jboss.annotation.ejb package.import org.jboss.annotation.ejb.RemoteBinding;
In JBoss-5, the @Remote binding is now part of org.jboss.ejb3.annotation package.import org.jboss.ejb3.annotation.RemoteBinding;
-
6. Re: A question about dependency injection @EJB
thomas2008ch May 9, 2008 11:01 AM (in response to thomas2008ch)To jaikiran:
You are right.
Many thanks!