<html><body>
<p><tt>Scott Ferguson &lt;ferg@caucho.com&gt; wrote on 01/07/2009 04:13:11 PM:<br>
&gt; On Jan 7, 2009, at 1:16 PM, Jim Knutson wrote:</tt><br>
<tt>&gt; <br>
&gt; As Mike has mentioned, I also prefer platform consistency and if there's<br>
&gt; a problem with the platform view, we should fix it for the platform.<br>
&gt; <br>
&gt; Let me throw out some potentials here:<br>
&gt; <br>
&gt; * There is a general pattern existing in the platform today for sharing<br>
&gt; &nbsp; schemas across the technologies. &nbsp;Web services, servlets, ejbs, and I<br>
&gt; &nbsp; believe JCA Adapters all use this. &nbsp;Given that this metadata is likely<br>
&gt; &nbsp; to be shared across multiple technologies, it might be worth looking<br>
&gt; &nbsp; at reusing the platform schema sharing mechanism to encorporate the <br>
&gt; &nbsp; metadata into existing platform DDs. &nbsp;This further emphasises the <br>
&gt; &nbsp; fact that this spec. is using the existing platform component model<br>
&gt; &nbsp; to enhance it. &nbsp;</tt><br>
<tt>&gt; To be clear, the specifics that you're proposing are:</tt><br>
<tt>&gt; <br>
&gt; 1. &lt;web-beans xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;&gt;</tt><br>
<tt>&gt; <br>
&gt; 2. Import the &lt;ejb-ref&gt;, &lt;message-ref&gt;, etc. syntax into the web-beans.xml</tt><br>
<br>
<tt>You have it backwards. &nbsp;I was expecting that a schema describing this</tt><br>
<tt>spec's metadata be imported into the EJB JAR schema so that components</tt><br>
<tt>can be decorated with the metadata they need. &nbsp;It is (was?) how web service </tt><br>
<tt>metadata is handled.</tt><br>
<tt><br>
&gt; For #1, it's important to remember that the official namespace has <br>
&gt; changed in almost every version of the JavaEE specs. &nbsp;So it's not <br>
&gt; accurate to say JavaEE has a history of consistent namespaces.</tt><br>
<tt>&gt; <br>
&gt; Long term, the reverse would be better, i.e. use the WebBeans <br>
&gt; namespace style instead of the older JavaEE style. &nbsp;For JavaEE, a <br>
&gt; big advantage would be making JavaEE configuration more modular and <br>
&gt; extensible. &nbsp;For example:</tt><br>
<tt>&gt; <br>
&gt; &nbsp; &lt;web-app xmlns=&quot;urn:java:javax.servlet&quot; </tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:javaee=&quot;urn:java:javax.javaee&quot;</tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:ejb=&quot;urn:java:javax.ejb&quot;</tt><br>
<tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:jms=&quot;urn:java:javax.jms&quot;&gt;</tt><br>
<tt>&gt; <br>
&gt; &nbsp; &nbsp; &lt;javaee:resource-ref&gt; ...</tt><br>
<tt>&gt; &nbsp; &nbsp; &lt;javaee:env-entry&gt;...</tt><br>
<tt>&gt; &nbsp; &nbsp; &lt;ejb:ejb-ref&gt; ...</tt><br>
<tt>&gt; &nbsp; &nbsp; &lt;jms:message-destination-ref&gt; ...</tt><br>
<tt>&gt; <br>
&gt; &nbsp; &lt;/web-app&gt;</tt><br>
<tt>&gt; <br>
&gt; I'd love to see the above change happen in JavaEE 6 as a platform-<br>
&gt; wide, consistent, modular naming scheme.</tt><br>
<br>
<tt>I think pretty much everything is moving to the JAXB rules. &nbsp;The</tt><br>
<tt>JAXRPC rules were not sufficient for all cases.</tt><br>
<tt><br>
&gt; For #2, if the modularity in #1 were adopted, then you'd solve #2 <br>
&gt; automatically. &nbsp;Otherwise, #2 is a bit odd, because those ejb-ref, <br>
&gt; message-ref, etc really should be designed as a layer on top of <br>
&gt; JavaEE IoC. &nbsp;The ejb-ref, etc should not be peers of WebBeans, they <br>
&gt; should be layered on top of it.</tt><br>
<br>
<tt>I'm not understanding the nuances here, but I'll try to dig deeper</tt><br>
<tt>to see if I get it. &nbsp;To me refs are refs and if some of them happen</tt><br>
<tt>to resolve to instances with a context based lifecycle, so be it.</tt><br>
<tt>It's how I would expect platform integration to work. &nbsp;If there's</tt><br>
<tt>refs and then there's something else which is similar, but not the</tt><br>
<tt>same, then I think we have a problem. &nbsp;It goes back to the </tt><br>
<tt>issue of perceiving arbitrary differences that is so frustrating</tt><br>
<tt>when trying to learn something.</tt><br>
<tt><br>
&gt; * Any Java-XML mappings should not be defined by this spec. &nbsp;JAXB already<br>
&gt; &nbsp; covers appropriate Java-XML mappings and we shouldn't define anything<br>
&gt; &nbsp; different. &nbsp;It's a pain to do and get it right for all cases.</tt><br>
<tt>&gt; It would be a mistake to use JAXB, because JAXB is solving a <br>
&gt; different problem: general XML/Java serialization as opposed to XML <br>
&gt; configuration. &nbsp;A hammer is not appropriate for every task, and <br>
&gt; specifically, the semantics of configuration do not match the <br>
&gt; semantics of deserialization. &nbsp;No one is proposing that the XML <br>
&gt; configuration be a general Java deserialization specification. &nbsp;In <br>
&gt; this situation, the semantics are sufficiently different that each <br>
&gt; spec should focus on its core needs and not try to overgeneralize.</tt><br>
<br>
<tt>If you consider all of JAXB, yes, it's solving a different problem,</tt><br>
<tt>but JAXB already defines a full Java-XML schema mapping based on</tt><br>
<tt>quite a bit of experience. &nbsp;It would be a mistake not to consider</tt><br>
<tt>the JAXB mapping rules and come up with an arbitrarily different</tt><br>
<tt>set and different tools required to perform that mapping.</tt><br>
<tt><br>
Thanks,<br>
Jim Knutson<br>
WebSphere J2EE Architect</tt><br>
<br>
</body></html>