aspose file tools*
The moose likes Object Relational Mapping and the fly likes how to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "how to "reattach" a serialized entity to a hibernate sesison?" Watch "how to "reattach" a serialized entity to a hibernate sesison?" New topic
Author

how to "reattach" a serialized entity to a hibernate sesison?

Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
I'm serializing a Hibernate-persistable bean to an HTTP session state (using session.setAttribute()), but when I pick it back up in the next request, I can't get lazy-initialized child properties because the bean isn't attached to a Hibernate session anymore.

Is there any way to "re-attach" the bean to a hibernate session?
Philippe Desrosiers
Ranch Hand

Joined: Mar 29, 2006
Posts: 138
hmm. Looks like this hasn't got anything to do with serializing / deserializing. I've searched around on Google for this, but noone seems to have a definitive answer: Does anyone know what the following means?

I'm loading the com.foo.MyClass object from a Dao object that extends org.springframework.orm.hibernate3.support.HibernateDaoSupport, so supposedly I don't need to explicitly care about transactions, but if that's the case, what's going on here?

I don't really know what code or config to include here, so, let me know...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to "reattach" a serialized entity to a hibernate sesison?