-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Session Serialized problem ?
PostPosted: Sat Jan 31, 2004 1:56 am 
Beginner
Beginner

Joined: Fri Jan 02, 2004 3:27 am
Posts: 23
Location: Hong Kong
Can a disconnect session be serialized from EJB Server to Client?

I got the session complain the SessionFactory when it is deserialized at client side.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 2:22 am 
Beginner
Beginner

Joined: Thu Jan 08, 2004 4:40 am
Posts: 48
Location: Bangkok, Thailand
Could you please show your ERROR message? Because I'm using SessionBean with Hebernate same as you, but I haven't got any problems.
Cool

_________________
<name>arin</name>
<at>netplus software</at>


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 3:07 am 
Beginner
Beginner

Joined: Fri Jan 02, 2004 3:27 am
Posts: 23
Location: Hong Kong
It is cause by readResolve() that it cannot reference to the SessionFactory. The SessionFactory can be lookup inside Session Bean and no problem. For my intention, I am not going to reconnect the session in client side, but I want to keep the session-scope cached object and pass back to the server side and reconnect again at later use.

The remote interface is
Code:
public net.sf.hibernate.Session getSession(  )
      throws java.rmi.RemoteException;


Here is the exception during client deserialized the object

Code:
Caused by: java.io.InvalidObjectException: Could not find a SessionFactory named: java:/hibernate/HibernateFactory
   at net.sf.hibernate.impl.SessionFactoryImpl.readResolve(SessionFactoryImpl.java:399)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:925)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
   at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452)
   at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:446)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
   at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
   at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:136)
   at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:87)
   at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
   at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
   at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:104)END

   at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)


Top
 Profile  
 
 Post subject: Re: Session Serialized problem ?
PostPosted: Sat Jan 31, 2004 7:56 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
catcat wrote:
Can a disconnect session be serialized from EJB Server to Client?

I don't think it was intended to. sessions must stay local.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 10:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Well, Hibernate session serialization is useful if it is to be kept in a clustered HttpSession.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.