| Author |
How to call a stand alone class from WAS???
|
Gaurav Jain
Ranch Hand
Joined: Mar 11, 2004
Posts: 108
|
|
I have a standalone class sitting outside WAS. Is there any way (WAS API) i can start that stand alone class from WAS...that is as soon as my WAS starts that class also starts. I dont use start that class using the servlet.
|
 |
Kyle Brown
author
Ranch Hand
Joined: Aug 10, 2001
Posts: 3879
|
|
I have no idea what you mean by a "standalone class". Do you mean a class that has a main() method you need to start? 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.
|
 |
Gaurav Jain
Ranch Hand
Joined: Mar 11, 2004
Posts: 108
|
|
yes. A class with a main method.
|
 |
Scott Duncan
Ranch Hand
Joined: Nov 01, 2002
Posts: 363
|
|
|
Kick off a thread in a servlet's init method that uses the RunTime object. Bad thing is that the thread will kick off when the app is restarted.
|
No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
|
 |
Gaurav Jain
Ranch Hand
Joined: Mar 11, 2004
Posts: 108
|
|
I dont want to use the servlet method. The update is that i created a java class outside WAS and packaged it in a jar file. Mentioned the path of the jar file in java VM arguments of WAS. When i start the server that standalone java class gets executed but then the server stops automatically without giving any error. What is the problem??
|
 |
venki janapati
Greenhorn
Joined: Dec 26, 2002
Posts: 19
|
|
|
use websphere startup class. if you mention the class with required arguments in the configuration,when the server starts up ,it starts the stand alone program as well
|
 |
 |
|
|
subject: How to call a stand alone class from WAS???
|
|
|