[jboss-user] [EJB/JBoss] - Almost identical session beans, one works one fails
Melladh
do-not-reply at jboss.com
Mon Dec 4 06:53:23 EST 2006
The failing one is looked up like this, and I get a "not bound" exception when activating the servlet it's called from.
Context context = new InitialContext();
| Object listRef = context.lookup("java:comp/env/ejb/ListApplicants");
|
The working one is looked up the same way, except that it's called Applicant instead of ListApplicants. All the configurations look the same.
Home interface
package ejb;
|
| /**
| * Home interface for ListApplicants.
| */
| public interface ListApplicantsHome
| extends javax.ejb.EJBHome
| {
| public static final String COMP_NAME="java:comp/env/ejb/ListApplicants";
| public static final String JNDI_NAME="ejb/ListApplicants";
|
| public ejb.ListApplicants create(java.lang.String param)
| throws javax.ejb.CreateException,java.rmi.RemoteException;
|
| }
|
jboss.xml
<session>
| <ejb-name>ListApplicants</ejb-name>
| <jndi-name>ejb/ListApplicants</jndi-name>
| <local-jndi-name>ListApplicantsLocal</local-jndi-name>
| </session>
ejb-jar.xml
<session >
| <description><![CDATA[Description for ListApplicants]]></description>
| <display-name>Name for ListApplicants</display-name>
|
| <ejb-name>ListApplicants</ejb-name>
|
| <home>ejb.ListApplicantsHome</home>
| <remote>ejb.ListApplicants</remote>
| <ejb-class>ejb.ListApplicantsBean</ejb-class>
|
| <session-type>Stateful</session-type>
| <transaction-type>Container</transaction-type>
|
| </session>
This looks exactly the same for my ApplicantBean, with the names changed accordingly, and that one works! This one doesn't. Anyone have a clue about what's wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990953#3990953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990953
More information about the jboss-user
mailing list