Here is what I do. I have an Ant script that provisions JBoss AS in two parts. The first part, which is done only once, extracts everything except the 'server' directory. The second part, which happens once per app, extracts one of the 'server/xxx' directories and renames it (e.g., I end up with jboss_home/server/appname). Not sure if this is what you are looking for.
thanks for your answer.
Your solution sounds good.
One of our requirements is, that we have to separate JBoss into a product and instance part, so that you can update the product without doing something in the instance (server)-part.
Would you be so kind and send me your ant script, if possible?
What I do is similar to Peter, but with a installer.
- check a JBoss given by procedure
- copy JBoss except server/*
- copy all directory and strip according to requirements
- replace jboss configuration files (e.g. port-binding or messaging configuration)
- add two application specific directories for lib and deploy (added within the step before)
With this I'm able to separate the application from jboss and replace only the two directories in case of application upgrades.
>>Would you be so kind and send me your ant script, if possible?
Grab the source code download from JBoss in Action (http://www.manning.com.jamae). Each chxx/build.xml includes the ch00/build-include.xml file which contains the tragtes g-jboss-base and g-jboss-server, which perform that tasks I mentioned.
For my own development work I always include the ch00/build-include.xml because it makes generating a unique server configuration for each application trivial.