portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/rdbms/src/java/org/apache/jetspeed/components/util DatasourceTestCase.java
Date Thu, 27 May 2004 19:38:09 GMT
weaver      2004/05/27 12:38:09

  Modified:    components/rdbms/src/java/org/apache/jetspeed/components/util
                        DatasourceTestCase.java
  Log:
  stopping the DS was causing issues.  It appears that even if I closed a PersistenceBroker
in OJB
  (which I do in the PersistenceSupportedTestCase) OJB itslef still hangs on to an instance
of the previous
  , which was being closed in tearDown, instead of re-grabbing from the JNDI.
  
  Revision  Changes    Path
  1.3       +4 -5      jakarta-jetspeed-2/components/rdbms/src/java/org/apache/jetspeed/components/util/DatasourceTestCase.java
  
  Index: DatasourceTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/rdbms/src/java/org/apache/jetspeed/components/util/DatasourceTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DatasourceTestCase.java	20 May 2004 23:34:05 -0000	1.2
  +++ DatasourceTestCase.java	27 May 2004 19:38:09 -0000	1.3
  @@ -30,6 +30,7 @@
   {
   
       protected BoundDBCPDatasourceComponent datasourceComponent;
  +    protected JNDIComponent jndi;
       /**
        * 
        */
  @@ -55,7 +56,7 @@
       protected void setUp() throws Exception
       {        
           super.setUp();
  -        JNDIComponent jndi = new TyrexJNDIComponent();
  +        jndi = new TyrexJNDIComponent();
           String url = System.getProperty("org.apache.jetspeed.database.url");
           String driver = System.getProperty("org.apache.jetspeed.database.driver");
           String user = System.getProperty("org.apache.jetspeed.database.user");
  @@ -69,10 +70,8 @@
        */
       protected void tearDown() throws Exception
       {
  -        if(datasourceComponent != null)
  -        {
  -            datasourceComponent.stop();
  -        }
  +        jndi.unbindFromCurrentThread();
           super.tearDown();
       }
  +    
   }
  
  
  

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


Mime
View raw message