User: hiram   
  Date: 00/12/25 20:15:55

  Modified:    src/java/org/spydermq/distributed/interfaces
                        DistributedConnectionFactory.java
                        DistributedJMSServer.java
  Added:       src/java/org/spydermq/distributed/interfaces
                        DistributedConnectionFactoryMBean.java
  Log:
  Fix a syschronization problem with the UIL and OIL classes.  Now the
  ASF can handle multiple messages without a problem.  Removed all dependencys
  the client had on the SecurityManger.
  
  Revision  Changes    Path
  1.3       +103 -21   
spyderMQ/src/java/org/spydermq/distributed/interfaces/DistributedConnectionFactory.java
  
  Index: DistributedConnectionFactory.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/interfaces/DistributedConnectionFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DistributedConnectionFactory.java 2000/12/19 06:43:39     1.2
  +++ DistributedConnectionFactory.java 2000/12/26 04:15:55     1.3
  @@ -6,35 +6,117 @@
    */
   package org.spydermq.distributed.interfaces;
   
  +import java.rmi.RemoteException; 
  +import java.rmi.server.UnicastRemoteObject;
  +import java.util.Hashtable;
  +
  +import javax.jms.JMSException;
   import javax.jms.QueueConnection;
  +import javax.jms.QueueConnectionFactory;
   import javax.jms.TopicConnection;
  +import javax.jms.TopicConnectionFactory;
  +import javax.jms.XATopicConnection;
  +import javax.jms.XAQueueConnection;
   
  +import org.spydermq.distributed.interfaces.DistributedJMSServer;
  +import org.spydermq.SpyQueueConnection;
  +import org.spydermq.SpyTopicConnection;
   import org.spydermq.server.JMSServer;
  -import org.spydermq.security.SecurityManager;
  -
  -import javax.jms.XAQueueConnection;
  -import javax.jms.XATopicConnection;
  +import org.spydermq.SpyXATopicConnection;
  +import org.spydermq.SpyXAQueueConnection;
   
  -public interface DistributedConnectionFactory
  +/**
  + *   The RMI implementation of the DistributedConnectionFactory object
  + *
  + *   @author Norbert Lataille ([EMAIL PROTECTED])
  + *   @author Hiram Chirino ([EMAIL PROTECTED])
  + * 
  + *   @version $Revision: 1.3 $
  + */
  +public class DistributedConnectionFactory 
  +     implements java.io.Serializable, DistributedConnectionFactoryMBean
   {
  +     // Attributes ----------------------------------------------------
  + 
  +     protected DistributedJMSServer server;
  +     private String crCN;
   
  -     // Public --------------------------------------------------------
   
  -     public QueueConnection createQueueConnection() throws Exception;
  -     public QueueConnection createQueueConnection(String userName, String password) 
throws Exception;
  -     public void setServer(DistributedJMSServer theServer) throws Exception;
  -     public void setSecurityManager(SecurityManager securityManager) throws 
Exception;
  -     public TopicConnection createTopicConnection() throws Exception;        
  -     public TopicConnection createTopicConnection(String userName, String password) 
throws Exception;        
  -     public void setConnectionReceiverClassName(String className) throws Exception;
  +     // Constructor ---------------------------------------------------
  +        
  +     public DistributedConnectionFactory() throws RemoteException
  +     {
  +             super();
  +     }
   
        // Public --------------------------------------------------------
  -
  -     public XAQueueConnection createXAQueueConnection() throws Exception;
  -
  -     public XAQueueConnection createXAQueueConnection(String userName, String 
password) throws Exception;
  -
  -     public XATopicConnection createXATopicConnection() throws Exception;
  -
  -     public XATopicConnection createXATopicConnection(String userName, String 
password) throws Exception;
  +     
  +     public void setServer(DistributedJMSServer theServer)
  +     {
  +             server=theServer;
  +     }
  +     
  +     public void setCRClassName(String className)
  +     {
  +             crCN=className;
  +     }
  +     
  +
  +
  +     public QueueConnection createQueueConnection() throws JMSException
  +     {
  +             return new SpyQueueConnection(server,null,crCN);
  +     }
  +
  +     public QueueConnection createQueueConnection(String userName, String password) 
throws Exception
  +     {
  +             String id=server.checkUser(userName,password);
  +             return new SpyQueueConnection(server,id,crCN);
  +     }
  +             
  +     public TopicConnection createTopicConnection() throws JMSException
  +     {
  +             return new SpyTopicConnection(server,null,crCN);
  +     }       
  +     
  +     public TopicConnection createTopicConnection(String userName, String password) 
throws Exception
  +     {
  +             String id=server.checkUser(userName,password);
  +             return new SpyTopicConnection(server,id,crCN);          
  +     }       
  +     
  +     public void setConnectionReceiverClassName(String className)
  +     {
  +             crCN=className;
  +     }
  +
  +     /**
  +      * createXAQueueConnection method comment.
  +      */
  +     public javax.jms.XAQueueConnection createXAQueueConnection() throws 
java.lang.Exception {
  +             return new SpyXAQueueConnection(server,null,crCN);
  +     }
  +
  +     /**
  +      * createXAQueueConnection method comment.
  +      */
  +     public javax.jms.XAQueueConnection createXAQueueConnection(java.lang.String 
userName, java.lang.String password) throws java.lang.Exception {
  +             String id=server.checkUser(userName,password);
  +             return new SpyXAQueueConnection(server,id,crCN);
  +     }
  +
  +     /**
  +      * createXATopicConnection method comment.
  +      */
  +     public javax.jms.XATopicConnection createXATopicConnection() throws 
java.lang.Exception {
  +             return new SpyXATopicConnection(server,null,crCN);
  +     }
  +
  +     /**
  +      * createXATopicConnection method comment.
  +      */
  +     public javax.jms.XATopicConnection createXATopicConnection(java.lang.String 
userName, java.lang.String password) throws java.lang.Exception {
  +             String id=server.checkUser(userName,password);
  +             return new SpyXATopicConnection(server,id,crCN);
  +     }
   }
  
  
  
  1.8       +1 -0      
spyderMQ/src/java/org/spydermq/distributed/interfaces/DistributedJMSServer.java
  
  Index: DistributedJMSServer.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/interfaces/DistributedJMSServer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DistributedJMSServer.java 2000/12/23 15:48:19     1.7
  +++ DistributedJMSServer.java 2000/12/26 04:15:55     1.8
  @@ -39,4 +39,5 @@
        public void setEnabled(SpyDistributedConnection dc, boolean enabled) throws 
Exception;
        public void subscribe(SpyDistributedConnection dc, org.spydermq.Subscription 
s) throws Exception;
        public void unsubscribe(SpyDistributedConnection dc, int subscriptionId ) 
throws Exception;
  +     public String checkUser(String userName, String password) throws Exception;
   }
  
  
  
  1.1                  
spyderMQ/src/java/org/spydermq/distributed/interfaces/DistributedConnectionFactoryMBean.java
  
  Index: DistributedConnectionFactoryMBean.java
  ===================================================================
  /*
   * spyderMQ, the OpenSource JMS implementation
   *
   * Distributable under GPL license.
   * See terms of license at gnu.org.
   */
  package org.spydermq.distributed.interfaces;
  
  /*
   * spyderMQ, the OpenSource JMS implementation
   *
   * Distributable under GPL license.
   * See terms of license at gnu.org.
   */
  public interface DistributedConnectionFactoryMBean
  {
  }
  
  
  

Reply via email to