Subject subject = getSubject();
// Check if we got a valid Subject instance; requirement for recovery
if (subject != null)
{
ManagedConnection mc = open(subject);
XAResource xaResource = null;
try
{
xaResource = mc.getXAResource();
}
catch (ResourceException reconnect)
{
close(mc);
mc = open(subject);
xaResource = mc.getXAResource();
}
try
{
ObjectName on = new ObjectName(connectionManager);
boolean wrapXAResource = false;
boolean padXid = false;
Boolean isSameRMOverrideValue = Boolean.FALSE;
Boolean b = null;
b = (Boolean)getServer().getAttribute(on, "WrapXAResource");
if (b != null)
wrapXAResource = b.booleanValue();
b = (Boolean)getServer().getAttribute(on, "PadXid");
if (b != null)
padXid = b.booleanValue();
b = (Boolean)getServer().getAttribute(on, "IsSameRMOverrideValue");
if (b != null)
isSameRMOverrideValue = b;
if(wrapXAResource)
{
String eisProductName = null;
String eisProductVersion = null;
try
{
eisProductName = mc.getMetaData().getEISProductName();
eisProductVersion = mc.getMetaData().getEISProductVersion();
}
catch (ResourceException re)
{
// Ignore
}