• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rupinder Ghai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rupinder Ghai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Kyle...
This thing was really giving me a tough time....!!!
Regards,
Rupinder
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic