MBeanServerConnection server = (MBeanServerConnection)context.lookup("jmx/invoker/RMIAdaptor");
ObjectName objectName = new ObjectName("jboss.jca:name="+_dataSourceId+",service=ManagedConnectionFactory");
if(_username !=null && _password !=null)
{
SecurityAssociation.setPrincipal(new SimplePrincipal(_username));
SecurityAssociation.setCredential(_password);
}
String className = (String)server.invoke(objectName, "getManagedConnectionFactoryAttribute", new Object[] {"XADataSourceClass"}, new String[] {"java.lang.String"});
if (log.isDebugEnabled())
{
log.debug("AppServerJDBCXARecovery datasource classname = "+className);
}
if(_username !=null && _password !=null)
{
SecurityAssociation.setPrincipal(new SimplePrincipal(_username));
SecurityAssociation.setCredential(_password);
}
String properties = (String)server.invoke(objectName, "getManagedConnectionFactoryAttribute", new Object[] {"XADataSourceProperties"}, new String[] {"java.lang.String"});
// debug disabled due to security paranoia - it may log datasource password in cleartext.