1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
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 | |
|
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 | |
|
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 | |
} |