Hello, I'm having trouble making <ejb-ref> work correctly on jboss 244 and was hoping someone could help.
In ejb-jar.xml:
<ejb-ref>
<ejb-ref-name>ejb/CustomerHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
corej2ee.project.ejb.entity.CustomerHome corej2ee.project.ejb.entity.Customer
</ejb-ref>
In jboss.xml:
<ejb-ref>
<ejb-ref-name>ejb/CustomerHome</ejb-ref-name>
<jndi-name>CustomerBean</jndi-name>
</ejb-ref>
In the bean using Customer:
InitialContext ic=new InitialContext();
//Object objref=ic.lookup("ejb/CustomerHome");
Object objref=ic.lookup("CustomerBean");
The commented out line doesn't work (name not found exception ejb not bound). The second lookup does. In the JBoss startup window I do see the line:
10 Apr 19:06:24 DEBUG AutoDeployer org.jboss.ejb.StatelessSessionContainer - Bin
ding ejb/CustomerHome to external JNDI source: CustomerBean
I'm sure I'm probably doing something silly but I just can't see what it is. Can anyone help?
Thanks.