« Posts under Jboss

Using Jboss System Properties

So if I have a jboss application set up on different environments, is there an easy way for me to load environment specific properties on a per instance basis?

Yes there is, read on.

So normally, in most applications you might end up with some property values you’ll want to override based on the environment. For example, login credentials to some third party service, environment specific file locations, environment specific jnp servers, or properties that flag the application’s mode as test or production environments.

It’s generally a good idea for an application to have properties bundled within the deployable artifact…

[Read the rest]

External deploy directories in JBoss

Why not use the default jboss deploy directory?

Out of the box, jboss has a bunch of .sar, .war, and .jar deployment artifacts as well as a bunch of xml files in the default deploy directory (whose path is “jboss-install-dir/server/configured-server-instance/deploy”). For the sake of being neat and cautious, I prefer to break out any deployment artifacts that are constantly in development to a separate external directory where I would never be able to “accidentally” delete all the other important configuration files required by jboss to run. Something like that never happened to me, but a friend. Yeah, a friend. About…

[Read the rest]

Set up Jboss 5.1 as a service

Run JBoss not as root

First off, you’ll need to add a user named jboss to your system. Do this so you wont have to run jboss as root. Running anything as root is usually dangerous and is usually never recommended. Its very easy to break stuff if you don’t know what you’re doing. To add jboss to the sudoers file, open it by doing the following:

[root@bedrock ~]# vi /etc/sudoers

Scroll down some then add this entry somewhere near where the root user is listed:

## Services
Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
...
...
...
## Allow root to



[Read the rest]