User: d_jencks
  Date: 01/11/27 17:36:08

  Modified:    src/main/org/jboss/resource ConnectionFactoryLoader.java
  Log:
  Made jndi binding work on nested subcontexts
  
  Revision  Changes    Path
  1.16      +5 -21     jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoader.java
  
  Index: ConnectionFactoryLoader.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoader.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ConnectionFactoryLoader.java      2001/11/26 06:35:12     1.15
  +++ ConnectionFactoryLoader.java      2001/11/28 01:36:08     1.16
  @@ -45,6 +45,7 @@
   
   import org.jboss.logging.Logger;
   import org.jboss.logging.log4j.CategoryWriter;
  +import org.jboss.naming.Util;
   import org.jboss.resource.security.PrincipalMapping;
   import org.jboss.system.ServiceMBeanSupport;
   
  @@ -61,7 +62,7 @@
    * @author     <a href="[EMAIL PROTECTED]">Toby Allsopp</a>
    * @author     <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
    * @see        RARDeployer
  - * @version    $Revision: 1.15 $ <p>
  + * @version    $Revision: 1.16 $ <p>
    *
    *      <b>Revisions:</b> <p>
    *
  @@ -443,12 +444,8 @@
      // Private -------------------------------------------------------
   
      /**
  -    *  Does the actual work of configuring a connection factory. Because this is
  -    *  invoked from a notification handler, it makes no sense to propagate
  -    *  exceptions, so we handle all checked exceptions in the body of this
  -    *  method.
  -    *
  -    * @param  metaData  Description of Parameter
  +    *  Does the actual work of configuring a connection factory.
  +    * This could now throw exceptions since it is no longer called from a 
notification.
       */
      private void loadConnectionFactory()
      {
  @@ -515,8 +512,6 @@
         try
         {
            parseProperties(mcfProps, mcfProperties);
  -         //mcfProps.load(
  -         //new ByteArrayInputStream(mcfProperties.getBytes("ISO-8859-1")));
         }
         catch (IOException ioe)
         {
  @@ -651,17 +646,6 @@
         // Find the connection manager factory
   
         ConnectionManagerFactory cmf;
  -      /*try
  -      {
  -         cmf = (ConnectionManagerFactory)ctx.lookup("java:/" + cmfName);
  -      }
  -      catch (Exception e)
  -      {
  -         log.error("Unable to find connection manager factory at 'java:/" +
  -               cmfName + "'", e);
  -         return;
  -      }
  -      */
         try 
         {
            cmf = (ConnectionManagerFactory)server.getAttribute(cmfLoaderName, 
"ConnectionManagerFactory");
  @@ -735,7 +719,7 @@
               null));
         try
         {
  -         ctx.bind(bindName, cf);
  +         Util.bind(ctx, bindName, cf);
            log.info("Bound connection factory for resource adapter '" +
                  resourceAdapterName + "' to JNDI name '" + bindName + "'");
         }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to