users@glassfish.java.net

Re: clustering/failover

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Thu, 14 Feb 2013 11:12:13 -0600

On 02/13/2013 09:18 AM, Glenn Holmer wrote:
> asadmin create-network-listener --jkenabled true --target test_cluster
> --protocol http-listener-1 --listenerport "\${AJP_PORT}" jk-listener
>
> The example in the GlassFish documentation gives just ${AJP_PORT} (as
> opposed to "\${AJP_PORT}"), which gave me "Enter the value for the name
> operand". I assumed it was a typo, but do I need one listener with port
> 8009 and one with 8010? Or is there something else wrong?

Is this how it's supposed to look in domain.xml?

<servers>
   ...
   <server name="test_instance2" node-ref="test_node2"
config-ref="test_cluster-config">
     ...
     <system-property name="AJP_PORT" value="8010"></system-property>
     <system-property name="AJP_INSTANCE_NAME"
value="nod2test"></system-property>
     ...
   </server>
   <server name="test_instance1" node-ref="test_node1"
config-ref="test_cluster-config">
     ...
     <system-property name="AJP_INSTANCE_NAME"
value="nod1test"></system-property>
     <system-property name="AJP_PORT" value="8009"></system-property>
     ...
   </server>
</servers>

...

<java-config>
   ...
   <jvm-options>-DjvmRoute=${AJP_INSTANCE_NAME}</jvm-options>
   ...
</java-config>


-- 
Glenn Holmer
Weyco Group, Inc.
phone: 414-908-1809
fax: 414-908-1601