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/accesslayer ConnectionFactoryAbstractImpl.java ConnectionFactoryDBCPImpl.java ConnectionFactoryManagedImpl.java ConnectionFactoryNotPooledImpl.java ConnectionFactoryPooledImpl.java ConnectionManagerFactory.java QueryCustomizer.java QueryCustomizerDefaultImpl.java StatementsForClassFactory.java
Date Fri, 26 Mar 2004 09:10:53 GMT
arminw      2004/03/26 01:10:52

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        ConnectionFactoryAbstractImpl.java
                        ConnectionFactoryDBCPImpl.java
                        ConnectionFactoryManagedImpl.java
                        ConnectionFactoryNotPooledImpl.java
                        ConnectionFactoryPooledImpl.java
                        ConnectionManagerFactory.java QueryCustomizer.java
                        QueryCustomizerDefaultImpl.java
                        StatementsForClassFactory.java
  Log:
  - restore javadoc comments (removed by ASL 2.0 update)
  - fix javadoc tags
  
  Revision  Changes    Path
  1.9       +19 -12    db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java
  
  Index: ConnectionFactoryAbstractImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ConnectionFactoryAbstractImpl.java	11 Mar 2004 18:16:06 -0000	1.8
  +++ ConnectionFactoryAbstractImpl.java	26 Mar 2004 09:10:52 -0000	1.9
  @@ -1,5 +1,20 @@
   package org.apache.ojb.broker.accesslayer;
   
  +/* Copyright  2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
   import org.apache.ojb.broker.platforms.PlatformException;
   import org.apache.ojb.broker.platforms.PlatformFactory;
  @@ -16,19 +31,11 @@
   import java.util.HashMap;
   import java.util.Map;
   
  -/* Copyright  2004 The Apache Software Foundation
  +/**
  + * Abstract base class to simplify implementation of {@link ConnectionFactory}'s.
    *
  - * Licensed under the Apache License, Version 2.0 (the "License");
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  - *
  - *     http://www.apache.org/licenses/LICENSE-2.0
  - *
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an "AS IS" BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
    */
   public abstract class ConnectionFactoryAbstractImpl implements ConnectionFactory
   {
  
  
  
  1.8       +21 -11    db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryDBCPImpl.java
  
  Index: ConnectionFactoryDBCPImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryDBCPImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConnectionFactoryDBCPImpl.java	11 Mar 2004 18:16:06 -0000	1.7
  +++ ConnectionFactoryDBCPImpl.java	26 Mar 2004 09:10:52 -0000	1.8
  @@ -1,5 +1,20 @@
   package org.apache.ojb.broker.accesslayer;
   
  +/* Copyright  2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   import org.apache.commons.dbcp.AbandonedConfig;
   import org.apache.commons.dbcp.DriverManagerConnectionFactory;
   import org.apache.commons.dbcp.PoolableConnectionFactory;
  @@ -19,19 +34,14 @@
   import java.util.HashMap;
   import java.util.Map;
   
  -/* Copyright  2004 The Apache Software Foundation
  - *
  - * Licensed under the Apache License, Version 2.0 (the "License");
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  +/**
  + * ConnectionFactory implementation using jakarta-DBCP
  + * to pool driver based connections.
    *
  - *     http://www.apache.org/licenses/LICENSE-2.0
  + * (based on a proposal of Dirk Verbeek - Thanks).
    *
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an "AS IS" BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
    */
   public class ConnectionFactoryDBCPImpl extends ConnectionFactoryAbstractImpl
   {
  
  
  
  1.3       +12 -5     db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryManagedImpl.java
  
  Index: ConnectionFactoryManagedImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryManagedImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectionFactoryManagedImpl.java	11 Mar 2004 18:16:06 -0000	1.2
  +++ ConnectionFactoryManagedImpl.java	26 Mar 2004 09:10:52 -0000	1.3
  @@ -1,10 +1,5 @@
   package org.apache.ojb.broker.accesslayer;
   
  -import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
  -import org.apache.ojb.broker.util.pooling.ByPassConnection;
  -
  -import java.sql.Connection;
  -
   /* Copyright  2004 The Apache Software Foundation
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
  @@ -18,6 +13,18 @@
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
  + */
  +
  +import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
  +import org.apache.ojb.broker.util.pooling.ByPassConnection;
  +
  +import java.sql.Connection;
  +
  +/**
  + * ConnectionFactory for use in managed environments - e.g. jboss.
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
    */
   public class ConnectionFactoryManagedImpl extends ConnectionFactoryNotPooledImpl
   {
  
  
  
  1.4       +14 -7     db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryNotPooledImpl.java
  
  Index: ConnectionFactoryNotPooledImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryNotPooledImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConnectionFactoryNotPooledImpl.java	11 Mar 2004 18:16:06 -0000	1.3
  +++ ConnectionFactoryNotPooledImpl.java	26 Mar 2004 09:10:52 -0000	1.4
  @@ -1,12 +1,5 @@
   package org.apache.ojb.broker.accesslayer;
   
  -import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
  -import org.apache.ojb.broker.util.logging.Logger;
  -import org.apache.ojb.broker.util.logging.LoggerFactory;
  -
  -import java.sql.Connection;
  -import java.sql.SQLException;
  -
   /* Copyright  2004 The Apache Software Foundation
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
  @@ -20,6 +13,20 @@
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
  + */
  +
  +import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
  +import org.apache.ojb.broker.util.logging.Logger;
  +import org.apache.ojb.broker.util.logging.LoggerFactory;
  +
  +import java.sql.Connection;
  +import java.sql.SQLException;
  +
  +/**
  + * Base implementation without connection pooling.
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
    */
   public class ConnectionFactoryNotPooledImpl extends ConnectionFactoryAbstractImpl
   {
  
  
  
  1.9       +21 -12    db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java
  
  Index: ConnectionFactoryPooledImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ConnectionFactoryPooledImpl.java	11 Mar 2004 18:16:06 -0000	1.8
  +++ ConnectionFactoryPooledImpl.java	26 Mar 2004 09:10:52 -0000	1.9
  @@ -1,5 +1,20 @@
   package org.apache.ojb.broker.accesslayer;
   
  +/* Copyright  2004 The Apache Software Foundation
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   import org.apache.commons.pool.BasePoolableObjectFactory;
   import org.apache.commons.pool.ObjectPool;
   import org.apache.commons.pool.PoolableObjectFactory;
  @@ -18,19 +33,13 @@
   import java.util.Iterator;
   import java.util.Map;
   
  -/* Copyright  2004 The Apache Software Foundation
  +/**
  + * Connection factory which pools the requested
  + * connections for different JdbcConnectionDescriptors
  + * using jakarta-commons-pool api.
    *
  - * Licensed under the Apache License, Version 2.0 (the "License");
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  - *
  - *     http://www.apache.org/licenses/LICENSE-2.0
  - *
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an "AS IS" BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>.
  + * @version $Id$
    */
   public class ConnectionFactoryPooledImpl extends ConnectionFactoryAbstractImpl
   {
  
  
  
  1.3       +13 -3     db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerFactory.java
  
  Index: ConnectionManagerFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectionManagerFactory.java	11 Mar 2004 18:16:06 -0000	1.2
  +++ ConnectionManagerFactory.java	26 Mar 2004 09:10:52 -0000	1.3
  @@ -1,8 +1,5 @@
   package org.apache.ojb.broker.accesslayer;
   
  -import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.util.factory.ConfigurableFactory;
  -
   /* Copyright  2004 The Apache Software Foundation
    *
    * Licensed under the Apache License, Version 2.0 (the "License");
  @@ -16,6 +13,19 @@
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
  + */
  +
  +import org.apache.ojb.broker.PersistenceBroker;
  +import org.apache.ojb.broker.util.factory.ConfigurableFactory;
  +
  +/**
  + * Factory for {@link org.apache.ojb.broker.accesslayer.ConnectionManagerIF}
  + * implementations.
  + * <br/>
  + * See also {@link org.apache.ojb.broker.accesslayer.ConnectionFactoryFactory}
  + *
  + * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  + * @version $Id$
    */
   public class ConnectionManagerFactory extends ConfigurableFactory
   {
  
  
  
  1.6       +3 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/QueryCustomizer.java
  
  Index: QueryCustomizer.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/QueryCustomizer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- QueryCustomizer.java	11 Mar 2004 18:16:06 -0000	1.5
  +++ QueryCustomizer.java	26 Mar 2004 09:10:52 -0000	1.6
  @@ -36,7 +36,8 @@
    *
    * If the customized Query is null execution of PB retrieveCollection is skipped
    * and an empty Collection is placed in the relationship attribute.
  - * @see org.apache.ojb.broker.core.PersistenceBrokerImpl#getCollectionByQuery(Class, Query,
boolean)
  + * 
  + * @see org.apache.ojb.broker.PersistenceBroker#getCollectionByQuery
    *
    * @author <a href="mailto:jbraeuchi@hotmail.com">Jakob Braeuchi</a>
    * @version $Id$
  
  
  
  1.4       +6 -6      db-ojb/src/java/org/apache/ojb/broker/accesslayer/QueryCustomizerDefaultImpl.java
  
  Index: QueryCustomizerDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/QueryCustomizerDefaultImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueryCustomizerDefaultImpl.java	11 Mar 2004 18:16:06 -0000	1.3
  +++ QueryCustomizerDefaultImpl.java	26 Mar 2004 09:10:52 -0000	1.4
  @@ -24,7 +24,7 @@
   import org.apache.ojb.broker.query.QueryByCriteria;
   
   /**
  - * Default Implementation of QueryCustomizer. 
  + * Default Implementation of QueryCustomizer.
    *
    * @author <a href="mailto:jbraeuchi@hotmail.com">Jakob Braeuchi</a>
    * @version $Id$
  @@ -44,15 +44,15 @@
   
       /**
        * Default implementation returns unmodified original Query
  -     * 
  -     * @see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery(java.lang.Object,
org.apache.ojb.broker.PersistenceBroker, org.apache.ojb.broker.metadata.CollectionDescriptor,
org.apache.ojb.broker.query.Query)
  +     *
  +     * @see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery
        */
       public Query customizeQuery(Object anObject, PersistenceBroker aBroker, CollectionDescriptor
aCod, QueryByCriteria aQuery)
       {
           return aQuery;
       }
  -    
  -    
  +
  +
       /**
        * @see org.apache.ojb.broker.metadata.AttributeContainer#addAttribute(String, String)
        */
  
  
  
  1.4       +7 -7      db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementsForClassFactory.java
  
  Index: StatementsForClassFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementsForClassFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StatementsForClassFactory.java	11 Mar 2004 18:16:06 -0000	1.3
  +++ StatementsForClassFactory.java	26 Mar 2004 09:10:52 -0000	1.4
  @@ -14,7 +14,7 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  - 
  +
   import org.apache.ojb.broker.util.factory.ConfigurableFactory;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
  @@ -22,12 +22,12 @@
   /**
    * Factory for {@link org.apache.ojb.broker.accesslayer.StatementsForClassIF}
    * implementations. Developers may specify the specific implementation returned by
  - * {@link #getStatementsForClass} by implementing the 
  + * {@link #getStatementsForClass} by implementing the
    * {@link org.apache.ojb.broker.accesslayer.StatementsForClassIF}
  - * interface and setting the <code>StatementsForClassClass</code> property
in 
  + * interface and setting the <code>StatementsForClassClass</code> property
in
    * <code>OJB.properties</code>.
    * <br/>
  - * @see org.apache.ojb.broker.accesslayer.StatementManager#getStatementsForClass
  + * @see org.apache.ojb.broker.accesslayer.StatementManager
    * @see org.apache.ojb.broker.accesslayer.StatementsForClassImpl
    * @author <a href="mailto:rburt3@mchsi.com">Randall Burt</a>
    * @version $Id$
  @@ -50,7 +50,7 @@
   		}
   		return singleton;
   	}
  -	
  +
       /*
        * @see org.apache.ojb.broker.util.factory.ConfigurableFactory#getConfigurationKey()
        */
  @@ -68,7 +68,7 @@
        */
       public StatementsForClassIF getStatementsForClass(JdbcConnectionDescriptor cds, ClassDescriptor
cld)
       {
  -		return (StatementsForClassIF) this.createNewInstance(new Class[]{JdbcConnectionDescriptor.class,
ClassDescriptor.class}, 
  +		return (StatementsForClassIF) this.createNewInstance(new Class[]{JdbcConnectionDescriptor.class,
ClassDescriptor.class},
   		                                                     new Object[]{cds, cld});
       }
   }
  
  
  

---------------------------------------------------------------------
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