[jboss-dev-forums] [Design of POJO Server] - Re: So what does unification mean for the ejb containers

wolfc do-not-reply at jboss.com
Thu Oct 18 09:38:40 EDT 2007


"scott.stark at jboss.org" wrote : This looks ok, what is the problem?
  | <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
  |   |             targetNamespace="http://www.jboss.com/xml/ns/javaee"
  |   |             xmlns:javaee="http://java.sun.com/xml/ns/javaee"
  |   |             xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
  |   |             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  |   |             elementFormDefault="qualified" 
  |   |             attributeFormDefault="unqualified"
  |   |             version="5.0">
No problem there, that's the easy part.
"weston.price at jboss.com" wrote : Again, I brought this up on one of our interminable meetings on Friday. Why are we including the Sun EE namespace in our stuff? Can't we simply use the Sun stuff as a base and then extend it?
If you mean creating extensions with javaee as the base like this:
   <xsd:complexType name="jboss-resource-env-refType">
  |       <xsd:annotation>
  |          <xsd:documentation> The resource-env-ref element gives a mapping between the "code name" of a
  |             env resource (res-ref-name, provided by the Bean Developer) and its deployed JNDI name.
  |          </xsd:documentation>
  |       </xsd:annotation>
  | 
  |       <xsd:complexContent>
  |          <xsd:extension base="javaee:resource-env-refType">
  |             <xsd:sequence>
  |                <xsd:element name="jndi-name" type="javaee:jndi-nameType"/>
  |             </xsd:sequence>
  |          </xsd:extension>
  |       </xsd:complexContent>
  |    </xsd:complexType>
then you're back at the original problem, which is that the Sun xsds don't expose any elements.
So for example there is no jee:description that you can reference when building JBoss elements. Thus unmarshalling will get: org.jboss.xb.binding.JBossXBRuntimeException: {http://www.jboss.com/xml/ns/javaee}description not found as a child of {http://www.jboss.com/xml/ns/javaee}ejb-ref
Changing the xml will give: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jee:description'. One of '{"http://www.jboss.com/xml/ns/javaee":description,
  | "http://www.jboss.com/xml/ns/javaee":ejb-ref-name, 
  | "http://www.jboss.com/xml/ns/javaee":ejb-ref-type, 
  | "http://www.jboss.com/xml/ns/javaee":home, 
  | "http://www.jboss.com/xml/ns/javaee":remote, 
  | "http://www.jboss.com/xml/ns/javaee":ejb-link, 
  | "http://www.jboss.com/xml/ns/javaee":mapped-name, 
  | "http://www.jboss.com/xml/ns/javaee":injection-target, 
  | "http://www.jboss.com/xml/ns/javaee":jndi-name, 
  | "http://www.jboss.com/xml/ns/javaee":ignore-dependency}' is expected. 
  | @ file:/home/carlo/work/metadata/target/eclipse-classes/org/jboss/test/metadata/ejb/JBoss50_testService.xml[16,30]
Thus ignore-dependency will have an jboss:injection-target, while resource-env-ref will have a javaee:injection-target. If javaee:injection-target was exposed, then ignore-dependency could ref that element and the world would be a better place.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096557#4096557

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096557



More information about the jboss-dev-forums mailing list