01: /*
02: * Created on December 11, 2003
03: *
04: * ConnectionMetaDataImpl.java is used to test the J2EE Connector
05: * as implemented by JOnAS.
06: *
07: */
08: package ersatz.resourceadapter;
09:
10: import javax.resource.ResourceException;
11: import javax.resource.cci.ConnectionMetaData;
12:
13: /**
14: * @author Bob Kruse
15: *
16: * Ersatz Resource Adapter
17: *
18: * used to test the J2EE Connector as implemented by JOnAS.
19: *
20: */
21: public class ConnectionMetaDataImpl implements ConnectionMetaData {
22: public String product = "Ersatz EIS"; // see J2eeConnectorTestBeanClient
23: String version = "1.1";
24: String UserName = "Ersatz_User_Name"; //
25: private ManagedConnectionImpl mc;
26: private ConnectionImpl conn;
27: String cName = "ConnectionImpl";
28:
29: //
30: // The method getUserName returns the user name for an active connection as
31: // known to the underlying EIS instance. The name corresponds the resource
32: // principal under whose security context a connection to the EIS
33: // instance has been established.
34: //
35: public ConnectionMetaDataImpl(ConnectionImpl c,
36: ManagedConnectionImpl mc) { // constructor
37: Utility.log(cName + ".constructor");
38: this .mc = mc;
39: this .conn = c;
40: }
41:
42: public String getEISProductName() throws ResourceException {
43: return (product);
44: }
45:
46: public String getEISProductVersion() throws ResourceException {
47: return (version);
48: }
49:
50: public String getUserName() throws ResourceException {
51: return (UserName);
52: }
53: }
|