[jboss-jira] [JBoss JIRA] (AS7-2649) Add support for ConnectionFactory.newInstance() usage

Thomas Diesler (Commented) (JIRA) jira-events at lists.jboss.org
Tue Nov 15 19:24:42 EST 2011


    [ https://issues.jboss.org/browse/AS7-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643139#comment-12643139 ] 

Thomas Diesler commented on AS7-2649:
-------------------------------------

It's been suggested to use global modules like this

{code}
<subsystem xmlns="urn:jboss:domain:ee:1.0">
  <global-modules>
    <module name="org.apache.derby.client" slot="main" />
    <module name="com.sun.ts" slot="main" />
  </global-modules>
</subsystem>
{code}


                
> Add support for ConnectionFactory.newInstance() usage
> -----------------------------------------------------
>
>                 Key: AS7-2649
>                 URL: https://issues.jboss.org/browse/AS7-2649
>             Project: Application Server 7
>          Issue Type: Task
>          Components: JAXR
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>             Fix For: 7.1.0.CR1
>
>
> The TCK checks support for ConnectionFactory.newInstance(). The current implementation in the jaxr api modules is 
> {code}
>    public static ConnectionFactory newInstance() throws JAXRException
>    {
>       String factoryName = null;
>       ConnectionFactory factory = null;
>       try
>       {
>          String defaultName = null;
>          factoryName = System.getProperty(SYS_PROP_NAME, defaultName);
>          ClassLoader loader = Thread.currentThread().getContextClassLoader();
>          Class factoryClass = loader.loadClass(factoryName);
>          factory = (ConnectionFactory) factoryClass.newInstance();
>       }
>       catch(Throwable e)
>       {
>          throw new JAXRException("Failed to create instance of: "+factoryName, e);
>       }
>       return factory;
>    }
> {code}
> This means that the system property would have to be set and that the user of this API actually has a dependency on the module that provides the implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list