db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/jdori/org/apache/ojb/jdori/sql OjbStoreConnector.java
Date Sat, 24 Jan 2004 11:08:19 GMT
thma        2004/01/24 03:08:19

  Modified:    src/jdori/org/apache/ojb/jdori/sql OjbStoreConnector.java
  Log:
  Apply patch provides by Gus Heck. If no Transaction in progress, throw an explanatory JDOUserException
and no a vanilla NPE!
  
  Revision  Changes    Path
  1.2       +5 -0      db-ojb/src/jdori/org/apache/ojb/jdori/sql/OjbStoreConnector.java
  
  Index: OjbStoreConnector.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/jdori/org/apache/ojb/jdori/sql/OjbStoreConnector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OjbStoreConnector.java	24 Dec 2002 12:06:01 -0000	1.1
  +++ OjbStoreConnector.java	24 Jan 2004 11:08:19 -0000	1.2
  @@ -54,6 +54,7 @@
    */
   
   import javax.jdo.JDODataStoreException;
  +import javax.jdo.JDOUserException;
   
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerFactory;
  @@ -214,6 +215,10 @@
        */
       public PersistenceBroker getBroker()
       {
  +    	if (broker == null)
  +    	{
  +    		throw new JDOUserException("No transaction in progress.");
  +    	}
           return broker;
       }
   
  
  
  

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


Mime
View raw message