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;
if (ij.getAdminObjects() != null)
{
for (CommonAdminObject commonAdminObj : ij.getAdminObjects())
{
if (adminMatcher.match(adminObj, commonAdminObj))
{
newAdminObj = mergeAdminObject(commonAdminObj, newAdminObj);
}
}
}
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;
if (ij.getConnectionDefinitions() != null)
{
if (ij.getConnectionDefinitions().size() == 1 && ij.getConnectionDefinitions().get(0).isEnabled())
{
newConDef = mergeConDef(ij.getConnectionDefinitions().get(0), newConDef);
}
else
{
for (CommonConnDef commonConDef : ij.getConnectionDefinitions())
{
if (connDefMatcher.match(conDef, commonConDef))
{
newConDef = mergeConDef(commonConDef, newConDef);
}
}
}
}
newConDefs.add(newConDef);
}
((OutboundResourceAdapterImpl) ra1516.getOutboundResourceadapter())
.forceConnectionDefinitionsContent(newConDefs);
}
}