[ 
https://issues.apache.org/jira/browse/TUSCANY-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470719
 ] 

Fuhwei Lwo commented on TUSCANY-1065:
-------------------------------------

Hi Dan,

Tuscany SDO is currently built on top of the EMF. The scenario is 1 EMF and 1 
SDO in the env.

The problem lies who EMF or Tuscany SDO initializes the EcoreFactory eINSTANCE 
= org.eclipse.emf.ecore.impl.EcoreFactoryImpl.init(); first.  In order for SDO 
to work, the implementation of eINSTANCE must be the SDOEcoreFactory class 
defined in the SDOFactoryImpl.java. When EMF was init first, the EcoreFactory 
eINSTANCE will be EMF's EcoreFactoryImpl and SDO will be broken.

To initialize EMF first, you can modify SimpleDynamicTestCase.setUp() method to 
add an extra line - EcoreFactory.eINSTANCE.getEcorePackage(); and everything 
would break.

protected void setUp() throws Exception {
        super.setUp();
        
        EcoreFactory.eINSTANCE.getEcorePackage();

        // Populate the meta data for the test (Stock Quote) model
        URL url = getClass().getResource(TEST_MODEL);
        InputStream inputStream = url.openStream();
        XSDHelper.INSTANCE.define(inputStream, url.toString());
        inputStream.close();
}

> Coexistence problem between EMF and Tuscany SDO
> -----------------------------------------------
>
>                 Key: TUSCANY-1065
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1065
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-Mx
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-Mx
>
>
> When EMF and Tuscany SDO are running in the same JVM, Tuscany SDO is 
> completely not working when EMF was run and initialized before SDO.

-- 
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]

Reply via email to