Running and accessing multiple instances of JBoss

Posted on

Running and accessing multiple instances of JBoss – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, jboss, mod-jk, , .

I have 5 instances of JBoss configured and running on different ports (8080 to 8480),and each instance is assigned for a particular project team.I would like to configure it further so that users belonging to a project should be able to access their instance (node) just by typing the URL/node without mentioning the port number, like for example, http://localhost/node1 should take them to the first instance and so on.
I understand that mod_jk can be used to achieve this on a server with a single node.Would greatly appreciate if someone could help me out here.

Thanks,
Nagaraj

Solution :

you don’t have to use mod_jk, just use a mod_proxy to do the work. just place this in your apache configuration:

<Location /node1>
   ProxyPass http://<jboss_server_name>:8080/
   ProxyPassReverse http://<jboss_server_name>:8080/
</Location>

<Location /node2>
   ProxyPass http://<jboss_server_name>:8180/
   ProxyPassReverse http://<jboss_server_name>:8180/
</Location>

...

this way all request to /node1 will be forwarded to your first jboss instance, and /node2 will be forwarded to your second jboss instance, and so on.

I was able to meet my requirement using mod_jk, by following this excellent article at

http://www.linuxjournal.com/article/8561.

Though written for apache/tomcat,it provided enough info for me to get going, and apply it successfully in my environment.

Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *