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

EJB, Servlet load order

27 views
Skip to first unread message

Dan Meany

unread,
Jun 13, 2003, 4:06:35 PM6/13/03
to
Hi,

We are attempting to port an application that works on JBoss and WebLogic to
WebSphere. One of our servlets uses an EJB in its init() method, but at the
time it loads (in web.xml: <load-on-startup>2</load-on-startup>), the EJBs
aren't loaded yet, and so I get a JNDI name not found error. Is there a way
to control the module load order in WebSphere 4 and 5 so that all the EJBs
are loaded first? JBoss used to have this problem, but they have since
fixed it.

Dan


David Artus

unread,
Jun 15, 2003, 3:14:01 AM6/15/03
to
In websphere 5 :

You can control that startup order of modules (and in fact EARs) by specifying
the starting weight on either the EAR or on the module within the EAR.

admin console: applications-> web/app modules-><your module>->starting weight.

I don't know how in in v4.

Damien Bonvillain

unread,
Jun 15, 2003, 5:18:14 AM6/15/03
to
"Dan Meany" <dme...@themotivator.com> writes:

> Hi,
>
> We are attempting to port an application that works on JBoss and WebLogic to
> WebSphere. One of our servlets uses an EJB in its init() method, but at the
> time it loads (in web.xml: <load-on-startup>2</load-on-startup>), the EJBs
> aren't loaded yet, and so I get a JNDI name not found error. Is there a way
> to control the module load order in WebSphere 4 and 5 so that all the EJBs
> are loaded first?

WebSphere by default seems to follow the modules order in
application.xml (WSAD follows the modules order in .modulemaps on the
other side). Even if you have references in you web.xml toward your
EJBs, this is not taken in account. Like David said, you also have the
possibility to fiddle with the server configuration in order to
achieve the natural load order.

Damien

Bibhas Bhattacharya

unread,
Jun 15, 2003, 9:06:43 AM6/15/03
to
In V4, the EJB modules are supposed to get loaded first. But, there is a
defect in at least 4.0.3 that sometimes, after installing a new EAR, the
order gets messed up. There is a fix out there to deal with it. You best bet
is to call IBM support.

Note: In WAS 4.0.3, starting the Enterprise Application instead of the app
server almost always gets the module load order right. We had changed our
XMLConfig scripts to do that.

--
Thank you,

Bibhas Bhattacharya
--
Web Age Solutions Inc.
WebSphere and WebLogic Training and Consulting Services
www.webagesolutions.com
E-mail: bib...@webagesolutions.com
Cell: (416) 294-3821
Phone: 1-877-812-8887 Ext. 27
"David Artus" <art...@uk.ibm.no.spam.com> wrote in message
news:3EEC1CB9...@uk.ibm.no.spam.com...

0 new messages