I'd like to add Hibernate Objects to an HTTP Session. Where the HTTP Session is participating in a clustered environment and is replicated through serialization. While serializing the HTTP Session, a lazy loading exception is thrown because it is outside the scope of a session. It seems like there should be a way to instruct hibernate to not attempt to serialize an object that hasn't been lazy loaded. After all, that is the state of the object graph and serialization dumps the state of the object graph. If an object is merely a proxy because it hasn't been loaded then only the proxy should be serialized. Right? Anyway, that's the behavior I'm hoping to see. Any ideas on how to make this happen?
Of course the expectation is the serialized object could be deserialized on another server and the session would be processed appropriately.