[jboss-user] [EJB/JBoss] - Using an EJB from an remote app client does not work
Hauptlorenz
do-not-reply at jboss.com
Thu Aug 2 05:32:14 EDT 2007
Hi,
I've created an EJB with both an local and remote-interface and deployed it
(stateless session bean).
Now I want to use it from an remote application client (swing app).
I've using this jndi.properties-file (which is used, I see in the exceptions):
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming.client
| java.naming.provider.url=jnp://132.180.60.3:1099
| j2ee.clientName=sImplex-app-client
I'm using the following java code to use the EJB. The problem:
if the client is running on the same machine as the jboss server it is running. If it is running on an different client I get only exceptions.
What could be the problem?
Thank you very much,
Frank
Properties properties = new Properties();
|
| Context context;
| try {
| context = new InitialContext();
| userRemote myUser = (userRemote) context.lookup(userBean.RemoteJNDIName);
| String a = myUser.getUser();
| jTextPane1.setText(jTextPane1.getText()+"\n"+a);
| } catch (NamingException e) {
| e.printStackTrace();
| /* I rethrow it as runtimeexception as there is really no need to continue if an exception happens and I
| * do not want to catch it everywhere.
| */
| throw new RuntimeException(e);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069999#4069999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069999
More information about the jboss-user
mailing list