Remote EJB call between IBM Websphere standalone JVM's on same host

604 Views Asked by At

I have 2 standalone IBM WebSphere server running on same host. Both the servers have same EJB deployed but our code is distributed among 2 EAR's as ClientAgent and services respectively. When calling any service method from clientAgent i.e an EJB call from serverA to serverB it fails with classnotfound error. I opened the NamingService trace to diagnose the problem and found that ServerB is using same JNDI namespace as ServerA.

How can I make ServerB to use its own JNDI name space ?

Note :- With ServerA and ServerB on different hosts, everything works fine.

Thanks Shivam

1

There are 1 best solutions below

0
On

Your question does not seem to be clear. You have stated "The Server B is using the same JNDI namespace as server A"

What do you mean by that?

Each server has its own JNDI space where the EJBs and other resources or registered.

Notice that you typically connect to the bootstrap port of a server to connect to the JNDI namespace. The default is 2809, chances are Server A's bootstrap port is 2809.

Server B would have a different one say 2810 and your client code should be connected to this port.

I am guessing that your code does a localhost:2809 which connects it to the Server A.

If you elaborate your problem clearly people can possibly help you out.

HTH

Manglu