1 package org.apache.ojb.otm.connector; 2 3 17 18 import javax.resource.ResourceException ; 19 import javax.resource.spi.ManagedConnectionMetaData ; 20 21 25 26 public class OTMConnectionMetaData implements ManagedConnectionMetaData 27 { 28 29 private OTMJCAManagedConnection mc; 30 31 public OTMConnectionMetaData(OTMJCAManagedConnection mc) 32 { 33 System.out.println("In OTMConnectionMetaData.constructor"); 34 this.mc = mc; 35 } 36 37 public String getEISProductName() 38 throws ResourceException 39 { 40 Util.log("In OTMConnectionMetaData.getEISProductName"); 41 return "Apache OJB"; 42 } 43 44 public String getEISProductVersion() 45 throws ResourceException 46 { 47 Util.log("In OTMConnectionMetaData.getEISProductVersion"); 48 return "1.0"; 49 50 } 51 52 public int getMaxConnections() 53 throws ResourceException 54 { 55 Util.log("In OTMConnectionMetaData.getMaxConnections"); 56 return 50; } 58 59 public String getUserName() 60 throws ResourceException 61 { 62 return mc.getUserName(); 63 } 64 65 66 } 67 | Popular Tags |