dev@glassfish.java.net

Re: HA/in-memory replication

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 11 Apr 2007 08:53:33 -0700

Peter Fabian wrote On 04/11/07 08:05 AM,:

> Jan Luehe wrote:
>
>>
>>
>> Ashish Sahni wrote On 04/06/07 11:18 AM,:
>>
>>> Hi Jan/Larry,
>>> So, the one-machine scenario should be good enough for me now but
>>> for some reason http session data does not seem to be replicated
>>> across instances
>>> for either my custom-app of for the sample app - clusterjsp.
>>
>>
>>
>> To summarize:
>>
>> - custom-app was not marked as distributable, i.e., was missing
>> <distributable/> in its web.xml
>>
>> - The clusterjsp sample app specifies "ha" instead of "replicated" as
>> its
>> persistence type in sun-web.xml.
>>
>> After adding <distributable/> to one, and changing "ha" to "replicated"
>> in the other app, memory replication has been enabled.
>>
> changing ha to replicated gives this error when running ant all-app.
> this is odd..
>
>
> verify_common:
> [echo] Verifying Process for ./build/assemble/ear/clusterjsp.ear
> [exec] SEVERE: "DPL8015: Invalid Deployment Descriptors in
> Deployment descriptor file WEB-INF/sun-web.xml in archive
> [clusterjsp.war].
> [exec] Line 11 Column 52 -- *Attribute "persistence-type" with
> value "replicated" must have a value from the list "memory file custom
> ha s1ws60 mmap "."*
> [exec] SEVERE: "DPL8005: Deployment Descriptor parsing failure :
> Attribute "persistence-type" with value "replicated" must have a value
> from the list "memory file custom ha s1ws60 mmap "."
> [exec] INFO:
> [exec] # of Failures : 0
> [exec] # of Warnings : 0
> [exec] # of Errors : 2
> [exec] INFO: Look in file "clusterjsp.ear.txt" for detailed results.
> [exec] Result: 2
>

I changed "ha" to "replicated", rebuilt the EAR, and deployed manually
to the cluster,
without using the script. That worked. I'll investigate why using the
script reports the above
error.

As Larry points out, an alternative would be to remove the
persistence-type attribute
from sun-web.xml altogether, in which case your app just inherits
whatever persistence-type
you have defined in the <web-container-availability> element in domain.xml.
In the "cluster" profile, this persistence-type defaults to "replicated".


Jan


>
>--
>Peter Fabian
>Sun Software
>
>AIM/skype:fabianpetergabor
>
>