Originally posted by Joe Cheung:
1. Is it feasible to deploy the JAR files to WAS (in fact, I tried to export all of them to one EAR file but failed as the projects are not enterprise projects. Let me know if there is any way to do so)?
Yes, it's feasable. However, in order to run anything in a
J2EE container such as WAS, you need to create at least one J2EE object. I'd suggest creating a stateless EJB Session bean that does nothing more than call a method on one of your other objects to start whatever process needs to be started. Then open the EAR file Deployment descriptor and have it point to the other 3 Java projects as "Utility Jars". Then specify the other 3 jar files as "J2EE Module Dependencies" in the EJB project.
Originally posted by Joe Cheung:
2. The Director needs to run for 24 hours a day as it keeps polling any incoming file and then notify Handler_A and Handler_B for different mapping logic. What should I do to make Director start running upon depolying it on WAS?
You can either make your session bean implement the javax.ejb.TimedObject interface and use the EJB Timer service, or you can use the WAS Scheduler service, assuming you are using WAS 6.0 or above. To get more details, consult the
WAS InfoCenter
Originally posted by Joe Cheung:
3. How can Director notify (or contact) Handler_A and Handler_B to do something as they are separate JAR Project (in WSAD, I can include Handler_A and Handler_B projects in Director project such that it can make a method call to them)?
If you've set things up properly, all three jar files plus the new EJB jar file will be in the classpath, so any class can instantiate and call methods on any other class and it will be found in the classpath.