Ah, you've added the special sauce that the previous part of the
thread didn't have ... the JMS listener!
You should be in great shape. Your listener can call methods on a POJO like
String, so it can call methods on your class just as well. It can even invoke main() since main is a perfectly normal public static method.
MyClass.main( args );
I personally know zip about deployment, but you should be able to put your POJO in a "utility jar" (is that a common EJB term or just WebSphere?) or the same package & jar as your listener.
I'm a little curious what this thing is going to do. If you run main() you won't get any return value. If it just does a little work and doesn't need to report back, it should be fine, tho.
Sorry if that start out a bit smart-a** in tone. It's neat to realize how little magic there is in the world. Running inside a server is not that big a deal in many ways, and main() has no voodoo at all - it just happens to be the method that java.exe likes to call.
Let me know if all that works out for you!
[ June 10, 2005: Message edited by: Stan James ]