There is a binding service that will help you.
You might find details using search otherwise it is
explained in the doco.
Thanks for your immediate reply. Actually i was referring to lot of documents.
Does creating multiple JBoss instances means duplication of entire JBoss folder along with bin, client, docs, lib, server subfolder to jboss1, jboss2, jboss3... with different port number? Please clarify me in detail.
(What is meant by binding service???)
thanks & regards
You duplicate the server folders to have
jboss1, jboss2, etc alongside minimal, default, all
The port changes are handled by the binding service,
there is an example config in docs in 3.2.2RC1
you specify which port config you want to use by
providing its name in conf/jboss-service.xml in
the binding service mbean (commented out by default).
suppose i want to run jboss1 on port 8080 and jboss2 on port 9090, where should i change the port configuration? Pls clarify in detail.
Does jboss-3.2.1 has binding support?
You change it in the binding-service.xml
jboss3.2.1 has support for the binding service, but I
think the jar is only in server/all/lib
Also, I don't think there is an example binding-service.xml
I think you will need to change the port-numbers in two jboss-service.xml files:
I think that should work, I'm not sure if it covers all, but for this seems to work. It works with my .war applications, and seems to work with my .ear applications as well.
> I think you will need to change the port-numbers in
> two jboss-service.xml files:
I just found out this isn't enough to have multiple instances running concurrently. So I guess there's more to it. If somebody knows, please share.
Yes u can have multiple instances of JBOSS.
The only thing u have to do is you have to change the port number in the following dorectory
I tries it it works fine for me.If you are still having problem please let me know.
I still get exceptions stating that addresses are already in use. This involves the naming-service and the webservice.
My guess is I need to change these as well, but that could be tricky, as naming services are usually expected to run on port 1099.
I have a similar problem: Multiple developers sharing a large UN*X box for runtime deployment. I solved the problem by having each developer create a configuration file that is processed by ANT to create a unique JBoss configuration, substituting the port numbers into the relavent files.
Copy the default server configuration files into the JBoss distribution into
the runtime directory. Do not copy the configurable files.
Copying default configuration files from ...
<!-- Do not copy configurable files -->
<!-- Do not copy log and temp files -->
Substitute the port numbers, etc. while copying the configurable files into\
the runtime directory.
<!-- Naming / JBoss WebService ports are defined in this file. -->
<!-- HTTP / AJP ports are defined in this file -->
<!-- Configure based on properties defined in runtime.properties -->
I have the service-binding working successfully in JBoss 3.2.1. I had to take the files from 3.2.2 RC1, but everything seems to work.
The files I took were sample-bindings.xml (I renamed to service-binding.xml) and bindingservice-plugin.jar.
Place the xml file somwhere in the jboss directory structure so that each configuration can reference it. I then copied the default directory to directories called 'instance1' and 'instance2' at the same level as 'default'. The result is a structure that has 'default', 'instance1', 'instance2' under the \server directory.
Then place the bindingservice-plugin.jar in the lib directory of each instance.
Edit the jboss-service.xml in each instance to uncomment the service binding mbean and referencing the xml file.
You should then be ready to start the jboss instances. From the bin directory 'run -c instance1'
I have attached my service-binding.xml as well.
Question: where does JBoss_Tomcat compile JSP pages?
In JBoss 3.0.3 & Tomcat 4.0.X it seems that pages compilation output goes to JBOSS_HOME\catalina\work\MainEngine\localhost\\
but what if I have multiple instances running different versions of the same webapp (with the same webapp name)???
I've noticed that stopping an instance cleans up the folder JBOSS_HOME\catalina\work\MainEngine\localhost\\ so other instances won't run anymore and I get JSP compilation errors because jasper can't find the jars of my app.
So my conclusion is that for multiple instances I need multiple catalina folders under the JBOSS_HOME folder, so I have
server\instance1\ where tomcat4-service.xml points to catalina-instance1
server\instance2\ where tomcat4-service.xml points to catalina-instance2
Is my analisys correct?
If so is the previous structure necessary also with the binding service?
If not can anybody give some more details (e.g. what about the folder JBOSS_HOME\server\\tmp??) ???
Thanks you very much in advance,
I have followed the steps you have taken and it does work with a few exceptions on instance2. However, another requriement I have is that each instance requires a different database connection. Initially with the "default deploy" I had my oracle connection defined in hsqldb-service.xml (the default database). My instance1 connects OK to the default connection but my instance2 gets a connection error and eventually I will need a different connection for instance2. Do you know of a simple solution so that each intance has its own database connection?
You can change the datasource information in each of the hsqldb-service.xml files in each instance. I do the same thing with SQL Server, DB2 and Oracle. Each instance can have it's own datasource definitions (*-ds.xml).
What exceptions are you getting with the second instance?