User: hiram   
  Date: 01/02/26 19:02:42

  Modified:    src/main/org/jbossmq/distributed/interfaces
                        DistributedConnectionFactory.java
                        DistributedJMSServer.java
  Log:
  BUG FIX: Redepolyment of MDBs were failing.  This was due to the fact that the
  JNDI was returning the ConnectionFactorys by reference (When inside the app server).
  
  Revision  Changes    Path
  1.2       +14 -8     
jbossmq/src/main/org/jbossmq/distributed/interfaces/DistributedConnectionFactory.java
  
  Index: DistributedConnectionFactory.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbossmq/src/main/org/jbossmq/distributed/interfaces/DistributedConnectionFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DistributedConnectionFactory.java 2001/01/26 00:43:40     1.1
  +++ DistributedConnectionFactory.java 2001/02/27 03:02:40     1.2
  @@ -38,7 +38,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public class DistributedConnectionFactory 
        implements java.io.Serializable, DistributedConnectionFactoryMBean
  @@ -63,33 +63,35 @@
                server=theServer;
        }
        
  -     public void setCRClassName(String className)
  -     {
  -             crCN=className;
  -     }
  +
        
   
   
  -     public QueueConnection createQueueConnection() throws JMSException
  +     public QueueConnection createQueueConnection() throws Exception
        {
  +             DistributedJMSServer server = this.server.internalClone();
                return new SpyQueueConnection(server,null,crCN);
        }
   
        public QueueConnection createQueueConnection(String userName, String password) 
throws Exception
        {
  +             DistributedJMSServer server = this.server.internalClone();
                String id=server.checkUser(userName,password);
                return new SpyQueueConnection(server,id,crCN);
        }
                
  -     public TopicConnection createTopicConnection() throws JMSException
  +     public TopicConnection createTopicConnection() throws Exception
        {
  +             DistributedJMSServer server = this.server.internalClone();
                return new SpyTopicConnection(server,null,crCN);
        }       
        
        public TopicConnection createTopicConnection(String userName, String password) 
throws Exception
        {
  +             DistributedJMSServer server = this.server.internalClone();
                String id=server.checkUser(userName,password);
  -             return new SpyTopicConnection(server,id,crCN);          
  +             return new SpyTopicConnection(server,id,crCN);  
  +                     
        }       
        
        public void setConnectionReceiverClassName(String className)
  @@ -101,6 +103,7 @@
         * createXAQueueConnection method comment.
         */
        public javax.jms.XAQueueConnection createXAQueueConnection() throws 
java.lang.Exception {
  +             DistributedJMSServer server = this.server.internalClone();
                return new SpyXAQueueConnection(server,null,crCN);
        }
   
  @@ -108,6 +111,7 @@
         * createXAQueueConnection method comment.
         */
        public javax.jms.XAQueueConnection createXAQueueConnection(java.lang.String 
userName, java.lang.String password) throws java.lang.Exception {
  +             DistributedJMSServer server = this.server.internalClone();
                String id=server.checkUser(userName,password);
                return new SpyXAQueueConnection(server,id,crCN);
        }
  @@ -116,6 +120,7 @@
         * createXATopicConnection method comment.
         */
        public javax.jms.XATopicConnection createXATopicConnection() throws 
java.lang.Exception {
  +             DistributedJMSServer server = this.server.internalClone();
                return new SpyXATopicConnection(server,null,crCN);
        }
   
  @@ -123,6 +128,7 @@
         * createXATopicConnection method comment.
         */
        public javax.jms.XATopicConnection createXATopicConnection(java.lang.String 
userName, java.lang.String password) throws java.lang.Exception {
  +             DistributedJMSServer server = this.server.internalClone();
                String id=server.checkUser(userName,password);
                return new SpyXATopicConnection(server,id,crCN);
        }
  
  
  
  1.2       +2 -0      
jbossmq/src/main/org/jbossmq/distributed/interfaces/DistributedJMSServer.java
  
  Index: DistributedJMSServer.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbossmq/src/main/org/jbossmq/distributed/interfaces/DistributedJMSServer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DistributedJMSServer.java 2001/01/26 00:43:41     1.1
  +++ DistributedJMSServer.java 2001/02/27 03:02:40     1.2
  @@ -61,4 +61,6 @@
    * @exception java.lang.Exception The exception description.
    */
   void subscribe(org.jbossmq.SpyDistributedConnection dc, org.jbossmq.Subscription s) 
throws java.lang.Exception;
  +
  +     public DistributedJMSServer internalClone() throws Exception;
   }
  
  
  

Reply via email to