This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes Loading sequence of the different modules in an EAR....? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Loading sequence of the different modules in an EAR....?" Watch "Loading sequence of the different modules in an EAR....?" New topic
Author

Loading sequence of the different modules in an EAR....?

Rupinder Ghai
Greenhorn

Joined: Sep 25, 2002
Posts: 11
Hi Everybody,
I am facing this typical problem on WebSphere 4.0.1 on Solaris2.8.
I have an Ear, with 2 ejb modules and 1 web module in it. I want that both the ejb modules should get loaded first and then the web module, in which i have a servlet which loads at startup and does some processing defined in its init() method.
But when i start the application server, it first loads one ejb module than a web module and then the second ejb module...!!!
Is there any way i can govern the loading of different modules in the app server..???
Interesting thing is, that its working fine on one application server, but on another its giving this problem...!!!
I am attaching the application.xml file along.
Any pointers will be appreciated.
Thanks and Regards,
Rupinder
Hi Everybody,
I am facing this typical problem on WebSphere 4.0.1 on Solaris2.8.
I have an Ear, with 2 ejb modules and 1 web module in it. I want that both the ejb modules should get loaded first and then the web module, in which i have a servlet which loads at startup and does some processing defined in its init() method.
But when i start the application server, it first loads one ejb module than a web module and then the second ejb module...!!!
Is there any way i can govern the loading of different modules in the app server..???
Interesting thing is, that its working fine on one application server, but on another its giving this problem...!!!
I am attaching the application.xml file along.
Any pointers will be appreciated.
Thanks and Regards,
Rupinder

<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application id="Application_ID">
<display-name>npsC3.ear</display-name>
<module id="EjbModule_2">
<ejb>npsChi3.jar</ejb>
</module>
<module id="EjbModule_3">
<ejb>npsC3.JAR</ejb>
</module>
<module id="WebModule_1">
<web>
<web-uri>npsWebC3.war</web-uri>
<context-root>/BelC3</context-root>
</web>
</module>
</application>
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Unfortunately, there's not much you can do about this in WAS 4.0. The module load order can't be forced AFAIK. What you should do is (believe it or not) to spin off a thread in your Servlet init() and have it do a wait() of 5 seconds or so before it kicks off the initialization code. This strange recommendation actually comes straight from WebSphere development.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Rupinder Ghai
Greenhorn

Joined: Sep 25, 2002
Posts: 11
Thanks a lot Kyle...
This thing was really giving me a tough time....!!!
Regards,
Rupinder
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading sequence of the different modules in an EAR....?
 
Similar Threads
linking webapp with ejb in ear
Application.xml Module loading order
deployment descripter
Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project.
log4j setting in enterprise project structure