[
https://issues.apache.org/jira/browse/TUSCANY-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhenghui Lee updated TUSCANY-1051:
----------------------------------
Attachment: helloworldGroovy.zip
groovy.patch.jar
> Grovvy classloader is not being initialized correctly
> -----------------------------------------------------
>
> Key: TUSCANY-1051
> URL: https://issues.apache.org/jira/browse/TUSCANY-1051
> Project: Tuscany
> Issue Type: Bug
> Affects Versions: Java-Mx
> Environment: IDE: eclipse3.2.1+SVN plugin
> OS: win2k
> JDK:jdk1.5.0_09
> Reporter: Zhenghui Lee
> Fix For: Java-Mx
>
> Attachments: groovy.patch.jar, helloworldGroovy.zip
>
>
> Per antelder said in mail listing, the detailed info this issue is below:
> In the GroovyComponentBuilder the ClassLoader from the DeploymentContext is
> the wrong one to be using, its null as we have seen. It really wants the
> application ClassLoader which is available in the DeploymentContext passed
> into the load method of the ImplementationLoader class in the Groovy
> package. I think what needs to happen is GroovyImplementation should have a
> ClassLoader field added with getter/setters, the
> ImplementationLoader.loadmethod should set the Classloader on the
> GroovyImplementation from the
> DeploymentContext, then the GroovyComponentBuilder should create the
> GroovyClassLoader using the ClassLoader from the GroovyImplementation (the
> implementation variable) instead of the DeploymentContext.
> I am trying to provide a draft patch here, the related java source code is
> here:
> 1.ImplementationLoader.java : add two fields with getter/setters.
> applicationLoader, this will be used for construct
> GroovyClassloader
> scriptResourceName, this is script resource name, will be used
> for generate side file name (componentType)
> 2. ImplementationLoader.loader()
> add following statement:
>
> implementation.setApplicationLoader(deploymentContext.getClassLoader());
> implementation.setScriptResourceName(script);
> 3. GroovyComponentBuilder.build
> groovyClassLoader = new
> GroovyClassLoader(implementation.getApplicationLoader());
> 4. GroovyComponentType.java
> Adding two constructor method , it is similar with what did
> in javaScriptComponentType
> 5. GroovyComponentTypeLoader.java
> adding sild file(ComponentType) support, just like what we
> have in JavaScript.
> TODO: i did not implement "loadFromIntrospection" now, I am not
> sure whether it will use the same logic as javaScript. So mark it as TODO
> section in this patch now.
> 6. GroovyComponentTypeLoaderTestCase
> enhancement due to corresponding modification above.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]