You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2007/02/08 00:12:05 UTC

[jira] Assigned: (TUSCANY-1094) SDOUtil.registerStaticTypes() used in ImportSDOLoader.java has been deprecated

     [ https://issues.apache.org/jira/browse/TUSCANY-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-1094:
-------------------------------------

    Assignee: Raymond Feng

> SDOUtil.registerStaticTypes() used in ImportSDOLoader.java has been deprecated
> ------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1094
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1094
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-SCA-M3
>            Reporter: Fuhwei Lwo
>         Assigned To: Raymond Feng
>             Fix For: Java-SCA-M3
>
>
> SDOUtil.registerStaticTypes(Class factoryClass) has been replaced by
> HelperContext hc = HelperProvider.getDefaultContext();
> SimpleFactory.INSTANCE.register(hc);  // SimpleFactory is generated SDO class
> * Below is the code from ImportSDOLoader.java
> private void importFactory(XMLStreamReader reader, DeploymentContext deploymentContext) throws LoaderException {
>         String factoryName = reader.getAttributeValue(null, "factory");
>         if (factoryName != null) {
>             ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
>             try {
>                 // set TCCL as SDO needs it
>                 ClassLoader cl = deploymentContext.getClassLoader();
>                 Thread.currentThread().setContextClassLoader(cl);
>                 Class<?> factoryClass = cl.loadClass(factoryName);
>                 // FIXME: We require the SDO to provide an API to register
>                 // static types in a given TypeHelper
>                 SDOUtil.registerStaticTypes(factoryClass);
>             } catch (ClassNotFoundException e) {
>                 throw new LoaderException(e.getMessage(), e);
>             } finally {
>                 Thread.currentThread().setContextClassLoader(oldCL);
>             }
>         }
>     }

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org