Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2649

Add support for ConnectionFactory.newInstance() usage

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 7.1.0.Beta1
    • None
    • JAXR
    • None

    Description

      The TCK checks support for ConnectionFactory.newInstance(). The current implementation in the jaxr api modules is

         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;
         }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              tdiesler@redhat.com Thomas Diesler
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: