Running Multiple Eclipse J2EE Workspaces with multi-instance JBoss configuration


In my previous article I had explained how to configure JBoss for multi instance run. (If you have not configured your JBoss, please read to my previous article)


While running your Java project on JBoss through eclipse, we first need to create a server in eclipse which should point to your multi-instance configured JBoss.
* Then in its properties it will ask for few things like - runtime environment, Launch configuration details, server properties like JNDI port, HTTP port, server configuration.
* So as shown in above screen shot, fill in your proper values.
a. For HTTP port, JNDI port - refer to your binding xml file.
b. For server configuration, put name of your server configuration folder like node1, node2, all, minimal, etc.


**server configuration value is important because it will decide where to publish your jar/war/ear of current project (I mean in which server configuration directory).
**If you put this value wrong, then it will publish your project to some other JBoss instance.


There is one more way to edit these values,
go to your project workspace directory - then to 
<Project_workspace_directory>\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml


and edit values like jndi port, port, serverConfig, start-timeout, stop-timeout, etc.




e.g. Server configuration folders would look like -


Now click on "open launch configuration", and in program and VM arguments, put values like - 
//In Program Arguments - 
-c default
-b 0.0.0.0
-Djboss.messaging.ServerPeerID=0

//In VM arguments (add this to existing arguments(optional-not required)) - 
-org.jboss.logging.Log4jService.catchSystemOut=false


which would appear like -


So now if I have opened one more eclipse workspace and I want to run this project on different JBoss instance then its server properties would look like


and its launch configuration would be like - 


Now consider if I open my third workspace, and if I want to run this project on another different JBoss instance then, its server properties and its launch configuration would look like - 



That's it.
In my next article, I will explain how to run (i.e.create, start and stop) each JBoss instance as a separate windows service. Before that please read my previous article How to run JBoss as windows service.


So, Have a Happy life and coding too :-)

Comments

Popular posts from this blog

How to install / Configure Mantis For Apache-PHP-PostgreSQL combination

Modified ExtJS LOVCombo (List of Values) ux plugin - with select all, deselect all, text filter, bubble up and bubble down of selection

TriggerField with two triggers, TwinTriggerField with tooltips