• Post Reply Bookmark Topic Watch Topic
  • New Topic

Standard deployment of webservice in all servers : weblogic, tomcat, glassfish

 
Guy Emerson
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Not sure if this sounds a little weird but I need a way to figure out a standard way to create a webservice (in the form of war or ear) and deploy across different servers without making any change to the war or ear file

I have not seen any document on google that gives a single way of doing that. This will save me a lot of time.

Please correct me if I am wrong

regards

Emerson
 
Tim Holloway
Bartender
Posts: 18417
60
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, that's not really possible.

Ideally, you have a webapp, a server-independent deployment descriptor (the web.xml file) and a server-dependent deployment descriptor (for Tomcat, that's a Context definition). You then feed them to a JSR-188 compliant webapp deployer and Bob's your Uncle.

In Real Life, both webapp server brands and versions are too different. Tomcat (and jeTTY) don't implement the full J2EE stack, so any support for persistence, messaging, and other extended J2EE services has to be handled the hard way - usually by including extra JARs into the webapp. More subtle differences in spec implementations can be a problem with full-stack deployments. And then there's the issue of whether the target server implements the same version of JEE as your app is written to.

Failing that, a good build tool such as Maven can be used to make the task of producing these different variations on a theme more manageable. Maven offers "profiles", so you have build with a "tomcat" profile, a "weblogic" profile, a "glassfish" profile, and so forth.
 
Guy Emerson
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim or the answer..

Maven seems to be the best resort...Will do that using maven

Regards
Emerson
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!