if (ref.getClassName().equals("tyrex.resource.Resource")) {
try {
Resources resources =
getTransactionDomain().getResources();
RefAddr nameAddr = ref.get(RESOURCE_NAME);
if (nameAddr != null) {
return resources
.getResource(nameAddr.getContent().toString())
.getClientFactory();
} else {
return resources.getResource(DEFAULT_RESOURCE_NAME)
.getClientFactory();
}
} catch (Throwable t) {
log("Cannot create Tyrex Resource, Exception", t);