if (conn.getVersion() != Version.V_10)
{
//merge adminObjects;
ResourceAdapter1516 ra1516 = (ResourceAdapter1516) conn.getResourceadapter();
if (ra1516 != null && ra1516.getAdminObjects() != null)
{
List<AdminObject> newAdminObjects = new ArrayList<AdminObject>(ra1516.getAdminObjects().size());
for (AdminObject adminObj : ra1516.getAdminObjects())
{
AdminObject newAdminObj = adminObj;
newAdminObjects.add(newAdminObj);
}
((ResourceAdapter1516Impl) ra1516).forceAdminObjectsContent(newAdminObjects);
}
//merge connectionDefinitions;
if (ra1516 != null && ra1516.getOutboundResourceadapter() != null &&
ra1516.getOutboundResourceadapter().getConnectionDefinitions() != null)
{
List<ConnectionDefinition> newConDefs = new ArrayList<ConnectionDefinition>(ra1516
.getOutboundResourceadapter().getConnectionDefinitions().size());
for (ConnectionDefinition conDef : ra1516.getOutboundResourceadapter().getConnectionDefinitions())
{
ConnectionDefinition newConDef = conDef;
newConDefs.add(newConDef);
}
((OutboundResourceAdapterImpl) ra1516.getOutboundResourceadapter())
.forceConnectionDefinitionsContent(newConDefs);
}
}