You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2004/10/13 18:11:36 UTC

cvs commit: jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/datastore XConnectionPool.java

pnever      2004/10/13 09:11:36

  Modified:    proposals/tamino/etc/ant globals.xml misc.xml tomcat.xml
                        webapp.xml
               proposals/tamino/etc/urm OS.xml.template
               proposals/tamino/src/urm/org/apache/slide/urm/common/impl/tamino
                        URMTaminoConnectionHandler.java
               proposals/tamino/src/store/org/apache/slide/store/tamino/datastore
                        XConnectionPool.java
  Log:
  Adapted to JDOM_1.0 and compliant TaminoApi4J
  
  Revision  Changes    Path
  1.4       +1 -0      jakarta-slide/proposals/tamino/etc/ant/globals.xml
  
  Index: globals.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/etc/ant/globals.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- globals.xml	23 Sep 2004 16:50:49 -0000	1.3
  +++ globals.xml	13 Oct 2004 16:11:35 -0000	1.4
  @@ -116,6 +116,7 @@
   <path id="urm.ct">
       <path refid="util.ct"/>
       <pathelement location="${tamino.jar}"/>
  +    <pathelement location="${taminoJdom.jar}"/>
       <pathelement location="${log4j.jar}"/>
   </path>
   <path id="urm.rt">
  
  
  
  1.3       +1 -0      jakarta-slide/proposals/tamino/etc/ant/misc.xml
  
  Index: misc.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/etc/ant/misc.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- misc.xml	1 Apr 2004 13:06:58 -0000	1.2
  +++ misc.xml	13 Oct 2004 16:11:35 -0000	1.3
  @@ -25,6 +25,7 @@
       <jinx>cp = Codeguide.pathCreate</jinx>
   
       <jinx>Codeguide.pathAdd cp tamino.jar</jinx>
  +    <jinx>Codeguide.pathAdd cp taminoJdom.jar</jinx>
   
       <jinx>Codeguide.pathAdd cp easymock.jar</jinx>
       <jinx>Codeguide.pathAdd cp jta.jar</jinx>
  
  
  
  1.4       +1 -0      jakarta-slide/proposals/tamino/etc/ant/tomcat.xml
  
  Index: tomcat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/etc/ant/tomcat.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tomcat.xml	7 Apr 2004 11:16:00 -0000	1.3
  +++ tomcat.xml	13 Oct 2004 16:11:35 -0000	1.4
  @@ -90,6 +90,7 @@
       <antcall target="urmrealm.jar"/>
       <copy todir="${tomcat.patched}/common/lib" file="${jdom.jar}"/>
       <copy todir="${tomcat.patched}/common/lib" file="${tamino.jar}"/>
  +    <copy todir="${tomcat.patched}/common/lib" file="${taminoJdom.jar}"/>
       <copy todir="${tomcat.patched}/common/lib" file="${log4j.jar}"/>
   
       <!-- Without this, you get "no appenders could be found" warnings: -->
  
  
  
  1.4       +1 -0      jakarta-slide/proposals/tamino/etc/ant/webapp.xml
  
  Index: webapp.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/etc/ant/webapp.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- webapp.xml	23 Sep 2004 13:40:45 -0000	1.3
  +++ webapp.xml	13 Oct 2004 16:11:36 -0000	1.4
  @@ -36,6 +36,7 @@
       <copy todir="${webapp.lib}" file="${slide.webdavlib.jar}"/>
   
       <copy todir="${webapp.lib}" file="${tamino.jar}"/>
  +    <copy todir="${webapp.lib}" file="${taminoJdom.jar}"/>
   
       <copy todir="${webapp.lib}" file="${jdom.jar}"/>
       <copy todir="${webapp.lib}" file="${jaxen.jar}"/>
  
  
  
  1.2       +1 -1      jakarta-slide/proposals/tamino/etc/urm/OS.xml.template
  
  Index: OS.xml.template
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/etc/urm/OS.xml.template,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OS.xml.template	25 Mar 2004 16:17:58 -0000	1.1
  +++ OS.xml.template	13 Oct 2004 16:11:36 -0000	1.2
  @@ -10,7 +10,7 @@
               <Attribute name="nativeLogFile" value="logs/webdavrealmnativeuserdb.log" description="The log file name for the logging of the user DB library. The global 'ssx_userdb_global_errors.log' file (which located in the default temp directory) will be used if the log ability is turned on and the logging to the specified logfile is not possible."/>
               <Attribute name="nativeLogLevel" value="0" description="The valid value range is between 1 and 6. If 0 or not defined than there will be no logging."/>
               <!--Attribute name="defaultGroup" value="group name" description="Each group will belong to this group."/-->
  -            <Attribute name="${defaultDomain}" description="It will be used for OS authentication if the domain is not specified explicit in a method call."/>
  +            <!--Attribute name="${defaultDomain}" description="It will be used for OS authentication if the domain is not specified explicit in a method call."/-->
           </Attributes>
           <!-- If the Administrator is not defined here than there should be a default one -->
           <Administrator>
  
  
  
  1.4       +15 -5     jakarta-slide/proposals/tamino/src/urm/org/apache/slide/urm/common/impl/tamino/URMTaminoConnectionHandler.java
  
  Index: URMTaminoConnectionHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/src/urm/org/apache/slide/urm/common/impl/tamino/URMTaminoConnectionHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- URMTaminoConnectionHandler.java	30 Jul 2004 06:52:14 -0000	1.3
  +++ URMTaminoConnectionHandler.java	13 Oct 2004 16:11:36 -0000	1.4
  @@ -483,7 +483,12 @@
   
         if (mConnectionPoolManager == null) {
             // Get the Pool Manager
  -          mConnectionPoolManager = TConnectionPoolManager.getInstance();
  +          try {
  +              mConnectionPoolManager = TConnectionPoolManager.getInstance();
  +          }
  +          catch (TConnectionNotAvailableException e) {
  +              throw new URMConnectionException(e);
  +          }
             // Build a descriptor for my pool
             TConnectionPoolDescriptor descriptor = new TConnectionPoolDescriptor();
             descriptor.setDatabaseURI( mDatabaseUri );
  @@ -497,7 +502,12 @@
   //          descriptor.setIsolationDegree( TIsolationDegree.COMMITTED_COMMAND );
             descriptor.setNonActivityTimeout( mConnPoolTimeout.intValue() );
             // create the pool
  -          mConnectionPoolManager.addConnectionPool( poolName,descriptor );
  +          try {
  +              mConnectionPoolManager.addConnectionPool( poolName,descriptor );
  +          }
  +          catch (TServerNotAvailableException e) {
  +              throw new URMConnectionException(e);
  +          }
         }
          
          try {
  
  
  
  1.4       +14 -7     jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/datastore/XConnectionPool.java
  
  Index: XConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/datastore/XConnectionPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XConnectionPool.java	30 Jul 2004 06:51:54 -0000	1.3
  +++ XConnectionPool.java	13 Oct 2004 16:11:36 -0000	1.4
  @@ -39,6 +39,7 @@
   import org.apache.slide.store.tamino.common.XDatastoreException;
   import org.apache.slide.util.ClassName;
   import org.apache.slide.util.XAssertionFailed;
  +import com.softwareag.tamino.db.api.connection.TConnectionNotAvailableException;
   
   /**
    * Holds a bunch of XConnections using TConnectionPool. If a connection
  @@ -101,8 +102,14 @@
        * private constructor
        */
       private XConnectionPool () {
  -        if (useTConnectionPool)
  -            theCpManager = TConnectionPoolManager.getInstance();
  +        if (useTConnectionPool) {
  +            try {
  +                theCpManager = TConnectionPoolManager.getInstance();
  +            }
  +            catch (TConnectionNotAvailableException e) {
  +                throw new IllegalStateException(e.getMessage());
  +            }
  +        }
       }
   
   
  @@ -125,7 +132,7 @@
        *                    from Domain.xml
        *
        */
  -    private void createTConnectionPool (XConnectionKey conKey) {
  +    private void createTConnectionPool (XConnectionKey conKey) throws TException {
           if( logger.isLoggable(Level.FINE) )
               logger.entering( CLASSNAME, "createTConnectionPool", new Object[] {conKey} );
   
  
  
  

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