Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic