[jboss-user] [Beginners Corner] - Calling an EJB method from a servlet via its Local interface
do-not-reply at jboss.com
Tue Jul 25 09:05:37 EDT 2006
Is it possible to call an EJB3 Stateless Session Bean method from a servlet via its Local interface ? I'm using the Tomcat embedded in JBoss 4.0.4, and it's not clear to me whether Tomcat and JBoss are in the same JVM (thus making the call theorically possible).
I have no problem calling my EJB method via its Remote interface.
I get the bean ref from JNDI without problem, but that's the actual call that fails with an IllegalArgumentException: Wrong target. class theBeanClass . I'm calling the method via the reflexion API: method.invoke(ejb, params)
Any help would be greatly appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960669#3960669
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960669
More information about the jboss-user