Deploy multiple instances of an EAR (representing versions) to Glassfish

Posted by Thorbjørn Ravn Andersen on Stack Overflow See other posts from Stack Overflow or by Thorbjørn Ravn Andersen
Published on 2010-03-18T11:09:39Z Indexed on 2010/03/18 11:11 UTC
Read the original article Hit count: 472

Filed under:
|
|
|
|

I basically want to be able to deploy multiple versions of the same EAR file to the same server (Glassfish instance?) , and have a unique path to each version separating them.

From my reading on this it appears that multiple EARs deploy to the root of the web server namespace so that they can coexist if they do not have colliding context-root's of WAR's.

In my case I'd rather have that instead of everything going under "/", I'd like to be able to brand a given EAR-file build to ALWAYS deploy under a given path like "/foo-20100319" or "/foo-CUSTOMER-20010101". This can easily be done with a single WAR file just by renaming it. I do not need or want them to disturb each other.

It is my understanding that this remapping is outside the scope of the application.xml file, so I found that http://docs.sun.com/app/docs/doc/820-7693/beayr?a=view says that I can specify web-uri and context-root, but I am not certain that what I wish to do, can be specified with these in Glassfish.

How should I approach this? I have full control over the build process.

(I have found http://stackoverflow.com/questions/877390/deploying-multiple-java-web-apps-to-glassfish-in-one-go but I am not certain how to apply this to what I need).

© Stack Overflow or respective owner

Related posts about java

Related posts about glassfish