users@glassfish.java.net

Re: GF 2.1 EAR startup race conditions?

From: <hong.hz.zhang_at_oracle.com>
Date: Sun, 04 Mar 2012 21:06:23 -0500

How is the common ejb module packaged in the ear in this case? Is it
packaged as a separate ejb module or as a library jar which is available
to all web modules? If it's packaged as separate ejb module, the
(default) loading order is deterministic, we always load module one by
one and ejb module before web module. If the ejb module is packaged as
library to web module, I need to double check (I think there were some
changes went in to make sure the ejb part gets loaded before web for ejb
in war case, but not too sure).

Thanks,

- Hong

On 3/4/2012 5:24 PM, forums_at_java.net wrote:
> We have an application that works fine on several machines, but when
> it is
> deployed on the production machine (naturally) we run in to a missing
> JNDI
> resource.
>
> Specifically, this EAR has several WARs in it. They all intereact with a
> common EJB jar which contains all of the session beans. Through
> experimentation, it seems as if the WARs are deployed individually, yet
> simultaneously. But one of the WARs is having issue locating the JNDI
> reference to one of the session beans in the EJB jar. The WAR, in this
> case,
> it is trying to access the EJB in it's ContextListener.
>
> None of the rest of them seem to have this issue, and others access it in
> their ContextListener, but one does and, of course, only on this machine.
>
> Are the WARs specifically deployed AFTER the EJBs are deployed, or is
> there
> actually some underlying race condition going on here that we need to
> try and
> work around, if even to stick a sleep for a few seconds in the Listener.
>
> I'd rather have a better fundamental understanding of whats happening
> than
> just sticking some random things in to the system first.
>
>
>
>
> --
>
> [Message sent by forum member 'whartung']
>
> View Post: http://forums.java.net/node/883988
>
>