[jboss-dev-forums] [Design of EJB 3.0] - Re: jboss_5_0.xsd: jboss version attribute
alex.loubyansky@jboss.com
do-not-reply at jboss.com
Tue Jan 6 18:02:23 EST 2009
Ok, let's revisit version attribute again. In jboss_5_0.xsd it is documented as the ejb spec version. But in case of DTD, it's the DTD version (from JBossMetaData):
/**
| * Callback for the DTD information
| */
| @XmlTransient
| public void setDTD(String root, String publicId, String systemId)
| {
| this.dtdPublicId = publicId;
| this.dtdSystemId = systemId;
| // Set the version based on the public id
| if (dtdPublicId != null && dtdPublicId.contains("3.0"))
| setVersion("3.0");
| if (dtdPublicId != null && dtdPublicId.contains("3.2"))
| setVersion("3.2");
| if (dtdPublicId != null && dtdPublicId.contains("4.0"))
| setVersion("4.0");
| if (dtdPublicId != null && dtdPublicId.contains("4.2"))
| setVersion("4.2");
| if (dtdPublicId != null && dtdPublicId.contains("5.0"))
| setVersion("5.0");
| }
In addition to version property, JBossMetaData has ejbVersion property, which is transient though and is set only by JBoss50Creator:
protected JBoss50MetaData create()
| {
| JBoss50MetaData metaData = new JBoss50MetaData();
| metaData.setVersion("3.0");
| metaData.setEjbVersion("3.0");
| return metaData;
| }
So, what the version attribute should indicate after all?
What if we follow the DTD logic for version and if necessary bind ejbVersion to an attribute (ejb-version) instead?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199937#4199937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199937
More information about the jboss-dev-forums
mailing list