Suppose I have an enterprise application (say , MyApp.ear), deployed on the WebSphere5. It uses, JMS, DataSource configuration, done at the Server where it has been deployed.
Now, I want to make an java application which uses some of the piece of functionalities of the MyApp.ear. So, I make a jar of such utilities/methods (say, MyUtil.jar) and use it in my Stand alone java application. It compiles fine. Now, MyUtil.jar has got code for, say, dealing with datasource (hence, database ). As, the datasource (and also JMS ques n all...)is configured on the Server, I feel I need to deploy my java application on the Server. so that my "MyUtil.jar" can use the configuration seetings done over there.
When I went to the admin console of the WebSphere server , it suggests that it will allow one to deploy the application as either, EAR, WAR or JAR file. When I tried to deploy the JAR of my application , with mainfest file containing the Main class, it produced an error, suggesting that it has to be an EAR file to deploy.
I made an EAR project and then wrapped my application in a Application Client project (I am using WSAD), and then tried to deploy my application over the WebSphere server. It did deploy, but the status of the application became "UNKNOWN".
Has anybody ever required to deploy stand alone application over the App Server, and what happens if at all a non-web project is deployed over the App Server?
Can you suggest a better way, so that the common code sitting inside the MyApp.ear could be used and also, we can run the Standalone java app inside a JVM instead of using App Server?