views:

561

answers:

3

I want to deploy an ear file which will automatically run the ear file with all the configuration in my Web Sphere application server.

A: 

Are you looking for certain EJB's to startup on server startup? Because if you are, you can browse to your server. Then look for Container Settings | Startup beans service. Check the box to for the startup beans service. bounce your server. This will make sure that certain of your EJB's startup when the server does, and that will load some of your configuration as necessary. Is that what you are looking for?

Chris Aldrich
A: 

I am sorry perhaps my question was not that clear. I want to make an .exe file which will deploy an ear file with all configurations in local RAD server. In this case the server is web sphere. the script which will deploy the ear should be NSIS script.

A: 

Oh ok. That makes more sense. Well, what you really want then is the ability to set up (ie, configure) the WAS container, and then deploy your application. IBM actually provides a way to do this. There is a shell script/batch file (depending on your OS) that gets you into the WAS administration area without having to get to the admin console. It is called wsadmin. You can fire that up with whatever parms you need to (depends on if you are running WAS Base or WAS ND, etc.) so you connect to the right cell/node/server and profile. You can then pass in a Jython script (which is IBM's recommendation for configuring WAS). This script can configure WAS and even deploy your applications. We use it all the time here. If you are unfamiliar with Jython, there is a "cheat" method to get you started. In your local RAD or RSA install, when you "deploy" your code locally (ie, only works if you export your EAR and then try to install it through the admin console), there is a link off to the top right of the screen of the admin console that shows you the Jython script necessary for the steps you just performed. We used that to give us a jump start on the commands necessary to perform certain things.

I know it isn't NSIS script, but you will really get better support from IBM if you stick to Jython. Let me know if this was helpful. If it doesn't seem to make sense, give a holler.

Chris Aldrich