users@glassfish.java.net

Re: clustering/failover

From: Tom Mueller <Tom.Mueller_at_oracle.com>
Date: Thu, 14 Feb 2013 11:54:31 -0600

On 2/14/13 11:12 AM, Glenn Holmer wrote:
> 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".
Yes, the \ is necessary (or use single quotes). The shell is expanding
${AJP_PORT} within double quotes as an environment variable.

Tom

>> 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>
>
>