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

Ron Gavlin commented on TUSCANY-513:
------------------------------------

Got that fixed. Thanks. 

Now I have run into a problem with an infinite loop attempting to set a 
property. The stack trace is below. It appears the DataObjectBase.eSet(int, 
Object) is conflicting with BasicEObjectImpl.eSet(int, Object). Is this a known 
problem? Any thoughts?

- Ron

Thread [main] (Suspended)       
        InfoTypeImpl(BasicEObjectImpl).eSet(EStructuralFeature, Object) line: 
651       
        InfoTypeImpl(DataObjectImpl).set(Property, Object) line: 142    
        InfoTypeImpl(DataObjectImpl).set(int, Object) line: 102 
        InfoTypeImpl(DataObjectBase).eSet(int, Object) line: 383        
        InfoTypeImpl(BasicEObjectImpl).eSet(EStructuralFeature, Object) line: 
654       
        InfoTypeImpl(DataObjectImpl).set(Property, Object) line: 142    
        InfoTypeImpl(DataObjectImpl).set(int, Object) line: 102 
        InfoTypeImpl(DataObjectBase).eSet(int, Object) line: 383        
        InfoTypeImpl(BasicEObjectImpl).eSet(EStructuralFeature, Object) line: 
654       
        InfoTypeImpl(DataObjectImpl).set(Property, Object) line: 142    
        InfoTypeImpl(DataObjectImpl).set(int, Object) line: 102 
        InfoTypeImpl(DataObjectBase).eSet(int, Object) line: 383        
        InfoTypeImpl(BasicEObjectImpl).eSet(EStructuralFeature, Object) line: 
654       
        SDOXMLResourceImpl$SDOXMLHelperImpl(XMLHelperImpl).setValue(EObject, 
EStructuralFeature, Object, int) line: 1050        
        
SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).setFeatureValue(EObject,
 EStructuralFeature, Object, int) line: 2413   
        
SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).setFeatureValue(EObject,
 EStructuralFeature, Object) line: 2403        
        
SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).endElement(String, 
String, String) line: 1344  
        SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.endElement(String, String, 
String) line: 303       
        SAXParser(AbstractSAXParser).endElement(QName, Augmentations) line: 633 
        XMLNSDocumentScannerImpl.scanEndElement() line: 719     
        
XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean)
 line: 1685     
        
XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) 
line: 368        
        JAXPConfiguration(XML11Configuration).parse(boolean) line: 834  
        JAXPConfiguration(XML11Configuration).parse(XMLInputSource) line: 764   
        SAXParser(XMLParser).parse(XMLInputSource) line: 148    
        SAXParser(AbstractSAXParser).parse(InputSource) line: 1242      
        SAXParserImpl(SAXParser).parse(InputSource, DefaultHandler) line: 375   
        SDOXMLResourceImpl$SDOXMLLoadImpl(XMLLoadImpl).load(XMLResource, 
InputSource, Map) line: 265    
        SDOXMLResourceImpl(XMLResourceImpl).doLoad(InputSource, Map) line: 666  
        SDOXMLResourceImpl.doLoad(InputSource, Map) line: 465   
        SDOXMLResourceImpl(XMLResourceImpl).load(InputSource, Map) line: 634    
        XMLDocumentImpl.load(InputSource, String, Object) line: 259     
        XMLDocumentImpl.load(InputStream, String, Object) line: 232     
        XMLHelperImpl.load(InputStream, String, Object) line: 85        
        XMLHelperImpl.load(InputStream) line: 79        
        ExtensibleTestCase.testInfoLoad() line: 73      
        NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
available [native method]  
        NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39      
        DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25  
        Method.invoke(Object, Object...) line: 585      
        ExtensibleTestCase(TestCase).runTest() line: 154        
        ExtensibleTestCase(TestCase).runBare() line: 127        
        TestResult$1.protect() line: 106        
        TestResult.runProtected(Test, Protectable) line: 124    
        TestResult.run(TestCase) line: 109      
        ExtensibleTestCase(TestCase).run(TestResult) line: 118  
        JUnit3TestReference.run(TestExecution) line: 128        
        TestExecution.run(ITestReference[]) line: 38    
        RemoteTestRunner.runTests(String[], String, TestExecution) line: 460    
        RemoteTestRunner.runTests(TestExecution) line: 673      
        RemoteTestRunner.run() line: 386        
        RemoteTestRunner.main(String[]) line: 196       

> Implement support for dynamic subclasses of statically generated types
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-513
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-513
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Implementation
>            Reporter: Ron Gavlin
>             Fix For: Java-SDO-Mx
>
>
> Implement support for dynamic subclasses of statically generated types. See 
> below exerpt from tuscany-user mailing list for details.
> Hi Ron,
> Looking at this, it looks like the problem is that you're trying to create 
> dynamic subclasses of statically generated types. The bad news is that 
> Tuscany doesn't currently support that. The good news is that it's not too 
> hard to add the support.
> The problem is that currently Tuscany only has these two primary 
> DataObject implementation classes:
> 1. DataObjectImpl - is the base class used for statically generated types. 
> It is highly tuned for performance and footprint, so, unlike the base 
> class in SDO1 (actually EMF) it doesn't support dynamic extensions.
> 2. DyamicDataObjectImpl - is the class used to support dynamic SDOs. It is 
> designed for pure dynamic types, not a mixture of static and dynamic.
> To support what you want, we will need another base class, say 
> ExtensibleDataObjectImpl, that is quite similar to DynamicDataObjectImpl, 
> but doesn't make the assumption that eStaticFeatureCount() is 0. My guess 
> is that there are only a few simple method overrides needed in this class. 
> Maybe you would like to try to prototype such a class yourself and hand 
> modify your generated classes to extend from it? If you did that and 
> tested it, you could submit a patch and we could then very quickly add a 
> generator option to use it (maybe even make it the default). If you'd like 
> to help with this, it would be very much appreciated!
> At any rate, you should probably open a JIRA feature request for this.
> Thanks,
> Frank
> > Frank,
> > 
> > I am working with a mixed static/dynamic model similar to the one 
> > listed at the bottom of this post. The http://example.org/ord 
> > namespace is statically registered and has code-generated classes. The 
> > http://example.org/info/zipcode and http://example.org/info/street 
> > namespaces are dynamically registered with no code-generated 
> > classes. When I attempt to load the Sample Instance (chapter04.xml),
> > I receive an UnsupportedOperationException thrown from 
> > DataObjectImpl.setEClass(EClass). The DataObjectImpl throwing the 
> > exception is an instance of "InfoTypeImpl" from the "ord" 
> > namespace/ePackage. The EClass parameter is "InfoType" from the 
> > "zipcode" namespace. This instance document loads fine using EMF/SDO
> > 1.0. Any suggestions I can try to work-around this problem?
> > 
> > - Ron
> > 
> > 
> > Sample Instance (chapter04.xml)
> > <ord:order xmlns:ord="<http://example.org/ord>";
> > xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>";
> > xsi:schemaLocation="<http://example.org/ord> chapter04ord1.xsd">
> > <ord:number>123ABBCC123</ord:number>
> > <ord:customer>
> > <ord:name>Pat Walmsley</ord:name>
> > <ord:number>15465</ord:number>
> > <info xsi:type="ns1:InfoType" xmlns=""
> > xmlns:ns1="<http://example.org/info/zipcode>";>
> > <zipcode>21043</zipcode>
> > </info>
> > </ord:customer>
> > <ord:customer>
> > <ord:name>Priscilla Walmsley</ord:name>
> > <ord:number>15466</ord:number>
> > <info xsi:type="ns1:InfoType" xmlns=""
> > xmlns:ns1="<http://example.org/info/street>";>
> > <street>341 Duckworth Way</street>
> > </info>
> > </ord:customer>
> > <ord:items>
> > <product>
> > <number>557</number>
> > <name>Short-Sleeved Linen Blouse</name>
> > <size system="US-DRESS">10</size>
> > <color value="blue"/>
> > </product>
> > </ord:items>
> > </ord:order>
> > Schema Document 1 (chapter04ord1.xsd)
> > <xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema>";;
> >            targetNamespace="<http://example.org/ord>";;
> >            xmlns="<http://example.org/ord>";;
> >            xmlns:prod="<http://example.org/prod>";;
> >            elementFormDefault="qualified">
> > <xsd:import namespace="<http://example.org/prod>";;
> > schemaLocation="chapter04prod.xsd"/>
> >  <xsd:simpleType name="OrderNumType">
> >    <xsd:restriction base="xsd:string"/>
> >  </xsd:simpleType>
> >  <xsd:complexType name="InfoType"/>
> >  <xsd:complexType name="CustomerType">
> >    <xsd:sequence>
> >      <xsd:element name="name" type="CustNameType"/>
> >      <xsd:element name="number" type="xsd:integer"/>
> >      <xsd:element name="info" type="InfoType" form="unqualified"/>
> >    </xsd:sequence>
> >  </xsd:complexType>
> >  <xsd:simpleType name="CustNameType">
> >    <xsd:restriction base="xsd:string"/>
> >  </xsd:simpleType>
> >  <xsd:element name="order" type="OrderType"/>
> >  <xsd:complexType name="OrderType">
> >    <xsd:sequence>
> >      <xsd:element name="number" type="OrderNumType"/>
> >      <xsd:element name="customer" type="CustomerType" 
> >           maxOccurs="unbounded"/>
> >                <xsd:element name="items" type="prod:ItemsType"/>
> >    </xsd:sequence>
> >  </xsd:complexType>
> > </xsd:schema>
> > Schema Document 2 (chapter04infozipcode.xsd)
> > <xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema>";;
> >            xmlns:ord="<http://example.org/ord>";;
> >            xmlns="<http://example.org/info/zipcode>";;
> >            targetNamespace="<http://example.org/info/zipcode>";;
> >            elementFormDefault="unqualified">
> > <xsd:import namespace="<http://example.org/ord>";;
> > schemaLocation="chapter04ord1.xsd"/>
> >  <xsd:complexType name="InfoType">
> >      <xsd:complexContent>
> >         <xsd:extension base="ord:InfoType">
> >            <xsd:sequence>
> >               <xsd:element name="zipcode" type="xsd:string"/>
> >            </xsd:sequence>
> >         </xsd:extension>
> >      </xsd:complexContent>
> >  </xsd:complexType>
> > </xsd:schema>
> > Schema Document 3 (chapter04infostreet.xsd)
> > <xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema>";;
> >            xmlns:ord="<http://example.org/ord>";;
> >            xmlns="<http://example.org/info/street>";;
> >            targetNamespace="<http://example.org/info/street>";;
> >            elementFormDefault="unqualified">
> > <xsd:import namespace="<http://example.org/ord>";;
> > schemaLocation="chapter04ord1.xsd"/>
> >  <xsd:complexType name="InfoType">
> >      <xsd:complexContent>
> >         <xsd:extension base="ord:InfoType">
> >            <xsd:sequence>
> >               <xsd:element name="street" type="xsd:string"/>
> >            </xsd:sequence>
> >         </xsd:extension>
> >      </xsd:complexContent>
> >  </xsd:complexType>
> > </xsd:schema>
> > Schema Document 4 (chapter04prod.xsd)
> > <xsd:schema xmlns:xsd="<http://www.w3.org/2001/XMLSchema>";;
> >            xmlns="<http://example.org/prod>";;
> >            targetNamespace="<http://example.org/prod>";;
> >            elementFormDefault="unqualified">
> >  <xsd:complexType name="ItemsType">
> >    <xsd:sequence>
> >      <xsd:element name="product" type="ProductType"/>
> >    </xsd:sequence>
> >  </xsd:complexType>
> >  <xsd:complexType name="ProductType">
> >    <xsd:sequence>
> >      <xsd:element name="number" type="xsd:integer"/>
> >      <xsd:element name="name" type="xsd:string"/>
> >      <xsd:element name="size" type="SizeType"/>
> >      <xsd:element name="color" type="ColorType"/>
> >    </xsd:sequence>
> >  </xsd:complexType>
> >  <xsd:complexType name="SizeType">
> >    <xsd:simpleContent>
> >      <xsd:extension base="xsd:integer">
> >        <xsd:attribute name="system" type="xsd:string"/>
> >      </xsd:extension>
> >    </xsd:simpleContent>
> >  </xsd:complexType>
> >  <xsd:complexType name="ColorType">
> >    <xsd:attribute name="value" type="xsd:string"/>
> >  </xsd:complexType>
> > </xsd:schema>
> > 

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