[jboss-user] [EJB/JBoss] - Re: Embedded EJB3 and JNDI lookups

MmarcoM do-not-reply at jboss.com
Fri Sep 29 08:23:53 EDT 2006


hello,
 i am testig ejb3 with microcontainer.. (rc9)

you can lookup JNDI with   YourBeanName/local if it is local or  ../remote if it is remote

but you might get a ClassCastException, because rather than having back your EJBLocal home you could have back a proxy..
that depends on the  CallByValue parameter of your naming service...
that might explain why you can successfully lookup DataSource but you cant EJBs..
try to put a try/catch around your JNDI lookup for the EJB.. i m sure you will see a ClassCastException while looking up bean...
i got that error with JBossContainer and was able to get over it by setting  true   in ejb3-deployer.xml
i m not sure what you'd need to do with microcontainer, you might want to post your question in microcontainer forum

i had similar problems, resorte to test EEJB using EntityManager directly...

hth
 marco

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975134#3975134

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975134



More information about the jboss-user mailing list