Coverage Report - org.mule.module.jca.MuleManagedConnectionMetaData
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleManagedConnectionMetaData
0%
0/9
0%
0/2
1.4
 
 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.module.jca;
 8  
 
 9  
 import org.mule.config.MuleManifest;
 10  
 import org.mule.module.jca.i18n.JcaMessages;
 11  
 
 12  
 import javax.resource.ResourceException;
 13  
 import javax.resource.spi.ManagedConnectionMetaData;
 14  
 
 15  
 /**
 16  
  * <code>MuleManagedConnectionMetaData</code> TODO
 17  
  */
 18  
 public class MuleManagedConnectionMetaData implements ManagedConnectionMetaData
 19  
 {
 20  
     private final MuleManagedConnection managedConnection;
 21  
 
 22  
     public MuleManagedConnectionMetaData(MuleManagedConnection mc)
 23  0
     {
 24  0
         this.managedConnection = mc;
 25  0
     }
 26  
 
 27  
     public String getEISProductName() throws ResourceException
 28  
     {
 29  0
         return MuleManifest.getVendorName();
 30  
     }
 31  
 
 32  
     public String getEISProductVersion() throws ResourceException
 33  
     {
 34  0
         return MuleManifest.getProductVersion();
 35  
     }
 36  
 
 37  
     // TODO
 38  
     public int getMaxConnections() throws ResourceException
 39  
     {
 40  0
         return 0;
 41  
     }
 42  
 
 43  
     public String getUserName() throws ResourceException
 44  
     {
 45  0
         if (managedConnection.isDestroyed())
 46  
         {
 47  0
             throw new IllegalStateException(
 48  
                 JcaMessages.objectIsDisposed(managedConnection).toString());
 49  
         }
 50  0
         return managedConnection.getUsername();
 51  
     }
 52  
 }