The actual deserialization is going on and it happens only when
session.getAttribute is called from JSP in sling. If its called from
SlingServlet, which is in OSGI bundle, this doesn't happen.
We do not need serialization at all, but not sure why this kind of
thing is happening only when called from JSP running in sling.

On Thu, Mar 3, 2011 at 11:01 PM, Alexander Klimetschek
<[email protected]> wrote:
> On 03.03.11 14:44, "Unmesh Joshi" <[email protected]> wrote:
>>When JSP running inside sling is trying to get session objects, it is
>>ALWAYS getting deserialized by weblogic. See the following stack
>>trace. This does not happen when Sling servlet is trying to get
>>session data. Is something special happens when JSP is processed by
>>sling?
>>
>>at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>    at
>>java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>>    at
>>java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>>    at
>>java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
>>    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>>    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
>>    at
>>weblogic.common.internal.PassivationUtils.toObject(PassivationUtils.java:5
>>4)
>>    at
>>weblogic.common.internal.PassivationUtils.toObject(PassivationUtils.java:4
>>6)
>>    at
>>weblogic.common.internal.PassivationUtils.copy(PassivationUtils.java:64)
>>    at
>>weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java
>>:100)
>>    at
>>weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java
>>:44)
>>    at
>>weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.jav
>>a:395)
>>    at
>>weblogic.servlet.internal.session.SharedSessionData.getAttribute(SharedSes
>>sionData.java:59)
>>    at
>>org.apache.jsp.apps.myapp.components.Login.Login_jsp._jspService(Login_jsp
>>.java:145)
>
> Well, not sure from the stacktrace if there is an actual deserialization
> going on. Weblogic could also just "try" to read from some cache.
>
> Maybe you could disable that serialization in Weblogic - I don't really
> see the reason why you want that overhead between two webapps on the same
> web application server. (Except persisting the sessions on disk is
> important)
>
> In any case, this is all happening inside Weblogic, not Sling. The JSP
> just calls session.getAttribute() here.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> Developer // Adobe (Day) // Berlin - Basel
>
>
>
>
>

Reply via email to