tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Fri, 29 Oct 2004 14:01:20 GMT
yoavs       2004/10/29 07:01:20

  Modified:    catalina/src/share/org/apache/catalina/core Tag: TOMCAT_5_0
                        NamingContextListener.java
               webapps/docs Tag: TOMCAT_5_0 changelog.xml
  Log:
  Bugzilla 31851: UserTransaction in DefaultContext broken.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.6.2.1   +22 -16    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
  
  Index: NamingContextListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- NamingContextListener.java	27 Feb 2004 14:58:42 -0000	1.6
  +++ NamingContextListener.java	29 Oct 2004 14:01:20 -0000	1.6.2.1
  @@ -695,21 +695,6 @@
               addEjb(ejbs[i]);
           }
   
  -        // Binding a User Transaction reference
  -        if (container instanceof Context) {
  -            try {
  -                Reference ref = new TransactionRef();
  -                compCtx.bind("UserTransaction", ref);
  -                addAdditionalParameters
  -                    (namingResources, ref, "UserTransaction");
  -            } catch (NameAlreadyBoundException e) {
  -                // Ignore because UserTransaction was obviously 
  -                // added via ResourceLink
  -            } catch (NamingException e) {
  -                log(sm.getString("naming.bindFailed", e));
  -            }
  -        }
  -
           // Binding the resources directory context
           if (container instanceof Context) {
               try {
  @@ -860,6 +845,20 @@
               log(sm.getString("naming.bindFailed", e));
           }
   
  +        if (container instanceof Context && 
  +            "UserTransaction".equals(resource.getName())) {
  +          try {
  +            Reference ref2 = new TransactionRef();
  +            compCtx.bind("UserTransaction", ref2);
  +            addAdditionalParameters
  +                (resource.getNamingResources(), ref2, "UserTransaction");
  +          } catch (NameAlreadyBoundException e) {
  +            // Ignore because UserTransaction was obviously 
  +            // added via ResourceLink
  +          } catch (NamingException e) {
  +            log(sm.getString("naming.bindFailed", e));
  +          }
  +        }
       }
   
   
  @@ -963,6 +962,13 @@
               log(sm.getString("naming.unbindFailed", e));
           }
   
  +        if ("UserTransaction".equals(name)) {
  +          try {
  +            compCtx.unbind(name);
  +          } catch (NamingException e) {
  +            log(sm.getString("naming.unbindFailed", e));
  +          }
  +        } 
       }
   
   
  
  
  
  No                   revision
  No                   revision
  1.70.2.65 +3 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.70.2.64
  retrieving revision 1.70.2.65
  diff -u -r1.70.2.64 -r1.70.2.65
  --- changelog.xml	29 Oct 2004 13:37:45 -0000	1.70.2.64
  +++ changelog.xml	29 Oct 2004 14:01:20 -0000	1.70.2.65
  @@ -49,6 +49,9 @@
         <update>
           <bug>31683</bug>: Minor clarifications to realm documentation. (yoavs)
         </update>
  +      <fix>
  +        <bug>31851</bug>: UserTransaction in DefaultContext broken. (yoavs)
  +      </fix>
       </changelog>
     </subsection>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message