Creating a New Configuration
You aren't limited to the three configurations
JBoss provides. In fact, instead of having unneeded services
loaded, wasting memory and CPU space, you can create your own JBoss
configuration that has exactly what you need. It's actually quite
easy to create a custom configuration.
How do I do that?
way to create your own configuration
is to copy an existing one and then rename the folder to something
that describes your configuration options. Once you've done that
you can add any new JARs and resources to that new server
Let's say you want to create a new configuration
that you can add other services to later.
You can copy the
server configuration folder to a
new folder in the
folder and call it
. On Unix this would be
cp -R minimal
You can run your new configuration like
./run.sh -c my_server_config
The server will start up using your new
configuration, and you'll see console output that looks like
JBoss Bootstrap Environment
JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh
05:49:22,213 INFO [Server] Starting JBoss (MX MicroKernel)...
05:49:22,217 INFO [Server] Release ID: JBoss [Zion] 4.0.2RC1 (build:
05:49:22,220 INFO [Server] Home Dir: /Users/samjr/jboss-4.0.2RC1
05:49:22,221 INFO [Server] Home URL: file:/Users/samjr/jboss-4.0.2RC1/
05:49:22,223 INFO [Server] Library URL: file:/Users/samjr/jboss-4.0.2RC1/lib/
05:49:22,226 INFO [Server] Patch URL: null
05:49:22,244 INFO [Server]
Server Name: my_server_config
05:49:22,246 INFO [Server] Server Home Dir: /Users/samjr/jboss-4.0.
05:49:22,247 INFO [Server] Server Home URL: file:/Users/samjr/jboss-4.0.
05:49:22,249 INFO [Server] Server Data Dir: /Users/samjr/jboss-4.0.2RC1/server/my_
05:49:22,250 INFO [Server] Server Temp Dir: /Users/samjr/jboss-4.0.2RC1/
05:49:22,251 INFO [Server] Server Config URL: file:/Users/samjr/jboss-4.0.
05:49:22,285 INFO [Server] Server Library URL: file:/Users/samjr/jboss-4.0.
05:49:22,287 INFO [Server] Root Deployment Filename: jboss-service.xml
05:49:22,294 INFO [Server] Starting General Purpose Architecture (GPA)...
[More startup information]
05:50:44,641 INFO [Server] JBoss (MX MicroKernel) [4.0.2RC1 (build:
CVSTag=JBoss_4_0_2_RC1 date=200503140913)] Started in 1m:21s:849ms
And with that, the new configuration is
...adding or removing services from the
While new configurations are nice simply as a
way to work in an isolated sandbox, the original
creating a new configuration was to customize the set of services
available. We'll need a bit more background to do that type of
serious customization. But as we learn how to customize the
services throughout this book, you'll be able to come back and
apply those changes to your own configuration.
We hope you've seen how easy it is to get up and
running and how easy it is to create new configurations of the
JBoss server. The power is provided in a simple and configurable
way. Congratulations for getting this far. Now let's move on to the
chapter and see how to package and deploy a simple