-
1. Re: Unable to inject jndi dependency: EJBContext not bound
admin.admin.email.tld Jul 8, 2008 1:52 AM (in response to amehn)when you deploy the app, view the console/log to see if the SFSB in question is being deployed properly and its JNDI reference is available. Then check the JNDI address to see if matches the above or not (you can also use jboss jmx-console I think to check).
-
2. Re: Unable to inject jndi dependency: EJBContext not bound
amehn Jul 8, 2008 1:12 PM (in response to amehn)
Arbi Sookazian wrote on Jul 08, 2008 01:52:
when you deploy the app, view the console/log to see if the SFSB in question is being deployed properly and its JNDI reference is available. Then check the JNDI address to see if matches the above or not (you can also use jboss jmx-console I think to check).Thanks for your answer.
The deployment works without errors, the deployed application works too (well, not perfect, but runs).
Thats the corresponding output during deployment:
13:02:34,787 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=JBoss_rwb-ear.ear,jar=JBoss_rwb-ejb.jar,name=MusterproduktConversationBean,service=EJB3 with dependencies: 13:02:34,787 INFO [JmxKernelAbstraction] jboss.j2ee:ear=JBoss_rwb-ear.ear,jar=JBoss_rwb-ejb.jar,name=RWBMusterproduktServiceFacade,service=EJB3 13:02:34,803 INFO [EJBContainer] STARTED EJB: org.mydomain.MusterproduktConversationBean ejbName: MusterproduktConversationBean 13:02:39,568 INFO [Component] Component: c_musterprodukt, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.mydomain.MusterproduktConversationBean, JNDI: JBoss_rwb-ear/MusterproduktConversationBean/local
Thats the corresponding output of jndiview of the jmx-console:
+- JBoss_rwb-ear (class: org.jnp.interfaces.NamingContext) | +- MusterproduktConversationBean (class: org.jnp.interfaces.NamingContext) | | +- localStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory) | | +- local (class: java.lang.Object)
Can anyone help?
-
3. Re: Unable to inject jndi dependency: EJBContext not bound
amehn Jul 10, 2008 11:06 AM (in response to amehn)I found the cause of the Exception. It is the following code in my SessionBean:
@Resource SessionContext ctx;
I commented this and all occurences of ctx out, and the test runs now.
But I need the SessionContext for Rollbacktransactions by calling:ctx.getRollbackOnly (); // or ctx.setRollbackOnly ();
How can I inject SessionContext without @Resource, or how can I use rollBack Transactions without SessionCentext? How can I solve this problem?
Thanks in advance!
Andreas
-
4. Re: Unable to inject jndi dependency: EJBContext not bound
admin.admin.email.tld Jul 12, 2008 1:28 AM (in response to amehn)Have you tried this?
@In private Context sessionContext;
-
5. Re: Unable to inject jndi dependency: EJBContext not bound
cyxs Jul 14, 2008 4:26 PM (in response to amehn)This would be the wrong Context.
The context Andreas ist looking for is
javax.ejb.SessionContextand not
org.jboss.seam.contexts.Context