private ResourceArchive getResourceArchiveByType(Class type)
{
for (int i = 0; i < _resources.size(); i++) {
ResourceArchive ra = _resources.get(i);
ResourceAdapterConfig raConfig = ra.getResourceAdapter();
if (raConfig == null)
continue;
Class resourceAdapterClass = raConfig.getResourceadapterClass();
if (type.equals(resourceAdapterClass))
return ra;
}