db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/singlevm PersistenceBrokerConfiguration.java
Date Fri, 11 Apr 2003 22:27:21 GMT
arminw      2003/04/11 15:27:20

  Modified:    src/test/org/apache/ojb/odmg ScrollableQueryResultsTest.java
               src/test/org/apache/ojb/broker BrokerExamples.java
               src/java/org/apache/ojb/broker/util BrokerHelper.java
               src/java/org/apache/ojb/broker/util/configuration/impl
                        OjbConfiguration.java
               src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerConfiguration.java
  Log:
  remove some of the obsolete serverMode stuff
  
  Revision  Changes    Path
  1.16      +2 -7      db-ojb/src/test/org/apache/ojb/odmg/ScrollableQueryResultsTest.java
  
  Index: ScrollableQueryResultsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/ScrollableQueryResultsTest.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ScrollableQueryResultsTest.java	5 Feb 2003 20:04:40 -0000	1.15
  +++ ScrollableQueryResultsTest.java	11 Apr 2003 22:27:20 -0000	1.16
  @@ -311,12 +311,7 @@
        */
       public void testGetSomeC() throws Exception
       {
  -        // only perform this test in singlevm mode
  -        if (((PersistenceBrokerConfiguration) PersistenceBrokerFactory.getConfigurator().getConfigurationFor(null)).
  -                isRunningInServerMode())
  -        {
  -            return;
  -        }
  +
           Implementation odmg = OJB.getInstance();
           Database db = odmg.newDatabase();
           db.open(databaseName, Database.OPEN_READ_WRITE);
  
  
  
  1.13      +8 -12     db-ojb/src/test/org/apache/ojb/broker/BrokerExamples.java
  
  Index: BrokerExamples.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/BrokerExamples.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BrokerExamples.java	19 Feb 2003 22:13:27 -0000	1.12
  +++ BrokerExamples.java	11 Apr 2003 22:27:20 -0000	1.13
  @@ -152,8 +152,7 @@
           {
               fail(e.getMessage());
           }
  -        if (!config.isRunningInServerMode())
  -        {
  +
               Article tmpArticle = createArticle(testId);
               Identity tmpOID = new Identity(tmpArticle, broker);
               broker.store(tmpArticle);
  @@ -165,7 +164,7 @@
               cached = (Article) broker.serviceObjectCache().lookup(tmpOID);
               assertNotNull("now object should be found in cache", cached);
               assertEquals("should be same reference", cached, article);
  -        }
  +
       }
   
       /**
  @@ -210,8 +209,7 @@
           {
               fail(e.getMessage());
           }
  -        if (!config.isRunningInServerMode())
  -        {
  +
               try
               {
                   // ensure there is an item to find
  @@ -245,7 +243,7 @@
                   e.printStackTrace();
                   throw e;
               }
  -        }
  +
       }
   
   
  @@ -268,8 +266,7 @@
           {
               fail(e.getMessage());
           }
  -        if (!config.isRunningInServerMode())
  -        {
  +
               // ensure there is an item to find
               Article tmpArticle = createArticle(testId);
               Identity tmpOID = new Identity(tmpArticle, broker);
  @@ -296,7 +293,7 @@
               ord.setCascadeRetrieve(true);
               // should work without setting cld
               // broker.setClassDescriptor(cld);
  -        }
  +
       }
   
       /**
  @@ -318,8 +315,7 @@
           {
               fail(e.getMessage());
           }
  -        if (!config.isRunningInServerMode())
  -        {
  +
               // ensure there is an item to find
               Article tmpArticle = createArticle(testId);
               Identity tmpOID = new Identity(tmpArticle, broker);
  @@ -345,6 +341,6 @@
               ord.setCascadeRetrieve(true);
               // should work without setting cld
               // broker.setClassDescriptor(cld);
  -        }
  +
       }
   }
  
  
  
  1.17      +4 -3      db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java
  
  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BrokerHelper.java	12 Mar 2003 11:08:48 -0000	1.16
  +++ BrokerHelper.java	11 Apr 2003 22:27:20 -0000	1.17
  @@ -155,8 +155,9 @@
   
       public static boolean isRunningInServerMode()
       {
  -        return ((PersistenceBrokerConfiguration) PersistenceBrokerFactory.
  -                getConfigurator().getConfigurationFor(null)).isRunningInServerMode();
  +//        return ((PersistenceBrokerConfiguration) PersistenceBrokerFactory.
  +//                getConfigurator().getConfigurationFor(null)).isRunningInServerMode();
  +        return false;
       }
   
   
  
  
  
  1.25      +1 -17     db-ojb/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
  
  Index: OjbConfiguration.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- OjbConfiguration.java	15 Mar 2003 08:51:19 -0000	1.24
  +++ OjbConfiguration.java	11 Apr 2003 22:27:20 -0000	1.25
  @@ -94,11 +94,8 @@
           PersistenceBrokerConfiguration,
           PBPoolConfiguration, MetadataConfiguration
   {
  -    /** use Server or local broker*/
  -    private boolean serverUsed;
       /** the repository file keeping the O/R Metadata*/
       private String repositoryFilename;
  -    private String[] servers;
       private Class objectCacheClass;
       private String[] objectCacheFilter;
       private Class connectionFactoryClass;
  @@ -145,21 +142,11 @@
           return lockAssociationAsWrites;
       }
   
  -    public boolean isRunningInServerMode()
  -    {
  -        return serverUsed;
  -    }
  -
       public String getRepositoryFilename()
       {
           return repositoryFilename;
       }
   
  -    public String[] getServers()
  -    {
  -        return servers;
  -    }
  -
       public String getLoggerConfigFile()
       {
           return loggerConfigFile;
  @@ -275,10 +262,7 @@
           setFilename(fn);
           super.load();
   
  -        //Usage of local or remote Broker
  -        serverUsed = getBoolean("useServer", false);
           repositoryFilename = getString("repositoryFile", "repository.xml");
  -        servers = getStrings("BrokerServers", "localhost:2001");
   
           // load ObjectCache Class
           objectCacheClass = getClass("ObjectCacheClass", ObjectCacheDefaultImpl.class, ObjectCache.class);
  
  
  
  1.8       +1 -5      db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerConfiguration.java
  
  Index: PersistenceBrokerConfiguration.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerConfiguration.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PersistenceBrokerConfiguration.java	5 Mar 2003 23:52:08 -0000	1.7
  +++ PersistenceBrokerConfiguration.java	11 Apr 2003 22:27:20 -0000	1.8
  @@ -63,10 +63,6 @@
   
   public interface PersistenceBrokerConfiguration
   {
  -    public String[] getServers();
  -
  -    public boolean isRunningInServerMode();
  -
       public Class getConnectionFactoryClass();
   
       public Class getObjectCacheClass();
  
  
  

Mime
View raw message