Coverage Report - org.mule.ra.MuleManagedConnectionMetaData
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleManagedConnectionMetaData
0%
0/9
0%
0/2
1.4
 
 1  
 /*
 2  
  * $Id: MuleManagedConnectionMetaData.java 9435 2007-10-29 14:34:09Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.ra;
 12  
 
 13  
 import org.mule.config.MuleManifest;
 14  
 import org.mule.ra.i18n.JcaMessages;
 15  
 
 16  
 import javax.resource.ResourceException;
 17  
 import javax.resource.spi.ManagedConnectionMetaData;
 18  
 
 19  
 /**
 20  
  * <code>MuleManagedConnectionMetaData</code> TODO
 21  
  */
 22  
 public class MuleManagedConnectionMetaData implements ManagedConnectionMetaData
 23  
 {
 24  
     private final MuleManagedConnection managedConnection;
 25  
 
 26  
     public MuleManagedConnectionMetaData(MuleManagedConnection mc)
 27  0
     {
 28  0
         this.managedConnection = mc;
 29  0
     }
 30  
 
 31  
     public String getEISProductName() throws ResourceException
 32  
     {
 33  0
         return MuleManifest.getVendorName();
 34  
     }
 35  
 
 36  
     public String getEISProductVersion() throws ResourceException
 37  
     {
 38  0
         return MuleManifest.getProductVersion();
 39  
     }
 40  
 
 41  
     // TODO
 42  
     public int getMaxConnections() throws ResourceException
 43  
     {
 44  0
         return 0;
 45  
     }
 46  
 
 47  
     public String getUserName() throws ResourceException
 48  
     {
 49  0
         if (managedConnection.isDestroyed())
 50  
         {
 51  0
             throw new IllegalStateException(
 52  
                 JcaMessages.objectIsDisposed(managedConnection).toString());
 53  
         }
 54  0
         return managedConnection.getUsername();
 55  
     }
 56  
 }