I have a simple stateless bean that I want to test. The code is:
There is no problem with deployment, the message in JBoss console is: (SessionListener.ejb3 contains SessionListener.class and SessionListenerBean.class)
INFO [Ejb3Deployment] EJB3 deployment time took: 156 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=Sessi onListener.ejb3,name=SessionListenerBean,service=EJB3 with dependencies: INFO [EJBContainer] STARTED EJB: jee.jboss.session.SessionListenerBean ejbName: SessionListenerBean INFO [EJB3Deployer] Deployed: file:/C:/Program Files/jboss-4.0.5.G A/server/default/deploy/SessionListener.ejb3
I googled this, searched on forums and tried all the remedies given (including adding all the jar files in %JBOSS_HOME/client to classpath). No luck. Appreciate any pointers. Sorry for the lengthy post
I ve read a few tutorials and all they do is just give you the plain syntax without explaining what's going on
You mean, you want to know about which jndi name to use while looking up your bean? EJBs are nothing but resources that get bound to the JNDI tree. These can then be looked up by the clients by doing operations on the JNDI tree. To put it in simple terms, its nothing more than specifying a name for your bean so that if you want to access it, you just refer it using that name.
Technically, by default (in EJB3), the jndi name that is given to the bean is of the following syntax: For remote - <ApplicationName>/<BeanClassName>/<remote>
For local- <ApplicationName>/<BeanClassName>/<local>
I see that in your case where you deployed your archive as .ejb3, it was not required to specify the application name.
Also, you can always override these default jndi names by specifying your own jndi names for the beans. [ February 07, 2007: Message edited by: Jaikiran Pai ]
Joined: Mar 18, 2009
I am sorry, but I have to ask this one more thing: using JEE EJB3 annotations, I have this ManagedBean, made in the faces-config.xml editor in ganymede:
The local interface:
This session-bean comes inside an EJB 3.0 project packed in a jar inside this war and both inside an EAR and deployed on JBoss 5.0, and then it goes: