db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/src/java/org/apache/torque TorqueInstance.java
Date Sat, 12 Mar 2005 20:08:34 GMT
tfischer    2005/03/12 12:08:34

  Modified:    src/java/org/apache/torque TorqueInstance.java
  Log:
  Check whether Torque is initialized before retrieving a connection
  
  Torque does not throw an obvious error message if it is not initialized and the db is accessed.
  This check should take care of that
  See also issue TRQS288 in scarab
  
  Revision  Changes    Path
  1.10      +8 -3      db-torque/src/java/org/apache/torque/TorqueInstance.java
  
  Index: TorqueInstance.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/TorqueInstance.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TorqueInstance.java	31 Jan 2005 19:43:58 -0000	1.9
  +++ TorqueInstance.java	12 Mar 2005 20:08:34 -0000	1.10
  @@ -51,7 +51,7 @@
    * this class.
    *
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
  - * @author <a href="mailto:magnus@handtolvur.is">Magns r Torfason</a>
  + * @author <a href="mailto:magnus@handtolvur.is">Magn�s ��r Torfason</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
    * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
  @@ -718,7 +718,12 @@
       protected DataSourceFactory getDataSourceFactory(String name)
               throws TorqueException
       {
  -        DataSourceFactory dsf = null;
  +    	if (!Torque.isInit()) 
  +    	{
  +            throw new TorqueException("Torque is not initialized.");    		
  +    	}
  +
  +    	DataSourceFactory dsf = null;
   
           try
           {
  
  
  

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


Mime
View raw message