1. Some of the transformers are used to convert the XML value of SCA properties into the java type. We use JAXB for both simple java types and complex types. The commented out transformers in the databinding module uses java reflections to deal with Java/DOM conversion and they don't follow a standard Java/XML mapping rules. To get around the Google App Engine restrictions on JAXB [1], you can enable them with a higher weight like 90000 so that the JAXB ones take precedence.

2. The Java InterfaceVisitor, ClassVisitor and some data transformers are added to the related extension points by code in the Module Activators. This creates code dependencies in the core-databinding module. We should turn them into declarative extensions.

Thanks,
Raymond

--------------------------------------------------
From: "Luciano Resende" <[email protected]>
Sent: Monday, October 05, 2009 9:17 PM
To: "tuscany-dev" <[email protected]>
Subject: Issues running Tuscany applications in Google AppEngine

Below are the list of issues I found while getting the store scenario
working in Google AppEngine:

- The JSON-RPC Binding is using Commons HTTP Client, which spawn
threads which is not allowed in the AppEngine environment. I have a
local version of the binding using only URLOpenConnection, but it
would be good if we could have a extension point and provide a way to
plug a alternative implementation that is single threaded.

- The JSON-RPC reference wasn't properly setting the JSON databinding
in the service contract, which I have fixed and will be committing
this soon.

- The JAXBContext is a restricted class in the Google AppEngine
environment, to avoid application loading issues I had to remove
tuscany-databinding-jaxb and tuscany-interface-java-jaxws dependencies
from my application, which were causing databinding problems as
core-databinding have hard dependencies on processors from these
modules. We should revisit this and make things more flexible :

--- a/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java +++ b/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java
@@ -50,7 +50,7 @@ public class DataBindingModuleActivator implements
ModuleActivator {
        DataBindingExtensionPoint dataBindings =
registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers =
registry.getExtensionPoint(TransformerExtensionPoint.class);

-        XMLAdapterExtensionPoint xmlAdapterExtensionPoint =
registry.getExtensionPoint(XMLAdapterExtensionPoint.class);
+        //XMLAdapterExtensionPoint xmlAdapterExtensionPoint =
registry.getExtensionPoint(XMLAdapterExtensionPoint.class);

        FaultExceptionMapper faultExceptionMapper =
registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(FaultExceptionMapper.class);

@@ -82,10 +82,10 @@ public class DataBindingModuleActivator implements
ModuleActivator {
        FactoryExtensionPoint modelFactories =
registry.getExtensionPoint(FactoryExtensionPoint.class);
        JavaInterfaceFactory javaFactory =
modelFactories.getFactory(JavaInterfaceFactory.class);
// Add the WebServiceInterfaceProcessor to mark the interface remotable - javaFactory.addInterfaceVisitor(new WebServiceInterfaceProcessor()); + //javaFactory.addInterfaceVisitor(new WebServiceInterfaceProcessor());
        // Introspect the data types
        javaFactory.addInterfaceVisitor(new
DataBindingJavaInterfaceProcessor(dataBindings));
-        javaFactory.addInterfaceVisitor(new
JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper,
xmlAdapterExtensionPoint));
+        //javaFactory.addInterfaceVisitor(new
JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper,
xmlAdapterExtensionPoint));
        javaFactory.addInterfaceVisitor(new
WrapperJavaInterfaceProcessor(dataBindings));

        RuntimeWireProcessorExtensionPoint
wireProcessorExtensionPoint =
registry.getExtensionPoint(RuntimeWireProcessorExtensionPoint.class);


- Several commented out databindings transformers had to be re-enabled
in order to properly transform to and from JSON. Enable all commented
databindings from
/modules/databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer.
Can we get them enabled with a lower/different weight so applications
without JAXB databinding just works ?

- Management classes are restricted in Google AppEngine environment,
and some of these classes are used by NodeImpl which is already
annotated with [FIXME] tags from Raymond. We should revisit this, but
it looks like commenting these management related code out of nodeImpl
had no visible side-effect.

--
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to