Coverage Report - org.mule.transport.jms.websphere.WebsphereTransactedJmsMessageReceiver
 
Classes in this File Line Coverage Branch Coverage Complexity
WebsphereTransactedJmsMessageReceiver
0%
0/8
0%
0/10
2
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.transport.jms.websphere;
 8  
 
 9  
 import org.mule.api.construct.FlowConstruct;
 10  
 import org.mule.api.endpoint.InboundEndpoint;
 11  
 import org.mule.api.lifecycle.CreateException;
 12  
 import org.mule.api.lifecycle.InitialisationException;
 13  
 import org.mule.api.transport.Connector;
 14  
 import org.mule.transport.jms.XaTransactedJmsMessageReceiver;
 15  
 
 16  
 import javax.jms.Session;
 17  
 
 18  
 public class WebsphereTransactedJmsMessageReceiver extends XaTransactedJmsMessageReceiver
 19  
 {
 20  
     public WebsphereTransactedJmsMessageReceiver(Connector connector, FlowConstruct flowConstruct, 
 21  
         InboundEndpoint endpoint) throws InitialisationException, CreateException
 22  
     {
 23  0
         super(connector, flowConstruct, endpoint);
 24  0
     }
 25  
     
 26  
     protected void doConnect() throws Exception
 27  
     {
 28  0
         if (connector.isConnected() && connector.isEagerConsumer())
 29  
         {
 30  0
             createConsumer();
 31  
         }
 32  
 
 33  
         // TODO make it configurable. This connection blip is killing performance with WMQ, session create() and close()
 34  
         // are the heaviest operations there, synchronizing on a global QM for this machine
 35  
         // MULE-1150 check whether mule is really connected    
 36  0
         if (connector.isConnected() && !this.connected.get() && connector.getSessionFromTransaction() == null)
 37  
         {
 38  
             // check connection by creating session
 39  0
             Session s = connector.getConnection().createSession(false, 1);
 40  0
             s.close();
 41  
         }
 42  0
     }
 43  
 }
 44  
 
 45