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 Identity.java
Date Wed, 16 Jul 2003 15:53:49 GMT
arminw      2003/07/16 08:53:49

  Modified:    src/java/org/apache/ojb/broker/core
                        DelegatingPersistenceBroker.java PBPoolInfo.java
                        PersistenceBrokerFactoryDefaultImpl.java
                        PersistenceBrokerHandle.java
                        PersistenceBrokerImpl.java
               src/java/org/apache/ojb/broker/metadata/fieldaccess
                        AbstractPersistentField.java
               src/java/org/apache/ojb/broker Identity.java
  Log:
  - add more javadoc
  - fix some javadoc bugs
  
  Revision  Changes    Path
  1.6       +2 -2      db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java
  
  Index: DelegatingPersistenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DelegatingPersistenceBroker.java	16 Jul 2003 11:19:32 -0000	1.5
  +++ DelegatingPersistenceBroker.java	16 Jul 2003 15:53:03 -0000	1.6
  @@ -333,7 +333,7 @@
   	}
   
       /**
  -     * @see org.apache.ojb.broker.PersistenceBroker#deleteMtoNImplementor()
  +     * @see org.apache.ojb.broker.PersistenceBroker#deleteMtoNImplementor
        */
       public void deleteMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException
       {
  @@ -341,7 +341,7 @@
       }
   
       /**
  -     * @see org.apache.ojb.broker.PersistenceBroker#addMtoNImplementor()
  +     * @see org.apache.ojb.broker.PersistenceBroker#addMtoNImplementor
        */
       public void addMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException
       {
  
  
  
  1.2       +0 -3      db-ojb/src/java/org/apache/ojb/broker/core/PBPoolInfo.java
  
  Index: PBPoolInfo.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PBPoolInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PBPoolInfo.java	26 Apr 2003 23:18:25 -0000	1.1
  +++ PBPoolInfo.java	16 Jul 2003 15:53:03 -0000	1.2
  @@ -58,9 +58,6 @@
   
       /**
        * Init default properties.
  -     * {@link org.apache.ojb.broker.ta.PersistenceBrokerDefaultImpl}
  -     * do not use {@link org.apache.ojb.broker.ta.PBKeyedPoolableObjectFactory#validateObject}
  -     * method, hence we set properties accordingly.
        * We set {@link #setTestOnBorrow}, {@link #setTestOnReturn}, {@link #setTestWhileIdle}
        * to <ii>false<ii> (See documentation of jakarta-commons-pool).
        * Override this to change behavior.
  
  
  
  1.4       +18 -4     db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java
  
  Index: PersistenceBrokerFactoryDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PersistenceBrokerFactoryDefaultImpl.java	16 Jul 2003 11:25:50 -0000	1.3
  +++ PersistenceBrokerFactoryDefaultImpl.java	16 Jul 2003 15:53:03 -0000	1.4
  @@ -82,6 +82,17 @@
   /**
    * This is the default implementation of the {@link PersistenceBrokerFactoryIF}
    * interface.
  + * <br/>
  + * This implementation use a pool of {@link org.apache.ojb.broker.PersistenceBroker}
  + * instances [abbr. PB]. Each PB instance (implementation class was specified in OJB configuration
file)
  + * obtained from the pool is wrapped by {@link PoolablePersistenceBroker} handle interaction
  + * with the pool.
  + * <br/>
  + * When calling {@link #createPersistenceBroker} the pooled-PB instance (<tt>PoolablePersistenceBroker</tt>)
  + * on its part was wrapped again with {@link PersistenceBrokerHandle}. When a client do
a PB.close()
  + * call on the handle, the underlying <tt>PoolablePersistenceBroker</tt> was
closed too (returns PB instance
  + * back to pool) and all further method calls on the handle (except <tt>PB.isClosed()</tt>)
result in
  + * an exception.
    *
    * @author <a href="mailto:thma@apache.org">Thomas Mahler<a>
    * @author <a href="mailto:armin@codeAuLait.de">Armin Waibel</a>
  @@ -153,7 +164,7 @@
   
       /**
        * could be used for monitoring
  -     * @todo is this useful?
  +     * TODO: is this useful?
        */
       public Properties getPoolConfiguration()
       {
  @@ -162,7 +173,7 @@
   
       /**
        * could be used for runtime configuration
  -     * @todo is this useful?
  +     * TODO: is this useful?
        */
       public void setPoolConfiguration(Properties prop)
       {
  @@ -215,7 +226,10 @@
   
           try
           {
  -            // broker = (PersistenceBroker) brokerPool.borrowObject(pbKey);
  +            /*
  +            we wrap the pooled PB instance with a special client-handle
  +            to avoid PB-instance corruption by the client.
  +            */
               broker = new PersistenceBrokerHandle((PersistenceBroker) brokerPool.borrowObject(pbKey));
   
           }
  
  
  
  1.2       +5 -1      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerHandle.java
  
  Index: PersistenceBrokerHandle.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerHandle.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PersistenceBrokerHandle.java	16 Jul 2003 11:25:50 -0000	1.1
  +++ PersistenceBrokerHandle.java	16 Jul 2003 15:53:03 -0000	1.2
  @@ -29,6 +29,10 @@
           return super.isInTransaction();
       }
   
  +    /**
  +     * Destroy this handle and return the underlying (wrapped) PB instance
  +     * to pool (when using default implementation of PersistenceBrokerFactory).
  +     */
       public boolean close()
       {
           if(getDelegate() == null) return true;
  
  
  
  1.29      +3 -3      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- PersistenceBrokerImpl.java	15 Jul 2003 18:07:16 -0000	1.28
  +++ PersistenceBrokerImpl.java	16 Jul 2003 15:53:03 -0000	1.29
  @@ -2433,7 +2433,7 @@
   
   
       /**
  -	 * @see ObjectContainer#query()
  +	 * @see org.odbms.ObjectContainer#query()
   	 */
       public org.odbms.Query query()
       {
  @@ -2525,7 +2525,7 @@
       }
   
       /**
  -     * @see org.apache.ojb.broker.PersistenceBroker#deleteMtoNImplementor()
  +     * @see org.apache.ojb.broker.PersistenceBroker#deleteMtoNImplementor
        */
       public void deleteMtoNImplementor(MtoNImplementor m2nImpl) throws PersistenceBrokerException
       {
  
  
  
  1.6       +3 -3      db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/AbstractPersistentField.java
  
  Index: AbstractPersistentField.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/AbstractPersistentField.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractPersistentField.java	11 Jul 2003 19:01:24 -0000	1.5
  +++ AbstractPersistentField.java	16 Jul 2003 15:53:22 -0000	1.6
  @@ -121,7 +121,7 @@
       public abstract boolean makeAccessible();
   
       /**
  -     * do not override this method, have a look at {@link doSet}
  +     * do not override this method, have a look at {@link #doSet}
        */
       public void set(Object targetObject, Object value) throws MetadataException
       {
  @@ -136,7 +136,7 @@
       }
   
       /**
  -     * do not override this method, have a look at {@link doGet}
  +     * do not override this method, have a look at {@link #doGet}
        */
       public Object get(Object targetObject) throws MetadataException
       {
  
  
  
  1.21      +4 -5      db-ojb/src/java/org/apache/ojb/broker/Identity.java
  
  Index: Identity.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/Identity.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Identity.java	12 Jun 2003 16:49:16 -0000	1.20
  +++ Identity.java	16 Jul 2003 15:53:42 -0000	1.21
  @@ -225,8 +225,8 @@
   
       /**
        * return the Class of the real subject
  -     * @return java.lang.Class
  -     * @deprecated use {@link #getObjectTopLevelClass} instead
  +     *
  +     * @deprecated use {@link #getObjectsTopLevelClass} instead
        */
       public Class getObjectsClass()
       {
  @@ -247,7 +247,6 @@
   
       /**
        * return the "real" Class of the real subject
  -     * @return java.lang.Class
        */
       public Class getObjectsRealClass()
       {
  @@ -264,7 +263,7 @@
   
       /**
        * return a serialized Identity as byte[]
  -     * @return byte[]
  +     *
        */
       public byte[] serialize() throws PersistenceBrokerException
       {
  
  
  

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