users@glassfish.java.net

Re: Is persistence-type="file" for webapp working?

From: <Jan.Luehe_at_Sun.COM>
Date: Thu, 31 May 2007 11:39:20 -0700

glassfish_at_javadesktop.org wrote:

>First of all, thank you for your answer.
>I added those lines into domain.xml but one more thing I needed to do is to change
>availability-enabled to true in:
>
> <j2ee-application availability-enabled="true" directory-deployed="false" enabled="true" java-web-start-enabled="true" location="${com.sun.aas.instanceRoot}/applications/j2ee-apps/KEApplication" name="KEApplication" object-type="user"/>
>
>

Yes, that's right.

You can achieve the same by passing

  --availabilityenabled=true

to the "asadmin deploy" command.

As I mentioned earlier, the fix for

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=3066

which will be available as of 9.1 b49, eliminates the need for enabling
availability at the various levels when using file persistence.

>So then I saw in log that file-based persistence is enabled for my application.
>I tried to work with application, then restart domain and try to continue my session.
>But exception was thrown:
>
>[#|2007-05-28T10:33:57.703+0400|SEVERE|sun-appserver9.1|org.apache.catalina.core
>.ContainerBase|_ThreadID=13;_ThreadName=ContainerBackgroundProcessor[StandardEng
>ine[com.sun.appserv].StandardHost[server].StandardContext[/KE]];_RequestID=36657
>087-c514-4055-ba5a-0fa60fa18977;|Exception invoking periodic operation:
>java.lang.ClassCastException: cannot assign instance of java.lang.String to fiel
>d com.sitronicsts.ngage.ke.ui.managed.SessionContext.facade of type com.sitronic
>sts.ngage.ke.datalayer.core.KESessionFacade in instance of com.sitronicsts.ngage
>.ke.ui.managed.SessionContext
> at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStre
>amClass.java:2004)
>
>What could be the problem?
>
>

File persistence leverages standard Java serialization and deserialization
techniques for session data.

I assume com.sitronicsts.ngage.ke.ui.managed.SessionContext is stored
as a session attribute?


Jan