users@javaee-spec.java.net

[javaee-spec users] Fwd: [jsr342-experts] Re: Configuration

From: Pete Muir <pmuir_at_bleepbleep.org.uk>
Date: Mon, 6 Jun 2011 11:46:05 +0100

Reza,

I definitely agree with you and Antonio that Java EE needs a deployment descriptor update!

The portable extension approach works very well for configuring CDI beans, but it doesn't help when configuring other specs.

Seam XML works by altering the metadata about classes/annotations that CDI sees. It uses the lifecycle events to perform that alteration. Unfortunately, nobody but CDI will look at this altered metadata, so e.g. if you add an annotation to a servlet using Seam Config, you won't see that applied.

One way to address this would be to make all specs able to be configured completely programmatically, thus allowing an app server to have a pluggable configuration layer, ala Seam Config.

Pete

On 2 Jun 2011, at 20:25, Reza Rahman wrote:

> I agree with Antonio that XML configuration in the platform needs some love too :-).
>
> However, I'm unsure on what priority this should receive or whether a Portable Extension like Seam 3 Configuration is good enough for now...
>
> Cheers,
> Reza
>
>
> On 6/2/2011 1:47 PM, Antonio Goncalves wrote:
>> I would like to share some thoughts with you.
>>
>> I've used in the past Spring Config and latelly I've attended a conference that talked about Seam Config. Clearly I can see the benefit of having easy configuration on the entire platform. At the moment we have ejb-jar.xml and environment entries to configure our EJBs. We can also use the web.xml to pass some parameters to our servlets and bits and pieces in the application.xml file.
>>
>> Why not having a seperate spec that takes inspiration from Seam Config, Spring Config and so on to be able to configure the entire platform (a CDI bean as well as an EJB...). Configuration will also be used for Paas purposes of course.
>>
>> Configuration is an important topic and developers never know where to put it : property files, XML, database, JNDI. Why not having a spec that specifies how configuration should work (I really like the Seam Config approach) and each spec could then use it to specify how to configure a specific component, as well as batch processing or Paas/Saas configuration...
>>
>> Again, my 2 cents
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site | Twitter | Blog | LinkedIn | Paris JUG
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1375 / Virus Database: 1511/3675 - Release Date: 06/02/11
>>
>