[
https://issues.apache.org/jira/browse/TUSCANY-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469846
]
Hasan Muhammad commented on TUSCANY-1086:
-----------------------------------------
Frank,
Ok.. did the above. But when i a serialize just a DataObject directly instead
of a DataGraph, while deserializing, in ResolvableImpl.readDataObject(), since
it does not have a root, it goes to the else clause where, it now directly
reads from the DataObject, which then gets delegated to the
EDataGraphExternalizable.readExternal(). In this method, we are creating a new
Resource wherein lies the problem. Since this Resource is being created without
a scope. I assume it is taking the global scope.
Now, i can do the following:
Resource resource =
resourceSet.createResource(URI.createURI("all.datagraph"));
if(objectInput instanceof SDOObjectInputStream){
TypeHelper typeHelper =
((SDOObjectInputStream)objectInput).getHelperContext().getTypeHelper();
}
I can get the extendenMetaData from typeHelper, but i am stuck after this,
since DataObjectUtil has ta method configureXMLResource() which does configure
the resource to the scope (extendedMetaData), but that is an XMLResource. I
assume we cant always typecast Resource to XMLResource. So we need a similar
method such as configureResource(), to set the scope for the resoource, so that
we can call that in the readExternal() method above.
Do you agree ?
Hasan
> Scope defined java serialiazation/deserialization of SDO
> --------------------------------------------------------
>
> Key: TUSCANY-1086
> URL: https://issues.apache.org/jira/browse/TUSCANY-1086
> Project: Tuscany
> Issue Type: Improvement
> Components: Java SDO Implementation
> Affects Versions: Java-M2
> Environment: All
> Reporter: Hasan Muhammad
> Fix For: Java-SDO-Mx
>
>
> Need to have a scope defined java serialization/deserialization of SDO's.
> Currently it can be done only in the Global/default scope. Have to fix this
> by using helperContext as the scope for creating ObjectInputStream and
> ObjectOutputStream.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]