else if(original != null && original.getVersion() != null)
version = original.getVersion();
JBossAssemblyDescriptorMetaData originalAssembly = null;
InvokerProxyBindingsMetaData originalInvokerProxyBindings = null;
InterceptorsMetaData originalInterceptors = null;
WebservicesMetaData originalWebservices = null;
JBossEnterpriseBeansMetaData originalBeans = null;
if(original != null)
{
originalAssembly = original.assemblyDescriptor;
originalInvokerProxyBindings = original.invokerProxyBindings;
originalInterceptors = original.interceptors;
originalWebservices = original.webservices;
originalBeans = original.enterpriseBeans;
if(original.ejbVersion != null)
ejbVersion = original.ejbVersion;
if(original.metadataComplete)
metadataComplete = true;
if(original.relationships != null)
relationships = original.relationships;
if(original.jaccContextID != null)
jaccContextID = original.jaccContextID;
if(original.jmxName != null)
jmxName = original.jmxName;
if(original.loaderRepository != null)
loaderRepository = original.loaderRepository;
if(original.securityDomain != null)
securityDomain = original.securityDomain;
if(original.unauthenticatedPrincipal != null)
unauthenticatedPrincipal = original.unauthenticatedPrincipal;
if(original.containerConfigurations != null)
{
if(containerConfigurations == null)
containerConfigurations = new ContainerConfigurationsMetaData();
containerConfigurations.merge(original.containerConfigurations);
}
if(original.resourceManagers != null)
{
if(resourceManagers == null)
resourceManagers = new ResourceManagersMetaData();
resourceManagers.addAll(original.resourceManagers);
}
}
JBossAssemblyDescriptorMetaData overrideAssembly = null;
InvokerProxyBindingsMetaData overrideInvokerProxyBindings = null;
InterceptorsMetaData overrideInterceptors = null;
WebservicesMetaData overrideWebservices = null;
JBossEnterpriseBeansMetaData overrideBeans = null;
if(override != null)
{
overrideAssembly = override.assemblyDescriptor;
overrideInvokerProxyBindings = override.invokerProxyBindings;
overrideInterceptors = override.interceptors;
overrideWebservices = override.webservices;
overrideBeans = override.enterpriseBeans;
if(override.ejbVersion != null)
ejbVersion = override.ejbVersion;
if(override.metadataComplete)
metadataComplete = true;
// TODO: relationships should be merged
if(override.relationships != null)
relationships = original.relationships;
if(override.jaccContextID != null)
jaccContextID = override.jaccContextID;
if(override.jmxName != null)
jmxName = override.jmxName;
if(override.loaderRepository != null)
loaderRepository = override.loaderRepository;
if(override.securityDomain != null)
securityDomain = override.securityDomain;
if(override.unauthenticatedPrincipal != null)
unauthenticatedPrincipal = override.unauthenticatedPrincipal;
//Ensure that there is no customization of the Unspecified method permissions
if(override.excludeMissingMethods == false)
this.excludeMissingMethods = false;
if(override.containerConfigurations != null)
{
if(containerConfigurations == null)
containerConfigurations = new ContainerConfigurationsMetaData();
containerConfigurations.merge(override.containerConfigurations);
}
if(override.resourceManagers != null)
{
if(resourceManagers == null)
resourceManagers = new ResourceManagersMetaData();
resourceManagers.addAll(override.resourceManagers);
}
}
if(assemblyDescriptor == null)
assemblyDescriptor = new JBossAssemblyDescriptorMetaData();
if(overrideAssembly != null || originalAssembly != null)
assemblyDescriptor.merge(overrideAssembly, originalAssembly);
if(invokerProxyBindings == null)
invokerProxyBindings = new InvokerProxyBindingsMetaData();
if(overrideInvokerProxyBindings != null || originalInvokerProxyBindings != null)
invokerProxyBindings.merge(overrideInvokerProxyBindings, originalInvokerProxyBindings);
if(interceptors == null)
interceptors = new InterceptorsMetaData();
if(overrideInterceptors != null || originalInterceptors != null)
interceptors.merge(overrideInterceptors, originalInterceptors);
if (overrideWebservices != null || originalWebservices != null)
{