[jboss-dev-forums] [Design of POJO Server] - Missing feature in EJB2 ContainerConfiguration merge
adrian@jboss.org
do-not-reply at jboss.com
Mon Dec 10 12:01:56 EST 2007
In the old EJB2 container configuration, you could do something like this
which is an extension of the container configuration without changing its name
| <container-configurations>
| <container-configuration>
| <container-name>Standard Stateless SessionBean</container-name>
| <depends>test:name=Test</depends>
| </container-configuration>
| </container-configurations>
|
This is the old code (note the comment).
| Element conf = (Element)iterator.next();
| String confName = getElementContent(getUniqueChild(conf,
| "container-name"));
| String parentConfName = conf.getAttribute("extends");
| if (parentConfName != null && parentConfName.trim().length() == 0)
| {
| parentConfName = null;
| }
|
| // Allow the configuration to inherit from a standard
| // configuration. This is determined by looking for a
| // configuration matching the name given by the extends
| // attribute, or if extends was not specified, an
| // existing configuration with the same.
| ConfigurationMetaData configurationMetaData = null;
| if (parentConfName != null)
| {
| configurationMetaData = getConfigurationMetaDataByName(parentConfName);
| if (configurationMetaData == null)
| {
| throw new DeploymentException("Failed to find " +
| "parent config=" + parentConfName);
| }
|
| // Make a copy of the existing configuration
| configurationMetaData =
| (ConfigurationMetaData)configurationMetaData.clone();
| configurations.put(confName, configurationMetaData);
| }
|
| if (configurationMetaData == null)
| {
| configurationMetaData =
| getConfigurationMetaDataByName(confName);
| }
|
| // Create a new configuration if none was found
| if (configurationMetaData == null)
| {
| configurationMetaData = new ConfigurationMetaData(confName);
| configurations.put(confName, configurationMetaData);
| }
|
This isn't working in the new metadata because the the wrapper
only looks at the extends attribute.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111699#4111699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111699
More information about the jboss-dev-forums
mailing list