db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/util BrokerHelper.java
Date Fri, 29 Nov 2002 13:55:17 GMT
arminw      2002/11/29 05:55:17

  Modified:    src/java/org/apache/ojb/broker/util BrokerHelper.java
  Log:
  add helper method isRunningInServerMode()
  
  Revision  Changes    Path
  1.3       +10 -1     jakarta-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java
  
  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BrokerHelper.java	21 Nov 2002 09:42:49 -0000	1.2
  +++ BrokerHelper.java	29 Nov 2002 13:55:17 -0000	1.3
  @@ -55,6 +55,9 @@
    */
   
   import org.apache.ojb.broker.PBKey;
  +import org.apache.ojb.broker.PersistenceBrokerFactory;
  +import org.apache.ojb.broker.singlevm.PersistenceBrokerConfiguration;
  +
   import java.util.StringTokenizer;
   
   
  @@ -89,5 +92,11 @@
           }
           PBKey key = new PBKey(dbName, user, passwd);
           return key;
  +    }
  +
  +    public static boolean isRunningInServerMode()
  +    {
  +        return ((PersistenceBrokerConfiguration) PersistenceBrokerFactory.
  +                getConfigurator().getConfigurationFor(null)).isRunningInServerMode();
       }
   }
  
  
  

Mime
View raw message