Re: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox
On 6/8/06, Raymond Feng [EMAIL PROTECTED] wrote: Hi, Jeremy. Here's the patch with correct SVN property settings. Please try again. Thanks, Raymond I'm having problems applying this. I will merge the changes in by hand - please bear with me. -- Jeremy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox
On 6/30/06, Jeremy Boynes [EMAIL PROTECTED] wrote: I'm having problems applying this. I will merge the changes in by hand - please bear with me. It's now applied. -- Jeremy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox
Hi, It's a challenge but it also opens a good opportunity for us the figure out how to align the SCA composition hierarchy with the databinding model scopes. I think there will be two perspectives on both the Tuscany and the databinding sides. 1) How does the databinding framework support the pluggable scoping for its typing system (if it can)? 2) What're the isolation/sharing/visibility rules for the databinding types in the context of the composite hierarchy? BTW, we already started a thread on scoping for SDO types. Thanks, Raymond - Original Message - From: Jeremy Boynes [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, June 08, 2006 7:07 AM Subject: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox Thanks Raymond - I'll work on applying this. I think you've identified a key issue here - how does a databinding's type system mapping work in the new recursive model? In the 0.9 view, modules were flat so it was easy to make the association between a module and a TypeHelper. Recursion opens up new questions such as: * should there be a heirarchy of types to match the hierarchy of composites? * what are the sharing rules for types? Are all types shared between a parent composite and its children? Are none? * if a type is defined in multiple places in a hierarchy, which one is used? Any thoughts on how we would like this to work? -- Jeremy Raymond Feng wrote: Hi, Jeremy. Attached is a patch for the SDO DataBinding code in your sandbox. It ports the code to the new SPIs in the sandbox. Please review and apply. There're several TODOs in the code. We need to understand how to get the corresponding SDO TypeHelper for a given DeploymentContext. Thanks, Raymond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox
Hi, Jeremy. Here's the patch with correct SVN property settings. Please try again. Thanks, Raymond - Original Message - From: Jeremy Boynes [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, June 08, 2006 7:07 AM Subject: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox Thanks Raymond - I'll work on applying this. I think you've identified a key issue here - how does a databinding's type system mapping work in the new recursive model? In the 0.9 view, modules were flat so it was easy to make the association between a module and a TypeHelper. Recursion opens up new questions such as: * should there be a heirarchy of types to match the hierarchy of composites? * what are the sharing rules for types? Are all types shared between a parent composite and its children? Are none? * if a type is defined in multiple places in a hierarchy, which one is used? Any thoughts on how we would like this to work? -- Jeremy Raymond Feng wrote: Hi, Jeremy. Attached is a patch for the SDO DataBinding code in your sandbox. It ports the code to the new SPIs in the sandbox. Please review and apply. There're several TODOs in the code. We need to understand how to get the corresponding SDO TypeHelper for a given DeploymentContext. Thanks, Raymond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Index: src/test/java/org/apache/tuscany/databinding/sdo/ImportSDOLoaderTestCase.java === --- src/test/java/org/apache/tuscany/databinding/sdo/ImportSDOLoaderTestCase.java (revision 412487) +++ src/test/java/org/apache/tuscany/databinding/sdo/ImportSDOLoaderTestCase.java (working copy) @@ -19,7 +19,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.tuscany.core.config.ConfigurationLoadException; +import org.apache.tuscany.spi.loader.LoaderException; /** * @version $Rev$ $Date$ @@ -27,17 +27,17 @@ public class ImportSDOLoaderTestCase extends LoaderTestSupport { private ImportSDOLoader loader; -public void testMinimal() throws XMLStreamException, ConfigurationLoadException { +public void testMinimal() throws XMLStreamException, LoaderException { String xml = import.sdo xmlns='http://www.osoa.org/xmlns/sca/0.9'/; XMLStreamReader reader = getReader(xml); assertNull(loader.load(reader, null)); } -public void testFactory() throws XMLStreamException, ConfigurationLoadException { +public void testFactory() throws XMLStreamException, LoaderException { String xml = import.sdo xmlns='http://www.osoa.org/xmlns/sca/0.9' factory='org.apache.tuscany.databinding.sdo.ImportSDOLoaderTestCase$MockFactory'/; XMLStreamReader reader = getReader(xml); assertFalse(inited); -assertNull(loader.load(reader, loaderContext)); +assertNull(loader.load(reader, deploymentContext)); assertTrue(inited); } Index: src/test/java/org/apache/tuscany/databinding/sdo/LoaderTestSupport.java === --- src/test/java/org/apache/tuscany/databinding/sdo/LoaderTestSupport.java (revision 412487) +++ src/test/java/org/apache/tuscany/databinding/sdo/LoaderTestSupport.java (working copy) @@ -17,36 +17,29 @@ package org.apache.tuscany.databinding.sdo; import java.io.StringReader; + +import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamException; -import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamReader; import junit.framework.TestCase; -import org.apache.tuscany.core.system.assembly.SystemAssemblyFactory; -import org.apache.tuscany.core.system.assembly.impl.SystemAssemblyFactoryImpl; -import org.apache.tuscany.core.loader.LoaderContext; -import org.apache.tuscany.core.loader.assembly.*; -import org.apache.tuscany.core.loader.impl.StAXLoaderRegistryImpl; -import org.apache.tuscany.common.resource.ResourceLoader; -import org.apache.tuscany.common.resource.impl.ResourceLoaderImpl; -import org.apache.tuscany.model.assembly.AssemblyContext; -import org.apache.tuscany.model.assembly.impl.AssemblyContextImpl; +import org.apache.tuscany.core.component.scope.ModuleScopeContainer; +import org.apache.tuscany.core.loader.LoaderRegistryImpl; +import org.apache.tuscany.spi.component.ScopeContainer; +import org.apache.tuscany.spi.deployer.DeploymentContext; + /** * Base class for loader tests with common fixture elements. * * @version $Rev$ $Date$ */ public abstract class LoaderTestSupport extends TestCase { -protected SystemAssemblyFactory assemblyFactory; -protected ResourceLoader resourceLoader; -protected LoaderContext loaderContext; -protected
Re: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox
Sorry, I was supposed to create two patches, one for the update and the other one for the new feature. Here're the splitted patches. Thanks, Raymond - Original Message - From: Jeremy Boynes [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, June 08, 2006 7:07 AM Subject: Type definitions in composites, was: [PATCH] Porting SDO DataBinding to the new SPI in Jeremy's sandbox Thanks Raymond - I'll work on applying this. I think you've identified a key issue here - how does a databinding's type system mapping work in the new recursive model? In the 0.9 view, modules were flat so it was easy to make the association between a module and a TypeHelper. Recursion opens up new questions such as: * should there be a heirarchy of types to match the hierarchy of composites? * what are the sharing rules for types? Are all types shared between a parent composite and its children? Are none? * if a type is defined in multiple places in a hierarchy, which one is used? Any thoughts on how we would like this to work? -- Jeremy Raymond Feng wrote: Hi, Jeremy. Attached is a patch for the SDO DataBinding code in your sandbox. It ports the code to the new SPIs in the sandbox. Please review and apply. There're several TODOs in the code. We need to understand how to get the corresponding SDO TypeHelper for a given DeploymentContext. Thanks, Raymond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]