Doo Dah
Doo Dah

Reputation: 4029

Multiple Glassfish instance on single server

I am running glassfish3122. I am trying to run two separate glassfish instances on a single box. One for development, and one for test. After re-configuring ports, I have one last problem:

java.net.BindException: No free port within range: 7676=com.sun.enterprise.v3.se
rvices.impl.ServiceInitializerHandler@69ed60dd

I understand that this is JMS. How can I configure it to run on a port other than 7676? I do not see it in glassfish3122eclipsedefaultdomain/config/domain.xml.

Should I instead have a single glassfish instance with multiple domains?

Thanks, Scott

Upvotes: 3

Views: 5871

Answers (1)

John Clingan
John Clingan

Reputation: 3334

I've never been in favor of editing domain.xml directly. Ya never know what might get messed up. Instead, I use asadmin get or asadmin set.

To list all attributes, type:
$ asadmin get \* # Escape the asterisk on Unix/LInux/Mac system

To find an attribute of interest, I use grep:
$ asadmin get \* | grep 7676
configs.config.server-config.system-property.JMS_PROVIDER_PORT.value=7676

Now, set the attribute to another value:
$ asadmin set configs.config.server-config.system-property.JMS_PROVIDER_PORT.value=9999

Upvotes: 4

Related Questions