On Thu, Dec 25, 2008 at 12:01 PM, Gavin King <gavin(a)hibernate.org> wrote:
On Wed, Dec 24, 2008 at 12:23 PM, Michael Keith
<MICHAEL.KEITH(a)oracle.com> wrote:
> I would say that writing web beans XML, which is more
> like code, requires a rather different mindset than what is applied when
> writing traditional Java EE descriptors.
Again, I disagree. For a developer configuring a pre-packaged library,
the "traditional" XML style requires a lot more knowledge of the code
(Java class, method names, etc) than the "web beans" style does. With
the web beans style, the configuration author doesn't see anything
about Java - everything they need to know is completely encapsulated
in the schema for the library.
I want to reiterate this, because it's an important point:
<web-bean>
<class>org.jboss.jbpm.Jbpm</class>
<field>
<name>datasource</name>
<value>java:comp/env/datasource</value>
</field>
</web-bean>
is a *much* more Java-code-centric approach, and requires much more
knowledge of the underlying Java classes, than:
<jbpm:Jbpm>
<jbpm:datasource>java:comp/env/datasource</jbpm:datasource>
</jbpm:Jbpm>
I really don't agree that the second example is "more like code", in
fact I think it's less like code.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org