« Posts tagged Jboss

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]

Install mod_jk

Use mod_jk to bridge apache and Jboss

mod_jk is an apache extension that you can use to redirect incoming http requests to an application server. It lets you configure multiple applications servers by virtual host urls, and provides a means of setting up load balancing preferences between application servers. It’s very useful because it lets apache do what it does best – serve up http requests. Well, its good at serving up html too but apache will usually do a much better job of handling load balancing that most application servers. Let the web server handle http, and let the…

[Read the rest]

Set up postgres

Most linux oses come with postgres and mysql out of the box. If yours doesn’t or you want to run a newer version than the the one your os comes with you should be able to install it using the yum installer. Fedora 11 comes with a visual installer you can use to pick and choose what rpms you want running on your machine. Once you have postgres installed on your box you’ll want to initialize some dbs stuff:

[root@bedrock ~]# service postgresql initdb

open up postgres to listen to domains other than localhost:

[root@bedrock ~]# vi /var/lib/pgsql/data/pg_hba.conf

# connect



[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]