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