[jboss-dev-forums] [Design of POJO Server] - Re: ObjectModelFactories parsing empty xml elements
scott.stark@jboss.org
do-not-reply at jboss.com
Wed Jan 3 23:56:15 EST 2007
There is no reason for the setValue to be called on an empty element. There would have to be both a newChild and setValue to handle both cases. You don't need a separate SecurityDomain as you can return the parent element:
| public Object newChild(ConfigurationMetaData md, UnmarshallingContext navigator,
| String namespaceURI, String localName, Attributes attrs)
| {
| Object child = null;
| if (localName.equals("cluster-config"))
| {
| child = new ClusterConfigMetaData();
| }
| else if(localName.equals("container-interceptors") ||
| localName.equals("container-cache-conf") ||
| localName.equals("container-pool-conf"))
| {
| child = new DomElement(newDomElement(localName, attrs));
| }
| else if(localName.equals("security-domain"))
| {
| child = md;
| // Indicate a security-domain element was seen...
| md.setSecurityDomain(null);
| }
| return child;
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997825#3997825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997825
More information about the jboss-dev-forums
mailing list