jstrachan    2003/03/19 14:29:35

  Modified:    messenger/src/conf subscriptions.dtd
               messenger project.xml
               messenger/src/java/org/apache/commons/messenger
                        Messenger.java DefaultMessenger.java
  Log:
  Patch to allow access to the asynchronous session as well as the synchronous session.
  
  Revision  Changes    Path
  1.4       +1 -1      jakarta-commons-sandbox/messenger/src/conf/subscriptions.dtd
  
  Index: subscriptions.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/conf/subscriptions.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- subscriptions.dtd 4 Dec 2002 10:13:35 -0000       1.3
  +++ subscriptions.dtd 19 Mar 2003 22:29:35 -0000      1.4
  @@ -7,7 +7,7 @@
    
   <!ELEMENT subscriptions (subscription+)>
   
  -<!ELEMENT subscription (listener | servlet | bridge | distributeBridge | stopWatch 
)+>
  +<!ELEMENT subscription (listener | servlet | bridge | distributeBridge | stopWatch 
)+ (consumerThread)?>
   <!ATTLIST subscription
        connection (queue|topic) #REQUIRED
        subject CDATA #REQUIRED
  
  
  
  1.14      +1 -1      jakarta-commons-sandbox/messenger/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/messenger/project.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- project.xml       4 Mar 2003 13:19:01 -0000       1.13
  +++ project.xml       19 Mar 2003 22:29:35 -0000      1.14
  @@ -4,7 +4,7 @@
     <pomVersion>3</pomVersion>
     <name>commons-messenger</name>
     <id>commons-messenger</id>
  -  <currentVersion>1.0-dev-11</currentVersion>
  +  <currentVersion>1.0-dev-12</currentVersion>
     <organization>
          <name>Apache Software Foundation</name>
          <url>http://www.apache.org</url>
  
  
  
  1.16      +13 -6     
jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/Messenger.java
  
  Index: Messenger.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/Messenger.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Messenger.java    4 Mar 2003 10:21:00 -0000       1.15
  +++ Messenger.java    19 Mar 2003 22:29:35 -0000      1.16
  @@ -111,10 +111,17 @@
       /** Returns the underlying JMS connection that this Messenger is using */
       public Connection getConnection() throws JMSException;
   
  -     /** 
  -      * Returns the underlying JMS session that this thread is using for
  -      * this Messenger for synchronous operation
  -      */ 
    public Session getSession() throws JMSException;
  +    /** 
  +     * Returns the underlying JMS session that this thread is using for
  +     * synchronous operations such as send() and receive() for synchronous operation
  +     */ 
  +    public Session getSession() throws JMSException;
  +
  +    /** 
  +     * Returns the underlying JMS session that this thread is using for
  +     * this Messenger for asynchronous operation such as addMessageListener() 
operations
  +     */ 
  +    public Session getAsyncSession() throws JMSException;
   
   
       /** Creates a ConnectionConsumer which is useful if used inside an application 
server
  
  
  
  1.16      +6 -2      
jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultMessenger.java
  
  Index: DefaultMessenger.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messenger/DefaultMessenger.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultMessenger.java     4 Mar 2003 13:19:01 -0000       1.15
  +++ DefaultMessenger.java     19 Mar 2003 22:29:35 -0000      1.16
  @@ -83,6 +83,10 @@
           return getMessengerSession().getSession();
       }
       
  +    public Session getAsyncSession() throws JMSException {
  +        return getMessengerSession().getListenerSession();
  +    }
  +    
       // Implementation methods
       //-------------------------------------------------------------------------
       protected boolean isTopic(Connection connection) throws JMSException {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to