Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Issue with WAR accessing EJBs on another WAS in same machine

2 views
Skip to first unread message

edu...@gmail.com

unread,
Mar 7, 2007, 6:49:47 AM3/7/07
to
Hi,

we have two application servers, WAS1 and WAS2, installed in the same machine M1. We also have two enterprise applications WEB.ear and EJB.ear. Web.ear is the front-end and EJB.ear contains shared services. We installed WEB.ear in WAS1 and EJB.ear in WAS2.

To tell WEB.ear where to look for EJB.ear, in WAS1 there is a JNDI String value that contains a provider URL. It looks like iiop://M1:2810, being 2810 the bootstrap port of WAS2. Web.ear uses this providerUrl when building the InitialContext when trying to locate the EJBs.

For some strange reason, WEB.ear can not find the EJBs. It seems to us that, instead of connecting to port 2810, it is connecting to port 2809, the bootstrap port of WAS1.

To test the configuration we have used another machine, M2, which also has two application servers installed, WAS3 and WAS4. We have installed WEB.ear in WAS3 and EJB.ear in WAS4. In WAS3 JNDI we have added the providerUrl like iiop://M1:2810, so WEB.ear in WAS3(M2) will access EJB.ear in WAS2(M1). This configuration worked perfectly. We also tried WEB.ear in WAS1(M1) accessing EJB.ear in WAS4(M2) and it also worked. We also tried to install WEB.ear and EJB.ear in the same application server, WAS1, and it also worked fine.

So, to sum up, WEB.ear can access EJB.ear only when they share the same application server or their application servers are installed in different machines.

Why is that? It seems to us that WEB.ear always access the JNDI of its own application server when the providerUrl contains the name of the same machine, ignoring completely the port.

Thanks,

Eduard Jodas

Paul Ilechko

unread,
Mar 7, 2007, 8:58:05 AM3/7/07
to
edu...@gmail.com wrote:
> Hi,
>
> we have two application servers, WAS1 and WAS2, installed in the same
> machine M1. We also have two enterprise applications WEB.ear and
> EJB.ear. Web.ear is the front-end and EJB.ear contains shared
> services. We installed WEB.ear in WAS1 and EJB.ear in WAS2.

Don't do this. It adds lots of overhead for no good reason. Package the
web tier and the business logic EJBs in the same EAR.

Here's a good article that addresses some of the issues with packaging
and code sharing. It's a little old but the concepts are still valid.

http://www-128.ibm.com/developerworks/websphere/library/techarticles/0207_botzum/botzum.html

edu...@gmail.com

unread,
Mar 7, 2007, 9:47:39 AM3/7/07
to
Yes, I agree, but the company policy is very strict regarding shared libraries and services. I just can not avoid it. Besides, we have Portal applications (in another machine) that need to access the same and other EJBs.

While waiting for a solution, we currently have both applications installed in the same WAS, but it's not a question of making it work, but making it work as the company wants.

Thanks for the answer and the article reference. I'll pass it to my boss.

Eduard

0 new messages