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 PersistenceBrokerAbstractImpl.java
Date Tue, 15 Apr 2003 21:55:02 GMT
arminw      2003/04/15 14:55:01

  Modified:    src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerAbstractImpl.java
  Log:
  add fix by Ron Gallagher, fix
  listener add, remove method
  
  Revision  Changes    Path
  1.11      +6 -9      db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerAbstractImpl.java
  
  Index: PersistenceBrokerAbstractImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerAbstractImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PersistenceBrokerAbstractImpl.java	12 Apr 2003 23:24:41 -0000	1.10
  +++ PersistenceBrokerAbstractImpl.java	15 Apr 2003 21:55:01 -0000	1.11
  @@ -92,7 +92,7 @@
        */
       private Map stateEventListener = newMap();
       /**
  -     * Map contains all temporary and permanent {@link org.apache.ojb.broker.PBStateListener}
  +     * Map contains all temporary and permanent {@link org.apache.ojb.broker.PBLifeCycleListener}
        * instances as keys, values are <code>Boolean true</code> for permanent
and <code>Boolean false</code>
        * for temporary listener.
        */
  @@ -116,15 +116,10 @@
           {
               stateEventListener.put(listener, new Boolean(permanent));
           }
  -        else if (listener instanceof PBLifeCycleListener)
  +        if (listener instanceof PBLifeCycleListener)
           {
               objectEventListener.put(listener, new Boolean(permanent));
           }
  -        else
  -        {
  -            LoggerFactory.getDefaultLogger().error(PersistenceBrokerAbstractImpl.class.getName()
+
  -                    ": Unkown listener class, could not add listener " + listener);
  -        }
       }
   
       /**
  @@ -136,7 +131,7 @@
           {
               stateEventListener.remove(listener);
           }
  -        else if (listener instanceof PBLifeCycleListener)
  +        if (listener instanceof PBLifeCycleListener)
           {
               objectEventListener.remove(listener);
           }
  @@ -218,6 +213,7 @@
           {
               for (Iterator it = stateEventListener.keySet().iterator(); it.hasNext();)
               {
  +                PBStateEvent stateEvent = (PBStateEvent)event;
                   PBStateListener listener = (PBStateListener) it.next();
                   notifiyStateListener(listener, (PBStateEvent) event);
               }
  @@ -365,3 +361,4 @@
       protected PBLifeCycleEvent AFTER_UPDATE_EVENT =
               new PBLifeCycleEvent(this, PBLifeCycleEvent.Type.AFTER_UPDATE);
   }
  +
  
  
  

Mime
View raw message