users@glassfish.java.net

Re: OSGi enabled web application

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 06 Aug 2009 09:49:55 +0530

Jan Luehe wrote:
> Sahoo,
>
> On 08/04/09 22:14, Sahoo wrote:
>> Jan Luehe wrote:
>>> On 08/04/09 13:55, glassfish_at_javadesktop.org wrote:
>>>> Hi,
>>>>
>>>> I would like to know whether glassfish v3 preview supports
>>>> versioning of web application bundles?
>>>>
>>>> I get the following error when I try to deploy a newer version of
>>>> web application bundle.
>>>> Virtual server [server] already has a web module
>>>> [test.test_1.0.0.0] loaded at [/test]; therefore web module
>>>> [test.test_2.0.0.0] cannot be loaded at this context path on this
>>>> virtual server.
>>>> I want all the new sessions be serviced by the new bundle and the
>>>> existing sessions get serviced by the older version. Is this
>>>> behavior possible?
>>>>
>>>
>>> Not at this point.
>>>
>>> Currently, the context root of a virtual server may be "occupied"
>>> only by a single web app,
>>> and only by a single version of it, at any given time.
>>>
>>> Jan
>>>
>> Jan,
>>
>> Let's say, user deploys version 1.0 of app, then updates the bundle
>> to version 2.0. Can we do anything to migrate the sessions to the
>> newer version of the application?
>
> Yes, the web container supports this, see
>
> http://blogs.sun.com/jluehe/entry/retain_session_data_during_redeployment
>
>
> I think you would have to somehow pass this CLI property:
>
> --properties keepSessions=true
>
>
> as part of the JavaEEDeploymentRequest/JavaEEUndeploymentRequest
> when you deploy the Java EE artifacts of the Web Application Bundle
> from the OSGiWebContainer?
>
> Thanks,
>
I will see what I can do to use this feature.

Thanks,
Sahoo