you need jndi properties on remote client
Hope that helps.
Did you mean that you want to perform the lookup from a session bean on one JBoss instance to another JBoss instance or did you mean that the client is running outside of JBoss?
thanks for the fast reply. I have to instances of jboss running on different servers. I want to access a session bean (user management) on the remote server from my own server. I'd like to configure the hostname/port of the remote server during deploytime.
If you have a look at the administrators guide available from the documentation link above there is an MBean described called 'ExternalContext' in chapter 184.108.40.206.
I have never tried using the MBean so can not say how well it would work but basically the bean allows you to bind a remote JNDI context in your local context, using this combined with an ejb-ref may meet your needs.
I think there is a solution using the jboss.xml file. I have defined the UserManagement as an external ref in ejb-jar.xml:
<ejb-ref > <ejb-ref-name>ejb/UserManagement</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>session.interfaces.UserManagementHome</home> <remote>session.interfaces.UserManagement</remote> <ejb-link>UserManagement</ejb-link> </ejb-ref>
I also defined in the jboss.xml:
<ejb-ref> <ejb-ref-name>ejb/UserManagement</ejb-ref-name> <jndi-name>jnp://remote:1099/ejb/UserManagement</jndi-name> </ejb-ref>
<ejb-ref> <ejb-ref-name>ejb/UserManagement</ejb-ref-name> <jndi-name>jnp://remote:1099/UserManagement</jndi-name> </ejb-ref>
When I try to deploy I get always the error:
org.jboss.deployment.DeploymentException: Failed to resolve ejb-link: UserManagement make by ejb-name: ejb/UserManagement
No matter if the remote server is running or not. If I deploy it in the same ear file (on the same server) it runs. It seems the jboss server ignores the jndi-name tag. Do I have to configure something else?