There is something peculiar I found about JBoss's requirements for the EJB references. Please note that: no, I'm not packaging the ejb and client into a ear as I should do... I assume what I'm experiencing is in part 'cause of this... but this is for the sake of argument, and possibly tracking down a ?"bug"?
I've got two EJBs: one remote, and one local one. Each of them deploys just fine and is "advertised" in their respective jboss.xml under <jndi-name> and <local-jndi-name>.
I've got a test client for each of these beans (using Cactus) and here is where the funny stuff starts:
- for the remote bean and test client the web.xml ejb-reference works just fine without any sort of ejb-link gimmickry
- but for the local client the equivalent web.xml (substitute local for remote) makes JBoss spit out:
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: 'ejb/petstore/Order', no ejb-link in web.xml and no local-jndi-name in jboss-web.xml)
In order to get it working I have to specify <ejb-link>ejb.jar#Foo</ejb-link>... hrmm, /me scratching my head, what's up with the discrimination against local EJBs?
Mike