geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/reference ReferenceableManager.java ReferenceableManagerImpl.java
Date Wed, 02 Jun 2004 11:52:22 GMT
gdamour     2004/06/02 04:52:22

  Modified:    sandbox/messaging/src/java/org/apache/geronimo/messaging/reference
                        ReferenceableManager.java
                        ReferenceableManagerImpl.java
  Log:
  When the ReferenceManager is stopped, the References it has built
  can no more be used. An IllegalArgumentException is raised if
  a Reference is used when its ReferenceManager is stopped.
  
  Revision  Changes    Path
  1.3       +4 -1      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/reference/ReferenceableManager.java
  
  Index: ReferenceableManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/reference/ReferenceableManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReferenceableManager.java	24 May 2004 13:02:55 -0000	1.2
  +++ ReferenceableManager.java	2 Jun 2004 11:52:22 -0000	1.3
  @@ -33,6 +33,9 @@
        * <BR>
        * If the Referenceable is hosted by this manager, the Referenceable itself
        * is returned.
  +     * <BR>
  +     * An IllegalStateException is raised by this proxy if its methods are
  +     * invoked while the ReferenceableManager which has built it is stopped.
        * 
        * @param aReferenceInfo Reference meta-data.
        * @return An instance implementing the Reference Class and delegating
  
  
  
  1.5       +5 -3      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/reference/ReferenceableManagerImpl.java
  
  Index: ReferenceableManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/reference/ReferenceableManagerImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ReferenceableManagerImpl.java	1 Jun 2004 13:37:14 -0000	1.4
  +++ ReferenceableManagerImpl.java	2 Jun 2004 11:52:22 -0000	1.5
  @@ -17,7 +17,6 @@
   
   package org.apache.geronimo.messaging.reference;
   
  -import java.lang.reflect.Method;
   import java.util.HashMap;
   import java.util.IdentityHashMap;
   import java.util.Map;
  @@ -100,7 +99,7 @@
               // The referenceble is contained by this EndPoint. Returns it.
               Integer refID = new Integer(aReferenceInfo.getRefID());
               Object opaque;
  -            synchronized(idToReferenceable) {
  +            synchronized(mapsLock) {
                   opaque = idToReferenceable.get(refID);
               }
               if ( null == opaque ) {
  @@ -166,6 +165,9 @@
               refID = new Integer(aRefID);
           }
           public void push(Msg aMsg) {
  +            if ( null == out ) {
  +                throw new IllegalStateException("No Msg out is defined");
  +            }
               Request request = 
                   new Request("invoke", new Class[] {int.class, Request.class},
                       new Object[] {refID, aMsg.getBody().getContent()});
  
  
  

Mime
View raw message