Top-level DataContext fails to attach to default DataDomain transparently on deserialization
--------------------------------------------------------------------------------------------
Key: CAY-553
URL: http://issues.apache.org/cayenne/browse/CAY-553
Project: Cayenne
Type: Bug
Components: Cayenne Core Library
Versions: 1.2 [BETA]
Reporter: Mike Kienenberger
Top-level DataContext fails to attach to default DataDomain transparently on deserialization.
Caused by: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2B2
April 17 2006] Cannot commit changes - channel is not set.
at org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1186)
at org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1121)
Data context is created with:
DataContext.getThreadDataContext().createDataContext()
Data context is serialized with:
private void writeObject(java.io.ObjectOutputStream out) throws IOException
{
out.writeObject(this.childDataContext);
}
Data context is deserialized with:
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
{
this.childDataContext = (DataContext)in.readObject();
// childDataContext.setChannel(super.threadDataContext().getParentDataDomain());
}
Problem goes away if setChannel line is uncommented.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/cayenne/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon May 22 2006 - 21:12:47 EDT