dev@glassfish.java.net

Re: HA/in-memory replication

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 12 Apr 2007 10:47:31 -0700

Peter Fabian wrote On 04/12/07 10:22 AM,:

> Jan Luehe wrote:
>
>>
>>
>> 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
>>
>>
>>
>> You need to upgrade clusterjsp's sun-web.xml to conform to
>> sun-web-app_2_5-0.dtd,
>> which is where we added "replicated" to the list of valid
>> persistence-type
>> values, i.e., use this DOCTYPE declaration:
>>
>> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD
>> Application Server 9.0 Servlet 2.5//EN"
>> "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
>>
>>
> so this is actually bug in samples, right?


If the sample is supposed to use in-memory replication as opposed to HADB,
then yes, that would be a bug in samples (for not using latest DOCTYPE
in bundled
sun-web.xml).

An alternative to upgrading the DOCTYPE in the sun-web.xml would be to
remove its
persistence-type attribute, in which case the persistence-type specified
in the domain's
<web-container-availability> element will be picked up, which defaults
to "replicated"
in the case of the "cluster" profile.


Jan


> P
>
>