User: user57  
  Date: 01/08/06 15:55:00

  Modified:    src/main/org/jboss/ejb/plugins/jms JMSContainerInvoker.java
  Log:
   o replaced ConnectionFactoryHelper.createConnection() with
     createTopicConnection() and createQueueConnection(), since a connection
     factory might implement all four interfaces we need to have another way
     to determine what to create.
   o JmsManagedConnection will only attempt to get topic or queue resources
     where appriprate (instead of trying to get topic stuff from a queue
     connection).
  
  Revision  Changes    Path
  1.23      +9 -29     
jboss/src/main/org/jboss/ejb/plugins/jms/JMSContainerInvoker.java
  
  Index: JMSContainerInvoker.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jms/JMSContainerInvoker.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JMSContainerInvoker.java  2001/08/03 17:15:49     1.22
  +++ JMSContainerInvoker.java  2001/08/06 22:55:00     1.23
  @@ -60,7 +60,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Sebastien Alborini</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
  - * @version $Revision: 1.22 $
  + * @version $Revision: 1.23 $
    */
   public class JMSContainerInvoker
      implements ContainerInvoker, XmlLoadable
  @@ -200,30 +200,6 @@
      }
   
      /**
  -    * Create a new connection from the given factory.
  -    *
  -    * @param factory     An object that implements QueueConnectionFactory,
  -    *                    XAQueueConnectionFactory, TopicConnectionFactory or
  -    *                    XATopicConnectionFactory.
  -    * @param username    The username to use or null for no user.
  -    * @param password    The password for the given username or null if no
  -    * @return            A new connection from the given factory.
  -    * 
  -    * @throws JMSException    Failed to create connection.
  -    */
  -   protected Connection createConnection(final Object factory,
  -                                         final String username,
  -                                         final String password)
  -      throws JMSException
  -   {
  -      connection = ConnectionFactoryHelper.createConnection
  -         (factory, username, password);
  -      log.debug("created connection: " + connection);
  -      
  -      return connection;
  -   }
  -
  -   /**
       * Parse the JNDI suffix from the given JNDI name.
       *
       * @param jndiname        The JNDI name used to lookup the destination.
  @@ -407,8 +383,10 @@
            // create a topic connection
            Object factory = context.lookup(adapter.getTopicFactoryRef());
            TopicConnection tConnection = 
  -            (TopicConnection)createConnection(factory, user, password);
  -
  +            (TopicConnection)ConnectionFactoryHelper.createTopicConnection
  +            (factory, user, password);
  +         connection = tConnection;
  +         
            // lookup or create the destination topic
            Topic topic =
               (Topic)createDestination(Topic.class,
  @@ -457,8 +435,10 @@
            // create a queue connection
            Object qFactory = context.lookup(adapter.getQueueFactoryRef());
            QueueConnection qConnection =
  -            (QueueConnection)createConnection(qFactory, user, password);
  -
  +            (QueueConnection)ConnectionFactoryHelper.createQueueConnection
  +            (qFactory, user, password);
  +         connection = qConnection;
  +         
            // lookup or create the destination queue
            Queue queue = 
               (Queue)createDestination(Queue.class,
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to