Seam XML config

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Seam XML config

Jason Porter
I'm going to send probably the most comprehensive example that exists about
what Seam XML can do:

https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml

You can also find the Java classes that back that config at
https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue

Mark, could you give some examples of the stuff you would like to see as
well?

--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Romain Manni-Bucau
each time i read this kind of conf i think it should be the opposite

why not extending beans.xml (just in the spirit, not in the same file)
adding <qualfiiers> etc?


*Romain Manni-Bucau*
*Twitter: @rmannibucau*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*




2012/9/25 Jason Porter <[hidden email]>

> I'm going to send probably the most comprehensive example that exists about
> what Seam XML can do:
>
>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>
> You can also find the Java classes that back that config at
>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>
> Mark, could you give some examples of the stuff you would like to see as
> well?
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Jason Porter
It did (maybe it still does), but at some point we decided that wasn't
recommended, I don't recall why though, perhaps Stuart or Pete remembers.

On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
<[hidden email]>wrote:

> each time i read this kind of conf i think it should be the opposite
>
> why not extending beans.xml (just in the spirit, not in the same file)
> adding <qualfiiers> etc?
>
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>
>
>
>
> 2012/9/25 Jason Porter <[hidden email]>
>
> > I'm going to send probably the most comprehensive example that exists
> about
> > what Seam XML can do:
> >
> >
> >
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
> >
> > You can also find the Java classes that back that config at
> >
> >
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
> >
> > Mark, could you give some examples of the stuff you would like to see as
> > well?
> >
> > --
> > Jason Porter
> > http://lightguard-jp.blogspot.com
> > http://twitter.com/lightguardjp
> >
> > Software Engineer
> > Open Source Advocate
> > Author of Seam Catch - Next Generation Java Exception Handling
> >
> > PGP key id: 926CCFF5
> > PGP key available at: keyserver.net, pgp.mit.edu
> >
>



--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Marek Schmidt
The Solder docs hints:

> The beans.xml file is the preferred way of configuring beans via XML; however some CDI implementations will not allow this, so seam-beans.xml is provided as an alternative.

I guess the problem was reading WEB-INF/beans.xml before the
ServletContext is available, which is only possible with some
non-portable hacks AFAIK (see Solder
org.jboss.solder.servlet.resource.WebResourceLocationProvider)

--
Marek Schmidt
Seam QE


On 25/09/12 01:19, Jason Porter wrote:

> It did (maybe it still does), but at some point we decided that wasn't
> recommended, I don't recall why though, perhaps Stuart or Pete remembers.
>
> On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
> <[hidden email]>wrote:
>
>> each time i read this kind of conf i think it should be the opposite
>>
>> why not extending beans.xml (just in the spirit, not in the same file)
>> adding <qualfiiers> etc?
>>
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>
>>
>>
>>
>> 2012/9/25 Jason Porter <[hidden email]>
>>
>>> I'm going to send probably the most comprehensive example that exists
>> about
>>> what Seam XML can do:
>>>
>>>
>>>
>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>
>>> You can also find the Java classes that back that config at
>>>
>>>
>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>
>>> Mark, could you give some examples of the stuff you would like to see as
>>> well?
>>>
>>> --
>>> Jason Porter
>>> http://lightguard-jp.blogspot.com
>>> http://twitter.com/lightguardjp
>>>
>>> Software Engineer
>>> Open Source Advocate
>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>
>>> PGP key id: 926CCFF5
>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Jason Porter
Okay, that sounds about right. Then we said just use seam-beans.xml. The WebResource hacks came much later.

Sent from my iPhone

On Sep 26, 2012, at 6:39, Marek Schmidt <[hidden email]> wrote:

> The Solder docs hints:
>
>> The beans.xml file is the preferred way of configuring beans via XML; however some CDI implementations will not allow this, so seam-beans.xml is provided as an alternative.
>
> I guess the problem was reading WEB-INF/beans.xml before the
> ServletContext is available, which is only possible with some
> non-portable hacks AFAIK (see Solder
> org.jboss.solder.servlet.resource.WebResourceLocationProvider)
>
> --
> Marek Schmidt
> Seam QE
>
>
> On 25/09/12 01:19, Jason Porter wrote:
>> It did (maybe it still does), but at some point we decided that wasn't
>> recommended, I don't recall why though, perhaps Stuart or Pete remembers.
>>
>> On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
>> <[hidden email]>wrote:
>>
>>> each time i read this kind of conf i think it should be the opposite
>>>
>>> why not extending beans.xml (just in the spirit, not in the same file)
>>> adding <qualfiiers> etc?
>>>
>>>
>>> *Romain Manni-Bucau*
>>> *Twitter: @rmannibucau*
>>> *Blog: **http://rmannibucau.wordpress.com/*<
>>> http://rmannibucau.wordpress.com/>
>>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>>
>>>
>>>
>>>
>>> 2012/9/25 Jason Porter <[hidden email]>
>>>
>>>> I'm going to send probably the most comprehensive example that exists
>>> about
>>>> what Seam XML can do:
>>>>
>>>>
>>>>
>>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>>
>>>> You can also find the Java classes that back that config at
>>>>
>>>>
>>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>>
>>>> Mark, could you give some examples of the stuff you would like to see as
>>>> well?
>>>>
>>>> --
>>>> Jason Porter
>>>> http://lightguard-jp.blogspot.com
>>>> http://twitter.com/lightguardjp
>>>>
>>>> Software Engineer
>>>> Open Source Advocate
>>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>>
>>>> PGP key id: 926CCFF5
>>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>
>>>
>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Pete Muir
In reply to this post by Jason Porter
Original inspiration for xml came from Gavin's design for CDI 1.0. I don't know more details about why they went this direction.

On 25 Sep 2012, at 00:19, Jason Porter wrote:

> It did (maybe it still does), but at some point we decided that wasn't
> recommended, I don't recall why though, perhaps Stuart or Pete remembers.
>
> On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
> <[hidden email]>wrote:
>
>> each time i read this kind of conf i think it should be the opposite
>>
>> why not extending beans.xml (just in the spirit, not in the same file)
>> adding <qualfiiers> etc?
>>
>>
>> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau*
>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>
>>
>>
>>
>> 2012/9/25 Jason Porter <[hidden email]>
>>
>>> I'm going to send probably the most comprehensive example that exists
>> about
>>> what Seam XML can do:
>>>
>>>
>>>
>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>
>>> You can also find the Java classes that back that config at
>>>
>>>
>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>
>>> Mark, could you give some examples of the stuff you would like to see as
>>> well?
>>>
>>> --
>>> Jason Porter
>>> http://lightguard-jp.blogspot.com
>>> http://twitter.com/lightguardjp
>>>
>>> Software Engineer
>>> Open Source Advocate
>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>
>>> PGP key id: 926CCFF5
>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>
>>
>
>
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu

Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Jason Porter
Mark, do you have an example for InterDyn (or whatever it's called?)

We also need to decide if we're going to allow creation of new beans or
simply configure existing beans (adding / removing metadata) using this
configuration.

On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]> wrote:

> Original inspiration for xml came from Gavin's design for CDI 1.0. I don't
> know more details about why they went this direction.
>
> On 25 Sep 2012, at 00:19, Jason Porter wrote:
>
> > It did (maybe it still does), but at some point we decided that wasn't
> > recommended, I don't recall why though, perhaps Stuart or Pete remembers.
> >
> > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
> > <[hidden email]>wrote:
> >
> >> each time i read this kind of conf i think it should be the opposite
> >>
> >> why not extending beans.xml (just in the spirit, not in the same file)
> >> adding <qualfiiers> etc?
> >>
> >>
> >> *Romain Manni-Bucau*
> >> *Twitter: @rmannibucau*
> >> *Blog: **http://rmannibucau.wordpress.com/*<
> >> http://rmannibucau.wordpress.com/>
> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>
> >>
> >>
> >>
> >> 2012/9/25 Jason Porter <[hidden email]>
> >>
> >>> I'm going to send probably the most comprehensive example that exists
> >> about
> >>> what Seam XML can do:
> >>>
> >>>
> >>>
> >>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
> >>>
> >>> You can also find the Java classes that back that config at
> >>>
> >>>
> >>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
> >>>
> >>> Mark, could you give some examples of the stuff you would like to see
> as
> >>> well?
> >>>
> >>> --
> >>> Jason Porter
> >>> http://lightguard-jp.blogspot.com
> >>> http://twitter.com/lightguardjp
> >>>
> >>> Software Engineer
> >>> Open Source Advocate
> >>> Author of Seam Catch - Next Generation Java Exception Handling
> >>>
> >>> PGP key id: 926CCFF5
> >>> PGP key available at: keyserver.net, pgp.mit.edu
> >>>
> >>
> >
> >
> >
> > --
> > Jason Porter
> > http://lightguard-jp.blogspot.com
> > http://twitter.com/lightguardjp
> >
> > Software Engineer
> > Open Source Advocate
> > Author of Seam Catch - Next Generation Java Exception Handling
> >
> > PGP key id: 926CCFF5
> > PGP key available at: keyserver.net, pgp.mit.edu
>
>


--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Mark Struberg
Administrator
sure, check the readme:
https://github.com/struberg/InterDyn

LieGrue,
strub




----- Original Message -----

> From: Jason Porter <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Thursday, October 11, 2012 10:58 PM
> Subject: Re: Seam XML config
>
> Mark, do you have an example for InterDyn (or whatever it's called?)
>
> We also need to decide if we're going to allow creation of new beans or
> simply configure existing beans (adding / removing metadata) using this
> configuration.
>
> On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]> wrote:
>
>>  Original inspiration for xml came from Gavin's design for CDI 1.0. I
> don't
>>  know more details about why they went this direction.
>>
>>  On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>
>>  > It did (maybe it still does), but at some point we decided that
> wasn't
>>  > recommended, I don't recall why though, perhaps Stuart or Pete
> remembers.
>>  >
>>  > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
>>  > <[hidden email]>wrote:
>>  >
>>  >> each time i read this kind of conf i think it should be the
> opposite
>>  >>
>>  >> why not extending beans.xml (just in the spirit, not in the same
> file)
>>  >> adding <qualfiiers> etc?
>>  >>
>>  >>
>>  >> *Romain Manni-Bucau*
>>  >> *Twitter: @rmannibucau*
>>  >> *Blog: **http://rmannibucau.wordpress.com/*<
>>  >> http://rmannibucau.wordpress.com/>
>>  >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>  >>
>>  >>
>>  >>
>>  >>
>>  >> 2012/9/25 Jason Porter <[hidden email]>
>>  >>
>>  >>> I'm going to send probably the most comprehensive example
> that exists
>>  >> about
>>  >>> what Seam XML can do:
>>  >>>
>>  >>>
>>  >>>
>>  >>
>>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>  >>>
>>  >>> You can also find the Java classes that back that config at
>>  >>>
>>  >>>
>>  >>
>>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>  >>>
>>  >>> Mark, could you give some examples of the stuff you would like
> to see
>>  as
>>  >>> well?
>>  >>>
>>  >>> --
>>  >>> Jason Porter
>>  >>> http://lightguard-jp.blogspot.com
>>  >>> http://twitter.com/lightguardjp
>>  >>>
>>  >>> Software Engineer
>>  >>> Open Source Advocate
>>  >>> Author of Seam Catch - Next Generation Java Exception Handling
>>  >>>
>>  >>> PGP key id: 926CCFF5
>>  >>> PGP key available at: keyserver.net, pgp.mit.edu
>>  >>>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > Jason Porter
>>  > http://lightguard-jp.blogspot.com
>>  > http://twitter.com/lightguardjp
>>  >
>>  > Software Engineer
>>  > Open Source Advocate
>>  > Author of Seam Catch - Next Generation Java Exception Handling
>>  >
>>  > PGP key id: 926CCFF5
>>  > PGP key available at: keyserver.net, pgp.mit.edu
>>
>>
>
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Jason Porter
Great! Thanks Mark. Nothing really complicated here. I think the big
question now, is being able to actually create new beans using the config,
or if we simply want to modify existing beans. For me personally I'm -1 on
creating beans using config and +1 on modifying existing beans.

On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg <[hidden email]> wrote:

> sure, check the readme:
> https://github.com/struberg/InterDyn
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
> > From: Jason Porter <[hidden email]>
> > To: [hidden email]
> > Cc:
> > Sent: Thursday, October 11, 2012 10:58 PM
> > Subject: Re: Seam XML config
> >
> > Mark, do you have an example for InterDyn (or whatever it's called?)
> >
> > We also need to decide if we're going to allow creation of new beans or
> > simply configure existing beans (adding / removing metadata) using this
> > configuration.
> >
> > On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]> wrote:
> >
> >>  Original inspiration for xml came from Gavin's design for CDI 1.0. I
> > don't
> >>  know more details about why they went this direction.
> >>
> >>  On 25 Sep 2012, at 00:19, Jason Porter wrote:
> >>
> >>  > It did (maybe it still does), but at some point we decided that
> > wasn't
> >>  > recommended, I don't recall why though, perhaps Stuart or Pete
> > remembers.
> >>  >
> >>  > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
> >>  > <[hidden email]>wrote:
> >>  >
> >>  >> each time i read this kind of conf i think it should be the
> > opposite
> >>  >>
> >>  >> why not extending beans.xml (just in the spirit, not in the same
> > file)
> >>  >> adding <qualfiiers> etc?
> >>  >>
> >>  >>
> >>  >> *Romain Manni-Bucau*
> >>  >> *Twitter: @rmannibucau*
> >>  >> *Blog: **http://rmannibucau.wordpress.com/*<
> >>  >> http://rmannibucau.wordpress.com/>
> >>  >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>  >>
> >>  >>
> >>  >>
> >>  >>
> >>  >> 2012/9/25 Jason Porter <[hidden email]>
> >>  >>
> >>  >>> I'm going to send probably the most comprehensive example
> > that exists
> >>  >> about
> >>  >>> what Seam XML can do:
> >>  >>>
> >>  >>>
> >>  >>>
> >>  >>
> >>
> >
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
> >>  >>>
> >>  >>> You can also find the Java classes that back that config at
> >>  >>>
> >>  >>>
> >>  >>
> >>
> >
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
> >>  >>>
> >>  >>> Mark, could you give some examples of the stuff you would like
> > to see
> >>  as
> >>  >>> well?
> >>  >>>
> >>  >>> --
> >>  >>> Jason Porter
> >>  >>> http://lightguard-jp.blogspot.com
> >>  >>> http://twitter.com/lightguardjp
> >>  >>>
> >>  >>> Software Engineer
> >>  >>> Open Source Advocate
> >>  >>> Author of Seam Catch - Next Generation Java Exception Handling
> >>  >>>
> >>  >>> PGP key id: 926CCFF5
> >>  >>> PGP key available at: keyserver.net, pgp.mit.edu
> >>  >>>
> >>  >>
> >>  >
> >>  >
> >>  >
> >>  > --
> >>  > Jason Porter
> >>  > http://lightguard-jp.blogspot.com
> >>  > http://twitter.com/lightguardjp
> >>  >
> >>  > Software Engineer
> >>  > Open Source Advocate
> >>  > Author of Seam Catch - Next Generation Java Exception Handling
> >>  >
> >>  > PGP key id: 926CCFF5
> >>  > PGP key available at: keyserver.net, pgp.mit.edu
> >>
> >>
> >
> >
> > --
> > Jason Porter
> > http://lightguard-jp.blogspot.com
> > http://twitter.com/lightguardjp
> >
> > Software Engineer
> > Open Source Advocate
> > Author of Seam Catch - Next Generation Java Exception Handling
> >
> > PGP key id: 926CCFF5
> > PGP key available at: keyserver.net, pgp.mit.edu
> >
>



--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Shane Bryzak-2
I think we have to support creation of new beans.  Take a look at [1],
which is a blog post on configuring Drools within Spring.  A little way
down, under the sessions.xml heading he has an example showing a Drools
configuration.  We need to be able to support the same kind of
configuration with CDI.

On 12/10/12 08:00, Jason Porter wrote:

> Great! Thanks Mark. Nothing really complicated here. I think the big
> question now, is being able to actually create new beans using the config,
> or if we simply want to modify existing beans. For me personally I'm -1 on
> creating beans using config and +1 on modifying existing beans.
>
> On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg <[hidden email]> wrote:
>
>> sure, check the readme:
>> https://github.com/struberg/InterDyn
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>> ----- Original Message -----
>>> From: Jason Porter <[hidden email]>
>>> To: [hidden email]
>>> Cc:
>>> Sent: Thursday, October 11, 2012 10:58 PM
>>> Subject: Re: Seam XML config
>>>
>>> Mark, do you have an example for InterDyn (or whatever it's called?)
>>>
>>> We also need to decide if we're going to allow creation of new beans or
>>> simply configure existing beans (adding / removing metadata) using this
>>> configuration.
>>>
>>> On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]> wrote:
>>>
>>>>   Original inspiration for xml came from Gavin's design for CDI 1.0. I
>>> don't
>>>>   know more details about why they went this direction.
>>>>
>>>>   On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>>>
>>>>   > It did (maybe it still does), but at some point we decided that
>>> wasn't
>>>>   > recommended, I don't recall why though, perhaps Stuart or Pete
>>> remembers.
>>>>   >
>>>>   > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
>>>>   > <[hidden email]>wrote:
>>>>   >
>>>>   >> each time i read this kind of conf i think it should be the
>>> opposite
>>>>   >>
>>>>   >> why not extending beans.xml (just in the spirit, not in the same
>>> file)
>>>>   >> adding <qualfiiers> etc?
>>>>   >>
>>>>   >>
>>>>   >> *Romain Manni-Bucau*
>>>>   >> *Twitter: @rmannibucau*
>>>>   >> *Blog: **http://rmannibucau.wordpress.com/*<
>>>>   >> http://rmannibucau.wordpress.com/>
>>>>   >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>>>   >>
>>>>   >>
>>>>   >>
>>>>   >>
>>>>   >> 2012/9/25 Jason Porter <[hidden email]>
>>>>   >>
>>>>   >>> I'm going to send probably the most comprehensive example
>>> that exists
>>>>   >> about
>>>>   >>> what Seam XML can do:
>>>>   >>>
>>>>   >>>
>>>>   >>>
>>>>   >>
>>>>
>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>>   >>>
>>>>   >>> You can also find the Java classes that back that config at
>>>>   >>>
>>>>   >>>
>>>>   >>
>>>>
>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>>   >>>
>>>>   >>> Mark, could you give some examples of the stuff you would like
>>> to see
>>>>   as
>>>>   >>> well?
>>>>   >>>
>>>>   >>> --
>>>>   >>> Jason Porter
>>>>   >>> http://lightguard-jp.blogspot.com
>>>>   >>> http://twitter.com/lightguardjp
>>>>   >>>
>>>>   >>> Software Engineer
>>>>   >>> Open Source Advocate
>>>>   >>> Author of Seam Catch - Next Generation Java Exception Handling
>>>>   >>>
>>>>   >>> PGP key id: 926CCFF5
>>>>   >>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>   >>>
>>>>   >>
>>>>   >
>>>>   >
>>>>   >
>>>>   > --
>>>>   > Jason Porter
>>>>   > http://lightguard-jp.blogspot.com
>>>>   > http://twitter.com/lightguardjp
>>>>   >
>>>>   > Software Engineer
>>>>   > Open Source Advocate
>>>>   > Author of Seam Catch - Next Generation Java Exception Handling
>>>>   >
>>>>   > PGP key id: 926CCFF5
>>>>   > PGP key available at: keyserver.net, pgp.mit.edu
>>>>
>>>>
>>>
>>> --
>>> Jason Porter
>>> http://lightguard-jp.blogspot.com
>>> http://twitter.com/lightguardjp
>>>
>>> Software Engineer
>>> Open Source Advocate
>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>
>>> PGP key id: 926CCFF5
>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Shane Bryzak-2
It might help if I include the link....


[1]
http://lucazamador.wordpress.com/2010/05/27/drools-server-spring-configuration/

On 12/10/12 09:01, Shane Bryzak wrote:

> I think we have to support creation of new beans.  Take a look at [1],
> which is a blog post on configuring Drools within Spring.  A little
> way down, under the sessions.xml heading he has an example showing a
> Drools configuration.  We need to be able to support the same kind of
> configuration with CDI.
>
> On 12/10/12 08:00, Jason Porter wrote:
>> Great! Thanks Mark. Nothing really complicated here. I think the big
>> question now, is being able to actually create new beans using the
>> config,
>> or if we simply want to modify existing beans. For me personally I'm
>> -1 on
>> creating beans using config and +1 on modifying existing beans.
>>
>> On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg <[hidden email]>
>> wrote:
>>
>>> sure, check the readme:
>>> https://github.com/struberg/InterDyn
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>>> From: Jason Porter <[hidden email]>
>>>> To: [hidden email]
>>>> Cc:
>>>> Sent: Thursday, October 11, 2012 10:58 PM
>>>> Subject: Re: Seam XML config
>>>>
>>>> Mark, do you have an example for InterDyn (or whatever it's called?)
>>>>
>>>> We also need to decide if we're going to allow creation of new
>>>> beans or
>>>> simply configure existing beans (adding / removing metadata) using
>>>> this
>>>> configuration.
>>>>
>>>> On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]> wrote:
>>>>
>>>>>   Original inspiration for xml came from Gavin's design for CDI
>>>>> 1.0. I
>>>> don't
>>>>>   know more details about why they went this direction.
>>>>>
>>>>>   On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>>>>
>>>>>   > It did (maybe it still does), but at some point we decided that
>>>> wasn't
>>>>>   > recommended, I don't recall why though, perhaps Stuart or Pete
>>>> remembers.
>>>>>   >
>>>>>   > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
>>>>>   > <[hidden email]>wrote:
>>>>>   >
>>>>>   >> each time i read this kind of conf i think it should be the
>>>> opposite
>>>>>   >>
>>>>>   >> why not extending beans.xml (just in the spirit, not in the same
>>>> file)
>>>>>   >> adding <qualfiiers> etc?
>>>>>   >>
>>>>>   >>
>>>>>   >> *Romain Manni-Bucau*
>>>>>   >> *Twitter: @rmannibucau*
>>>>>   >> *Blog: **http://rmannibucau.wordpress.com/*<
>>>>>   >> http://rmannibucau.wordpress.com/>
>>>>>   >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>>>>   >>
>>>>>   >>
>>>>>   >>
>>>>>   >>
>>>>>   >> 2012/9/25 Jason Porter <[hidden email]>
>>>>>   >>
>>>>>   >>> I'm going to send probably the most comprehensive example
>>>> that exists
>>>>>   >> about
>>>>>   >>> what Seam XML can do:
>>>>>   >>>
>>>>>   >>>
>>>>>   >>>
>>>>>   >>
>>>>>
>>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml 
>>>
>>>>>   >>>
>>>>>   >>> You can also find the Java classes that back that config at
>>>>>   >>>
>>>>>   >>>
>>>>>   >>
>>>>>
>>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue 
>>>
>>>>>   >>>
>>>>>   >>> Mark, could you give some examples of the stuff you would like
>>>> to see
>>>>>   as
>>>>>   >>> well?
>>>>>   >>>
>>>>>   >>> --
>>>>>   >>> Jason Porter
>>>>>   >>> http://lightguard-jp.blogspot.com
>>>>>   >>> http://twitter.com/lightguardjp
>>>>>   >>>
>>>>>   >>> Software Engineer
>>>>>   >>> Open Source Advocate
>>>>>   >>> Author of Seam Catch - Next Generation Java Exception Handling
>>>>>   >>>
>>>>>   >>> PGP key id: 926CCFF5
>>>>>   >>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>>   >>>
>>>>>   >>
>>>>>   >
>>>>>   >
>>>>>   >
>>>>>   > --
>>>>>   > Jason Porter
>>>>>   > http://lightguard-jp.blogspot.com
>>>>>   > http://twitter.com/lightguardjp
>>>>>   >
>>>>>   > Software Engineer
>>>>>   > Open Source Advocate
>>>>>   > Author of Seam Catch - Next Generation Java Exception Handling
>>>>>   >
>>>>>   > PGP key id: 926CCFF5
>>>>>   > PGP key available at: keyserver.net, pgp.mit.edu
>>>>>
>>>>>
>>>>
>>>> --
>>>> Jason Porter
>>>> http://lightguard-jp.blogspot.com
>>>> http://twitter.com/lightguardjp
>>>>
>>>> Software Engineer
>>>> Open Source Advocate
>>>> Author of Seam Catch - Next Generation Java Exception Handling
>>>>
>>>> PGP key id: 926CCFF5
>>>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Mark Struberg
Administrator
In reply to this post by Shane Bryzak-2
well, there is an important distinction between creating new beans for classes which are in a BDA and others who don't.

In CDI-1.0 it's not defined what happens if you do BeforeBeanDiscovery#addAnnotatedType for a class which is already in a BDA and would get picked up automatically. Some containers treat them as new bean information, others as default for the existing one. This only gets specified in CDI-1.1 where we also have a new event ProcessSyntheticAnnotatedType (or so).

Thus I recommend allowing to add annotatedTypes but only for classes which are not in a BDA (in other words: they are in a jar without a beans.xml).

Stu, Shane, what do you think about that solution? That should cover the most important use cases. All features beyond that are not portable in CDI-1.0.

LieGrue,
strub




----- Original Message -----

> From: Shane Bryzak <[hidden email]>
> To: [hidden email]
> Cc: Jason Porter <[hidden email]>; Mark Struberg <[hidden email]>
> Sent: Friday, October 12, 2012 1:01 AM
> Subject: Re: Seam XML config
>
> I think we have to support creation of new beans.  Take a look at [1],
> which is a blog post on configuring Drools within Spring.  A little way
> down, under the sessions.xml heading he has an example showing a Drools
> configuration.  We need to be able to support the same kind of
> configuration with CDI.
>
> On 12/10/12 08:00, Jason Porter wrote:
>>  Great! Thanks Mark. Nothing really complicated here. I think the big
>>  question now, is being able to actually create new beans using the config,
>>  or if we simply want to modify existing beans. For me personally I'm -1
> on
>>  creating beans using config and +1 on modifying existing beans.
>>
>>  On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg <[hidden email]>
> wrote:
>>
>>>  sure, check the readme:
>>>  https://github.com/struberg/InterDyn
>>>
>>>  LieGrue,
>>>  strub
>>>
>>>
>>>
>>>
>>>  ----- Original Message -----
>>>>  From: Jason Porter <[hidden email]>
>>>>  To: [hidden email]
>>>>  Cc:
>>>>  Sent: Thursday, October 11, 2012 10:58 PM
>>>>  Subject: Re: Seam XML config
>>>>
>>>>  Mark, do you have an example for InterDyn (or whatever it's
> called?)
>>>>
>>>>  We also need to decide if we're going to allow creation of new
> beans or
>>>>  simply configure existing beans (adding / removing metadata) using
> this
>>>>  configuration.
>>>>
>>>>  On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]>
> wrote:
>>>>
>>>>>    Original inspiration for xml came from Gavin's design for
> CDI 1.0. I
>>>>  don't
>>>>>    know more details about why they went this direction.
>>>>>
>>>>>    On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>>>>
>>>>>    > It did (maybe it still does), but at some point we
> decided that
>>>>  wasn't
>>>>>    > recommended, I don't recall why though, perhaps
> Stuart or Pete
>>>>  remembers.
>>>>>    >
>>>>>    > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
>>>>>    > <[hidden email]>wrote:
>>>>>    >
>>>>>    >> each time i read this kind of conf i think it should
> be the
>>>>  opposite
>>>>>    >>
>>>>>    >> why not extending beans.xml (just in the spirit, not
> in the same
>>>>  file)
>>>>>    >> adding <qualfiiers> etc?
>>>>>    >>
>>>>>    >>
>>>>>    >> *Romain Manni-Bucau*
>>>>>    >> *Twitter: @rmannibucau*
>>>>>    >> *Blog: **http://rmannibucau.wordpress.com/*<
>>>>>    >> http://rmannibucau.wordpress.com/>
>>>>>    >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>>>>    >>
>>>>>    >>
>>>>>    >>
>>>>>    >>
>>>>>    >> 2012/9/25 Jason Porter
> <[hidden email]>
>>>>>    >>
>>>>>    >>> I'm going to send probably the most
> comprehensive example
>>>>  that exists
>>>>>    >> about
>>>>>    >>> what Seam XML can do:
>>>>>    >>>
>>>>>    >>>
>>>>>    >>>
>>>>>    >>
>>>>>
>>>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>>>    >>>
>>>>>    >>> You can also find the Java classes that back
> that config at
>>>>>    >>>
>>>>>    >>>
>>>>>    >>
>>>>>
>>>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>>>    >>>
>>>>>    >>> Mark, could you give some examples of the stuff
> you would like
>>>>  to see
>>>>>    as
>>>>>    >>> well?
>>>>>    >>>
>>>>>    >>> --
>>>>>    >>> Jason Porter
>>>>>    >>> http://lightguard-jp.blogspot.com
>>>>>    >>> http://twitter.com/lightguardjp
>>>>>    >>>
>>>>>    >>> Software Engineer
>>>>>    >>> Open Source Advocate
>>>>>    >>> Author of Seam Catch - Next Generation Java
> Exception Handling
>>>>>    >>>
>>>>>    >>> PGP key id: 926CCFF5
>>>>>    >>> PGP key available at: keyserver.net, pgp.mit.edu
>>>>>    >>>
>>>>>    >>
>>>>>    >
>>>>>    >
>>>>>    >
>>>>>    > --
>>>>>    > Jason Porter
>>>>>    > http://lightguard-jp.blogspot.com
>>>>>    > http://twitter.com/lightguardjp
>>>>>    >
>>>>>    > Software Engineer
>>>>>    > Open Source Advocate
>>>>>    > Author of Seam Catch - Next Generation Java Exception
> Handling
>>>>>    >
>>>>>    > PGP key id: 926CCFF5
>>>>>    > PGP key available at: keyserver.net, pgp.mit.edu
>>>>>
>>>>>
>>>>
>>>>  --
>>>>  Jason Porter
>>>>  http://lightguard-jp.blogspot.com
>>>>  http://twitter.com/lightguardjp
>>>>
>>>>  Software Engineer
>>>>  Open Source Advocate
>>>>  Author of Seam Catch - Next Generation Java Exception Handling
>>>>
>>>>  PGP key id: 926CCFF5
>>>>  PGP key available at: keyserver.net, pgp.mit.edu
>>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Romain Manni-Bucau
Hi,

IMO that's the needed case (at least to start): make cdi friendly legacy
libs
Le 12 oct. 2012 08:38, "Mark Struberg" <[hidden email]> a écrit :

> well, there is an important distinction between creating new beans for
> classes which are in a BDA and others who don't.
>
> In CDI-1.0 it's not defined what happens if you do
> BeforeBeanDiscovery#addAnnotatedType for a class which is already in a BDA
> and would get picked up automatically. Some containers treat them as new
> bean information, others as default for the existing one. This only gets
> specified in CDI-1.1 where we also have a new event
> ProcessSyntheticAnnotatedType (or so).
>
> Thus I recommend allowing to add annotatedTypes but only for classes which
> are not in a BDA (in other words: they are in a jar without a beans.xml).
>
> Stu, Shane, what do you think about that solution? That should cover the
> most important use cases. All features beyond that are not portable in
> CDI-1.0.
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
> > From: Shane Bryzak <[hidden email]>
> > To: [hidden email]
> > Cc: Jason Porter <[hidden email]>; Mark Struberg <
> [hidden email]>
> > Sent: Friday, October 12, 2012 1:01 AM
> > Subject: Re: Seam XML config
> >
> > I think we have to support creation of new beans.  Take a look at [1],
> > which is a blog post on configuring Drools within Spring.  A little way
> > down, under the sessions.xml heading he has an example showing a Drools
> > configuration.  We need to be able to support the same kind of
> > configuration with CDI.
> >
> > On 12/10/12 08:00, Jason Porter wrote:
> >>  Great! Thanks Mark. Nothing really complicated here. I think the big
> >>  question now, is being able to actually create new beans using the
> config,
> >>  or if we simply want to modify existing beans. For me personally I'm -1
> > on
> >>  creating beans using config and +1 on modifying existing beans.
> >>
> >>  On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg <[hidden email]>
> > wrote:
> >>
> >>>  sure, check the readme:
> >>>  https://github.com/struberg/InterDyn
> >>>
> >>>  LieGrue,
> >>>  strub
> >>>
> >>>
> >>>
> >>>
> >>>  ----- Original Message -----
> >>>>  From: Jason Porter <[hidden email]>
> >>>>  To: [hidden email]
> >>>>  Cc:
> >>>>  Sent: Thursday, October 11, 2012 10:58 PM
> >>>>  Subject: Re: Seam XML config
> >>>>
> >>>>  Mark, do you have an example for InterDyn (or whatever it's
> > called?)
> >>>>
> >>>>  We also need to decide if we're going to allow creation of new
> > beans or
> >>>>  simply configure existing beans (adding / removing metadata) using
> > this
> >>>>  configuration.
> >>>>
> >>>>  On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir <[hidden email]>
> > wrote:
> >>>>
> >>>>>    Original inspiration for xml came from Gavin's design for
> > CDI 1.0. I
> >>>>  don't
> >>>>>    know more details about why they went this direction.
> >>>>>
> >>>>>    On 25 Sep 2012, at 00:19, Jason Porter wrote:
> >>>>>
> >>>>>    > It did (maybe it still does), but at some point we
> > decided that
> >>>>  wasn't
> >>>>>    > recommended, I don't recall why though, perhaps
> > Stuart or Pete
> >>>>  remembers.
> >>>>>    >
> >>>>>    > On Mon, Sep 24, 2012 at 5:11 PM, Romain Manni-Bucau
> >>>>>    > <[hidden email]>wrote:
> >>>>>    >
> >>>>>    >> each time i read this kind of conf i think it should
> > be the
> >>>>  opposite
> >>>>>    >>
> >>>>>    >> why not extending beans.xml (just in the spirit, not
> > in the same
> >>>>  file)
> >>>>>    >> adding <qualfiiers> etc?
> >>>>>    >>
> >>>>>    >>
> >>>>>    >> *Romain Manni-Bucau*
> >>>>>    >> *Twitter: @rmannibucau*
> >>>>>    >> *Blog: **http://rmannibucau.wordpress.com/*<
> >>>>>    >> http://rmannibucau.wordpress.com/>
> >>>>>    >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> >>>>>    >>
> >>>>>    >>
> >>>>>    >>
> >>>>>    >>
> >>>>>    >> 2012/9/25 Jason Porter
> > <[hidden email]>
> >>>>>    >>
> >>>>>    >>> I'm going to send probably the most
> > comprehensive example
> >>>>  that exists
> >>>>>    >> about
> >>>>>    >>> what Seam XML can do:
> >>>>>    >>>
> >>>>>    >>>
> >>>>>    >>>
> >>>>>    >>
> >>>>>
> >>>
> >
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
> >>>>>    >>>
> >>>>>    >>> You can also find the Java classes that back
> > that config at
> >>>>>    >>>
> >>>>>    >>>
> >>>>>    >>
> >>>>>
> >>>
> >
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
> >>>>>    >>>
> >>>>>    >>> Mark, could you give some examples of the stuff
> > you would like
> >>>>  to see
> >>>>>    as
> >>>>>    >>> well?
> >>>>>    >>>
> >>>>>    >>> --
> >>>>>    >>> Jason Porter
> >>>>>    >>> http://lightguard-jp.blogspot.com
> >>>>>    >>> http://twitter.com/lightguardjp
> >>>>>    >>>
> >>>>>    >>> Software Engineer
> >>>>>    >>> Open Source Advocate
> >>>>>    >>> Author of Seam Catch - Next Generation Java
> > Exception Handling
> >>>>>    >>>
> >>>>>    >>> PGP key id: 926CCFF5
> >>>>>    >>> PGP key available at: keyserver.net, pgp.mit.edu
> >>>>>    >>>
> >>>>>    >>
> >>>>>    >
> >>>>>    >
> >>>>>    >
> >>>>>    > --
> >>>>>    > Jason Porter
> >>>>>    > http://lightguard-jp.blogspot.com
> >>>>>    > http://twitter.com/lightguardjp
> >>>>>    >
> >>>>>    > Software Engineer
> >>>>>    > Open Source Advocate
> >>>>>    > Author of Seam Catch - Next Generation Java Exception
> > Handling
> >>>>>    >
> >>>>>    > PGP key id: 926CCFF5
> >>>>>    > PGP key available at: keyserver.net, pgp.mit.edu
> >>>>>
> >>>>>
> >>>>
> >>>>  --
> >>>>  Jason Porter
> >>>>  http://lightguard-jp.blogspot.com
> >>>>  http://twitter.com/lightguardjp
> >>>>
> >>>>  Software Engineer
> >>>>  Open Source Advocate
> >>>>  Author of Seam Catch - Next Generation Java Exception Handling
> >>>>
> >>>>  PGP key id: 926CCFF5
> >>>>  PGP key available at: keyserver.net, pgp.mit.edu
> >>>>
> >>
> >>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Mark Struberg
Administrator
oki, it seems we have a start.

The only technical restriction so far is that there is only 1 bean per class possible in CDI-1.0.
Apart from that I would like to extend the configuration from Seam-XML with regexp to allow wildcard applying.
So far for the features.

A few questions from the peanut gallery:

* What is the configuration format? I assume XML is perfectly fine. It's easy to hack an own Extension for other formats. And XML is perfectly descriptive and with a schema it's also easy to use.

* What should the name of this module be? modules/xmlconfig ? Or do we keep the modules for various EE stuff and just add a xmlconfig (or other name) to the root?

LieGrue,
strub




----- Original Message -----

> From: Romain Manni-Bucau <[hidden email]>
> To: Mark Struberg <[hidden email]>; [hidden email]
> Cc:
> Sent: Friday, October 12, 2012 9:39 AM
> Subject: Re: Seam XML config
>
> Hi,
>
> IMO that's the needed case (at least to start): make cdi friendly legacy
> libs
> Le 12 oct. 2012 08:38, "Mark Struberg" <[hidden email]> a
> écrit :
>
>>  well, there is an important distinction between creating new beans for
>>  classes which are in a BDA and others who don't.
>>
>>  In CDI-1.0 it's not defined what happens if you do
>>  BeforeBeanDiscovery#addAnnotatedType for a class which is already in a BDA
>>  and would get picked up automatically. Some containers treat them as new
>>  bean information, others as default for the existing one. This only gets
>>  specified in CDI-1.1 where we also have a new event
>>  ProcessSyntheticAnnotatedType (or so).
>>
>>  Thus I recommend allowing to add annotatedTypes but only for classes which
>>  are not in a BDA (in other words: they are in a jar without a beans.xml).
>>
>>  Stu, Shane, what do you think about that solution? That should cover the
>>  most important use cases. All features beyond that are not portable in
>>  CDI-1.0.
>>
>>  LieGrue,
>>  strub
>>
>>
>>
>>
>>  ----- Original Message -----
>>  > From: Shane Bryzak <[hidden email]>
>>  > To: [hidden email]
>>  > Cc: Jason Porter <[hidden email]>; Mark Struberg <
>>  [hidden email]>
>>  > Sent: Friday, October 12, 2012 1:01 AM
>>  > Subject: Re: Seam XML config
>>  >
>>  > I think we have to support creation of new beans.  Take a look at [1],
>>  > which is a blog post on configuring Drools within Spring.  A little
> way
>>  > down, under the sessions.xml heading he has an example showing a
> Drools
>>  > configuration.  We need to be able to support the same kind of
>>  > configuration with CDI.
>>  >
>>  > On 12/10/12 08:00, Jason Porter wrote:
>>  >>  Great! Thanks Mark. Nothing really complicated here. I think the
> big
>>  >>  question now, is being able to actually create new beans using
> the
>>  config,
>>  >>  or if we simply want to modify existing beans. For me personally
> I'm -1
>>  > on
>>  >>  creating beans using config and +1 on modifying existing beans.
>>  >>
>>  >>  On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg
> <[hidden email]>
>>  > wrote:
>>  >>
>>  >>>  sure, check the readme:
>>  >>>  https://github.com/struberg/InterDyn
>>  >>>
>>  >>>  LieGrue,
>>  >>>  strub
>>  >>>
>>  >>>
>>  >>>
>>  >>>
>>  >>>  ----- Original Message -----
>>  >>>>  From: Jason Porter <[hidden email]>
>>  >>>>  To: [hidden email]
>>  >>>>  Cc:
>>  >>>>  Sent: Thursday, October 11, 2012 10:58 PM
>>  >>>>  Subject: Re: Seam XML config
>>  >>>>
>>  >>>>  Mark, do you have an example for InterDyn (or whatever
> it's
>>  > called?)
>>  >>>>
>>  >>>>  We also need to decide if we're going to allow
> creation of new
>>  > beans or
>>  >>>>  simply configure existing beans (adding / removing
> metadata) using
>>  > this
>>  >>>>  configuration.
>>  >>>>
>>  >>>>  On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir
> <[hidden email]>
>>  > wrote:
>>  >>>>
>>  >>>>>    Original inspiration for xml came from Gavin's
> design for
>>  > CDI 1.0. I
>>  >>>>  don't
>>  >>>>>    know more details about why they went this
> direction.
>>  >>>>>
>>  >>>>>    On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>  >>>>>
>>  >>>>>    > It did (maybe it still does), but at some
> point we
>>  > decided that
>>  >>>>  wasn't
>>  >>>>>    > recommended, I don't recall why though,
> perhaps
>>  > Stuart or Pete
>>  >>>>  remembers.
>>  >>>>>    >
>>  >>>>>    > On Mon, Sep 24, 2012 at 5:11 PM, Romain
> Manni-Bucau
>>  >>>>>    > <[hidden email]>wrote:
>>  >>>>>    >
>>  >>>>>    >> each time i read this kind of conf i think
> it should
>>  > be the
>>  >>>>  opposite
>>  >>>>>    >>
>>  >>>>>    >> why not extending beans.xml (just in the
> spirit, not
>>  > in the same
>>  >>>>  file)
>>  >>>>>    >> adding <qualfiiers> etc?
>>  >>>>>    >>
>>  >>>>>    >>
>>  >>>>>    >> *Romain Manni-Bucau*
>>  >>>>>    >> *Twitter: @rmannibucau*
>>  >>>>>    >> *Blog:
> **http://rmannibucau.wordpress.com/*<
>>  >>>>>    >> http://rmannibucau.wordpress.com/>
>>  >>>>>    >> *LinkedIn:
> **http://fr.linkedin.com/in/rmannibucau*
>>  >>>>>    >>
>>  >>>>>    >>
>>  >>>>>    >>
>>  >>>>>    >>
>>  >>>>>    >> 2012/9/25 Jason Porter
>>  > <[hidden email]>
>>  >>>>>    >>
>>  >>>>>    >>> I'm going to send probably the
> most
>>  > comprehensive example
>>  >>>>  that exists
>>  >>>>>    >> about
>>  >>>>>    >>> what Seam XML can do:
>>  >>>>>    >>>
>>  >>>>>    >>>
>>  >>>>>    >>>
>>  >>>>>    >>
>>  >>>>>
>>  >>>
>>  >
>>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>  >>>>>    >>>
>>  >>>>>    >>> You can also find the Java classes
> that back
>>  > that config at
>>  >>>>>    >>>
>>  >>>>>    >>>
>>  >>>>>    >>
>>  >>>>>
>>  >>>
>>  >
>>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>  >>>>>    >>>
>>  >>>>>    >>> Mark, could you give some examples of
> the stuff
>>  > you would like
>>  >>>>  to see
>>  >>>>>    as
>>  >>>>>    >>> well?
>>  >>>>>    >>>
>>  >>>>>    >>> --
>>  >>>>>    >>> Jason Porter
>>  >>>>>    >>> http://lightguard-jp.blogspot.com
>>  >>>>>    >>> http://twitter.com/lightguardjp
>>  >>>>>    >>>
>>  >>>>>    >>> Software Engineer
>>  >>>>>    >>> Open Source Advocate
>>  >>>>>    >>> Author of Seam Catch - Next Generation
> Java
>>  > Exception Handling
>>  >>>>>    >>>
>>  >>>>>    >>> PGP key id: 926CCFF5
>>  >>>>>    >>> PGP key available at: keyserver.net,
> pgp.mit.edu
>>  >>>>>    >>>
>>  >>>>>    >>
>>  >>>>>    >
>>  >>>>>    >
>>  >>>>>    >
>>  >>>>>    > --
>>  >>>>>    > Jason Porter
>>  >>>>>    > http://lightguard-jp.blogspot.com
>>  >>>>>    > http://twitter.com/lightguardjp
>>  >>>>>    >
>>  >>>>>    > Software Engineer
>>  >>>>>    > Open Source Advocate
>>  >>>>>    > Author of Seam Catch - Next Generation Java
> Exception
>>  > Handling
>>  >>>>>    >
>>  >>>>>    > PGP key id: 926CCFF5
>>  >>>>>    > PGP key available at: keyserver.net,
> pgp.mit.edu
>>  >>>>>
>>  >>>>>
>>  >>>>
>>  >>>>  --
>>  >>>>  Jason Porter
>>  >>>>  http://lightguard-jp.blogspot.com
>>  >>>>  http://twitter.com/lightguardjp
>>  >>>>
>>  >>>>  Software Engineer
>>  >>>>  Open Source Advocate
>>  >>>>  Author of Seam Catch - Next Generation Java Exception
> Handling
>>  >>>>
>>  >>>>  PGP key id: 926CCFF5
>>  >>>>  PGP key available at: keyserver.net, pgp.mit.edu
>>  >>>>
>>  >>
>>  >>
>>  >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Jason Porter
On Oct 12, 2012, at 7:58, Mark Struberg <[hidden email]> wrote:

> oki, it seems we have a start.
>
> The only technical restriction so far is that there is only 1 bean per class possible in CDI-1.0.
> Apart from that I would like to extend the configuration from Seam-XML with regexp to allow wildcard applying.
> So far for the features.
>
> A few questions from the peanut gallery:
>
> * What is the configuration format? I assume XML is perfectly fine. It's easy to hack an own Extension for other formats. And XML is perfectly descriptive and with a schema it's also easy to use.

Works for me. We could even push off the work to other classes or have the provider of the config be a DS configuration if someone wants to write a different config provider.

> * What should the name of this module be? modules/xmlconfig ? Or do we keep the modules for various EE stuff and just add a xmlconfig (or other name) to the root?

Works fine me either way. Do we feel we have enough of a reason for this to be core?

> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
>> From: Romain Manni-Bucau <[hidden email]>
>> To: Mark Struberg <[hidden email]>; [hidden email]
>> Cc:
>> Sent: Friday, October 12, 2012 9:39 AM
>> Subject: Re: Seam XML config
>>
>> Hi,
>>
>> IMO that's the needed case (at least to start): make cdi friendly legacy
>> libs
>> Le 12 oct. 2012 08:38, "Mark Struberg" <[hidden email]> a
>> écrit :
>>
>>> well, there is an important distinction between creating new beans for
>>> classes which are in a BDA and others who don't.
>>>
>>> In CDI-1.0 it's not defined what happens if you do
>>> BeforeBeanDiscovery#addAnnotatedType for a class which is already in a BDA
>>> and would get picked up automatically. Some containers treat them as new
>>> bean information, others as default for the existing one. This only gets
>>> specified in CDI-1.1 where we also have a new event
>>> ProcessSyntheticAnnotatedType (or so).
>>>
>>> Thus I recommend allowing to add annotatedTypes but only for classes which
>>> are not in a BDA (in other words: they are in a jar without a beans.xml).
>>>
>>> Stu, Shane, what do you think about that solution? That should cover the
>>> most important use cases. All features beyond that are not portable in
>>> CDI-1.0.
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>>> From: Shane Bryzak <[hidden email]>
>>>> To: [hidden email]
>>>> Cc: Jason Porter <[hidden email]>; Mark Struberg <
>>> [hidden email]>
>>>> Sent: Friday, October 12, 2012 1:01 AM
>>>> Subject: Re: Seam XML config
>>>>
>>>> I think we have to support creation of new beans.  Take a look at [1],
>>>> which is a blog post on configuring Drools within Spring.  A little
>> way
>>>> down, under the sessions.xml heading he has an example showing a
>> Drools
>>>> configuration.  We need to be able to support the same kind of
>>>> configuration with CDI.
>>>>
>>>> On 12/10/12 08:00, Jason Porter wrote:
>>>>>   Great! Thanks Mark. Nothing really complicated here. I think the
>> big
>>>>>   question now, is being able to actually create new beans using
>> the
>>> config,
>>>>>   or if we simply want to modify existing beans. For me personally
>> I'm -1
>>>> on
>>>>>   creating beans using config and +1 on modifying existing beans.
>>>>>
>>>>>   On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg
>> <[hidden email]>
>>>> wrote:
>>>>>
>>>>>>   sure, check the readme:
>>>>>>   https://github.com/struberg/InterDyn
>>>>>>
>>>>>>   LieGrue,
>>>>>>   strub
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>   ----- Original Message -----
>>>>>>>   From: Jason Porter <[hidden email]>
>>>>>>>   To: [hidden email]
>>>>>>>   Cc:
>>>>>>>   Sent: Thursday, October 11, 2012 10:58 PM
>>>>>>>   Subject: Re: Seam XML config
>>>>>>>
>>>>>>>   Mark, do you have an example for InterDyn (or whatever
>> it's
>>>> called?)
>>>>>>>
>>>>>>>   We also need to decide if we're going to allow
>> creation of new
>>>> beans or
>>>>>>>   simply configure existing beans (adding / removing
>> metadata) using
>>>> this
>>>>>>>   configuration.
>>>>>>>
>>>>>>>   On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir
>> <[hidden email]>
>>>> wrote:
>>>>>>>
>>>>>>>>     Original inspiration for xml came from Gavin's
>> design for
>>>> CDI 1.0. I
>>>>>>>   don't
>>>>>>>>     know more details about why they went this
>> direction.
>>>>>>>>
>>>>>>>>     On 25 Sep 2012, at 00:19, Jason Porter wrote:
>>>>>>>>
>>>>>>>>     > It did (maybe it still does), but at some
>> point we
>>>> decided that
>>>>>>>   wasn't
>>>>>>>>     > recommended, I don't recall why though,
>> perhaps
>>>> Stuart or Pete
>>>>>>>   remembers.
>>>>>>>>     >
>>>>>>>>     > On Mon, Sep 24, 2012 at 5:11 PM, Romain
>> Manni-Bucau
>>>>>>>>     > <[hidden email]>wrote:
>>>>>>>>     >
>>>>>>>>     >> each time i read this kind of conf i think
>> it should
>>>> be the
>>>>>>>   opposite
>>>>>>>>     >>
>>>>>>>>     >> why not extending beans.xml (just in the
>> spirit, not
>>>> in the same
>>>>>>>   file)
>>>>>>>>     >> adding <qualfiiers> etc?
>>>>>>>>     >>
>>>>>>>>     >>
>>>>>>>>     >> *Romain Manni-Bucau*
>>>>>>>>     >> *Twitter: @rmannibucau*
>>>>>>>>     >> *Blog:
>> **http://rmannibucau.wordpress.com/*<
>>>>>>>>     >> http://rmannibucau.wordpress.com/>
>>>>>>>>     >> *LinkedIn:
>> **http://fr.linkedin.com/in/rmannibucau*
>>>>>>>>     >>
>>>>>>>>     >>
>>>>>>>>     >>
>>>>>>>>     >>
>>>>>>>>     >> 2012/9/25 Jason Porter
>>>> <[hidden email]>
>>>>>>>>     >>
>>>>>>>>     >>> I'm going to send probably the
>> most
>>>> comprehensive example
>>>>>>>   that exists
>>>>>>>>     >> about
>>>>>>>>     >>> what Seam XML can do:
>>>>>>>>     >>>
>>>>>>>>     >>>
>>>>>>>>     >>>
>>>>>>>>     >>
>> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>>>>>>     >>>
>>>>>>>>     >>> You can also find the Java classes
>> that back
>>>> that config at
>>>>>>>>     >>>
>>>>>>>>     >>>
>>>>>>>>     >>
>> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>>>>>>     >>>
>>>>>>>>     >>> Mark, could you give some examples of
>> the stuff
>>>> you would like
>>>>>>>   to see
>>>>>>>>     as
>>>>>>>>     >>> well?
>>>>>>>>     >>>
>>>>>>>>     >>> --
>>>>>>>>     >>> Jason Porter
>>>>>>>>     >>> http://lightguard-jp.blogspot.com
>>>>>>>>     >>> http://twitter.com/lightguardjp
>>>>>>>>     >>>
>>>>>>>>     >>> Software Engineer
>>>>>>>>     >>> Open Source Advocate
>>>>>>>>     >>> Author of Seam Catch - Next Generation
>> Java
>>>> Exception Handling
>>>>>>>>     >>>
>>>>>>>>     >>> PGP key id: 926CCFF5
>>>>>>>>     >>> PGP key available at: keyserver.net,
>> pgp.mit.edu
>>>>>>>>     >>>
>>>>>>>>     >>
>>>>>>>>     >
>>>>>>>>     >
>>>>>>>>     >
>>>>>>>>     > --
>>>>>>>>     > Jason Porter
>>>>>>>>     > http://lightguard-jp.blogspot.com
>>>>>>>>     > http://twitter.com/lightguardjp
>>>>>>>>     >
>>>>>>>>     > Software Engineer
>>>>>>>>     > Open Source Advocate
>>>>>>>>     > Author of Seam Catch - Next Generation Java
>> Exception
>>>> Handling
>>>>>>>>     >
>>>>>>>>     > PGP key id: 926CCFF5
>>>>>>>>     > PGP key available at: keyserver.net,
>> pgp.mit.edu
>>>>>>>
>>>>>>>   --
>>>>>>>   Jason Porter
>>>>>>>   http://lightguard-jp.blogspot.com
>>>>>>>   http://twitter.com/lightguardjp
>>>>>>>
>>>>>>>   Software Engineer
>>>>>>>   Open Source Advocate
>>>>>>>   Author of Seam Catch - Next Generation Java Exception
>> Handling
>>>>>>>
>>>>>>>   PGP key id: 926CCFF5
>>>>>>>   PGP key available at: keyserver.net, pgp.mit.edu
>>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Mark Struberg
Administrator
I'd rather keep the core pretty small and have this in an own module. It's used in 15% cases and would blow up the size for the other 85% users.

LieGrue,
strub




----- Original Message -----

> From: Jason Porter <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
> Sent: Friday, October 12, 2012 4:54 PM
> Subject: Re: Seam XML config
>
> On Oct 12, 2012, at 7:58, Mark Struberg <[hidden email]> wrote:
>
>>  oki, it seems we have a start.
>>
>>  The only technical restriction so far is that there is only 1 bean per
> class possible in CDI-1.0.
>>  Apart from that I would like to extend the configuration from Seam-XML with
> regexp to allow wildcard applying.
>>  So far for the features.
>>
>>  A few questions from the peanut gallery:
>>
>>  * What is the configuration format? I assume XML is perfectly fine.
> It's easy to hack an own Extension for other formats. And XML is perfectly
> descriptive and with a schema it's also easy to use.
>
> Works for me. We could even push off the work to other classes or have the
> provider of the config be a DS configuration if someone wants to write a
> different config provider.
>
>>  * What should the name of this module be? modules/xmlconfig ? Or do we keep
> the modules for various EE stuff and just add a xmlconfig (or other name) to the
> root?
>
> Works fine me either way. Do we feel we have enough of a reason for this to be
> core?
>
>>  LieGrue,
>>  strub
>>
>>
>>
>>
>>  ----- Original Message -----
>>>  From: Romain Manni-Bucau <[hidden email]>
>>>  To: Mark Struberg <[hidden email]>;
> [hidden email]
>>>  Cc:
>>>  Sent: Friday, October 12, 2012 9:39 AM
>>>  Subject: Re: Seam XML config
>>>
>>>  Hi,
>>>
>>>  IMO that's the needed case (at least to start): make cdi friendly
> legacy
>>>  libs
>>>  Le 12 oct. 2012 08:38, "Mark Struberg"
> <[hidden email]> a
>>>  écrit :
>>>
>>>>  well, there is an important distinction between creating new beans
> for
>>>>  classes which are in a BDA and others who don't.
>>>>
>>>>  In CDI-1.0 it's not defined what happens if you do
>>>>  BeforeBeanDiscovery#addAnnotatedType for a class which is already
> in a BDA
>>>>  and would get picked up automatically. Some containers treat them
> as new
>>>>  bean information, others as default for the existing one. This only
> gets
>>>>  specified in CDI-1.1 where we also have a new event
>>>>  ProcessSyntheticAnnotatedType (or so).
>>>>
>>>>  Thus I recommend allowing to add annotatedTypes but only for
> classes which
>>>>  are not in a BDA (in other words: they are in a jar without a
> beans.xml).
>>>>
>>>>  Stu, Shane, what do you think about that solution? That should
> cover the
>>>>  most important use cases. All features beyond that are not portable
> in
>>>>  CDI-1.0.
>>>>
>>>>  LieGrue,
>>>>  strub
>>>>
>>>>
>>>>
>>>>
>>>>  ----- Original Message -----
>>>>>  From: Shane Bryzak <[hidden email]>
>>>>>  To: [hidden email]
>>>>>  Cc: Jason Porter <[hidden email]>; Mark Struberg
> <
>>>>  [hidden email]>
>>>>>  Sent: Friday, October 12, 2012 1:01 AM
>>>>>  Subject: Re: Seam XML config
>>>>>
>>>>>  I think we have to support creation of new beans.  Take a look
> at [1],
>>>>>  which is a blog post on configuring Drools within Spring.  A
> little
>>>  way
>>>>>  down, under the sessions.xml heading he has an example showing
> a
>>>  Drools
>>>>>  configuration.  We need to be able to support the same kind of
>>>>>  configuration with CDI.
>>>>>
>>>>>  On 12/10/12 08:00, Jason Porter wrote:
>>>>>>    Great! Thanks Mark. Nothing really complicated here. I
> think the
>>>  big
>>>>>>    question now, is being able to actually create new beans
> using
>>>  the
>>>>  config,
>>>>>>    or if we simply want to modify existing beans. For me
> personally
>>>  I'm -1
>>>>>  on
>>>>>>    creating beans using config and +1 on modifying existing
> beans.
>>>>>>
>>>>>>    On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg
>>>  <[hidden email]>
>>>>>  wrote:
>>>>>>
>>>>>>>    sure, check the readme:
>>>>>>>   https://github.com/struberg/InterDyn
>>>>>>>
>>>>>>>    LieGrue,
>>>>>>>    strub
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>    ----- Original Message -----
>>>>>>>>    From: Jason Porter
> <[hidden email]>
>>>>>>>>    To: [hidden email]
>>>>>>>>    Cc:
>>>>>>>>    Sent: Thursday, October 11, 2012 10:58 PM
>>>>>>>>    Subject: Re: Seam XML config
>>>>>>>>
>>>>>>>>    Mark, do you have an example for InterDyn (or
> whatever
>>>  it's
>>>>>  called?)
>>>>>>>>
>>>>>>>>    We also need to decide if we're going to
> allow
>>>  creation of new
>>>>>  beans or
>>>>>>>>    simply configure existing beans (adding /
> removing
>>>  metadata) using
>>>>>  this
>>>>>>>>    configuration.
>>>>>>>>
>>>>>>>>    On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir
>>>  <[hidden email]>
>>>>>  wrote:
>>>>>>>>
>>>>>>>>>      Original inspiration for xml came from
> Gavin's
>>>  design for
>>>>>  CDI 1.0. I
>>>>>>>>    don't
>>>>>>>>>      know more details about why they went this
>>>  direction.
>>>>>>>>>
>>>>>>>>>      On 25 Sep 2012, at 00:19, Jason Porter
> wrote:
>>>>>>>>>
>>>>>>>>>      > It did (maybe it still does), but at
> some
>>>  point we
>>>>>  decided that
>>>>>>>>    wasn't
>>>>>>>>>      > recommended, I don't recall why
> though,
>>>  perhaps
>>>>>  Stuart or Pete
>>>>>>>>    remembers.
>>>>>>>>>      >
>>>>>>>>>      > On Mon, Sep 24, 2012 at 5:11 PM,
> Romain
>>>  Manni-Bucau
>>>>>>>>>      > <[hidden email]>wrote:
>>>>>>>>>      >
>>>>>>>>>      >> each time i read this kind of conf
> i think
>>>  it should
>>>>>  be the
>>>>>>>>    opposite
>>>>>>>>>      >>
>>>>>>>>>      >> why not extending beans.xml (just
> in the
>>>  spirit, not
>>>>>  in the same
>>>>>>>>    file)
>>>>>>>>>      >> adding <qualfiiers> etc?
>>>>>>>>>      >>
>>>>>>>>>      >>
>>>>>>>>>      >> *Romain Manni-Bucau*
>>>>>>>>>      >> *Twitter: @rmannibucau*
>>>>>>>>>      >> *Blog:
>>>  **http://rmannibucau.wordpress.com/*<
>>>>>>>>>      >>
> http://rmannibucau.wordpress.com/>
>>>>>>>>>      >> *LinkedIn:
>>>  **http://fr.linkedin.com/in/rmannibucau*
>>>>>>>>>      >>
>>>>>>>>>      >>
>>>>>>>>>      >>
>>>>>>>>>      >>
>>>>>>>>>      >> 2012/9/25 Jason Porter
>>>>>  <[hidden email]>
>>>>>>>>>      >>
>>>>>>>>>      >>> I'm going to send probably
> the
>>>  most
>>>>>  comprehensive example
>>>>>>>>    that exists
>>>>>>>>>      >> about
>>>>>>>>>      >>> what Seam XML can do:
>>>>>>>>>      >>>
>>>>>>>>>      >>>
>>>>>>>>>      >>>
>>>>>>>>>      >>
>>>
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
>>>>>>>>>      >>>
>>>>>>>>>      >>> You can also find the Java
> classes
>>>  that back
>>>>>  that config at
>>>>>>>>>      >>>
>>>>>>>>>      >>>
>>>>>>>>>      >>
>>>
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
>>>>>>>>>      >>>
>>>>>>>>>      >>> Mark, could you give some
> examples of
>>>  the stuff
>>>>>  you would like
>>>>>>>>    to see
>>>>>>>>>      as
>>>>>>>>>      >>> well?
>>>>>>>>>      >>>
>>>>>>>>>      >>> --
>>>>>>>>>      >>> Jason Porter
>>>>>>>>>      >>>
> http://lightguard-jp.blogspot.com
>>>>>>>>>      >>>
> http://twitter.com/lightguardjp
>>>>>>>>>      >>>
>>>>>>>>>      >>> Software Engineer
>>>>>>>>>      >>> Open Source Advocate
>>>>>>>>>      >>> Author of Seam Catch - Next
> Generation
>>>  Java
>>>>>  Exception Handling
>>>>>>>>>      >>>
>>>>>>>>>      >>> PGP key id: 926CCFF5
>>>>>>>>>      >>> PGP key available at:
> keyserver.net,
>>>  pgp.mit.edu
>>>>>>>>>      >>>
>>>>>>>>>      >>
>>>>>>>>>      >
>>>>>>>>>      >
>>>>>>>>>      >
>>>>>>>>>      > --
>>>>>>>>>      > Jason Porter
>>>>>>>>>      > http://lightguard-jp.blogspot.com
>>>>>>>>>      > http://twitter.com/lightguardjp
>>>>>>>>>      >
>>>>>>>>>      > Software Engineer
>>>>>>>>>      > Open Source Advocate
>>>>>>>>>      > Author of Seam Catch - Next Generation
> Java
>>>  Exception
>>>>>  Handling
>>>>>>>>>      >
>>>>>>>>>      > PGP key id: 926CCFF5
>>>>>>>>>      > PGP key available at: keyserver.net,
>>>  pgp.mit.edu
>>>>>>>>
>>>>>>>>    --
>>>>>>>>    Jason Porter
>>>>>>>>   http://lightguard-jp.blogspot.com
>>>>>>>>   http://twitter.com/lightguardjp
>>>>>>>>
>>>>>>>>    Software Engineer
>>>>>>>>    Open Source Advocate
>>>>>>>>    Author of Seam Catch - Next Generation Java
> Exception
>>>  Handling
>>>>>>>>
>>>>>>>>    PGP key id: 926CCFF5
>>>>>>>>    PGP key available at: keyserver.net, pgp.mit.edu
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Seam XML config

Gerhard Petracek
Administrator
definitely +1 for an own module.
imo we should start with one and change it later on, if we see that it
makes sense.

regards,
gerhard



2012/10/12 Mark Struberg <[hidden email]>

> I'd rather keep the core pretty small and have this in an own module. It's
> used in 15% cases and would blow up the size for the other 85% users.
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
> > From: Jason Porter <[hidden email]>
> > To: "[hidden email]" <
> [hidden email]>
> > Cc: "[hidden email]" <
> [hidden email]>
> > Sent: Friday, October 12, 2012 4:54 PM
> > Subject: Re: Seam XML config
> >
> > On Oct 12, 2012, at 7:58, Mark Struberg <[hidden email]> wrote:
> >
> >>  oki, it seems we have a start.
> >>
> >>  The only technical restriction so far is that there is only 1 bean per
> > class possible in CDI-1.0.
> >>  Apart from that I would like to extend the configuration from Seam-XML
> with
> > regexp to allow wildcard applying.
> >>  So far for the features.
> >>
> >>  A few questions from the peanut gallery:
> >>
> >>  * What is the configuration format? I assume XML is perfectly fine.
> > It's easy to hack an own Extension for other formats. And XML is
> perfectly
> > descriptive and with a schema it's also easy to use.
> >
> > Works for me. We could even push off the work to other classes or have
> the
> > provider of the config be a DS configuration if someone wants to write a
> > different config provider.
> >
> >>  * What should the name of this module be? modules/xmlconfig ? Or do we
> keep
> > the modules for various EE stuff and just add a xmlconfig (or other
> name) to the
> > root?
> >
> > Works fine me either way. Do we feel we have enough of a reason for this
> to be
> > core?
> >
> >>  LieGrue,
> >>  strub
> >>
> >>
> >>
> >>
> >>  ----- Original Message -----
> >>>  From: Romain Manni-Bucau <[hidden email]>
> >>>  To: Mark Struberg <[hidden email]>;
> > [hidden email]
> >>>  Cc:
> >>>  Sent: Friday, October 12, 2012 9:39 AM
> >>>  Subject: Re: Seam XML config
> >>>
> >>>  Hi,
> >>>
> >>>  IMO that's the needed case (at least to start): make cdi friendly
> > legacy
> >>>  libs
> >>>  Le 12 oct. 2012 08:38, "Mark Struberg"
> > <[hidden email]> a
> >>>  écrit :
> >>>
> >>>>  well, there is an important distinction between creating new beans
> > for
> >>>>  classes which are in a BDA and others who don't.
> >>>>
> >>>>  In CDI-1.0 it's not defined what happens if you do
> >>>>  BeforeBeanDiscovery#addAnnotatedType for a class which is already
> > in a BDA
> >>>>  and would get picked up automatically. Some containers treat them
> > as new
> >>>>  bean information, others as default for the existing one. This only
> > gets
> >>>>  specified in CDI-1.1 where we also have a new event
> >>>>  ProcessSyntheticAnnotatedType (or so).
> >>>>
> >>>>  Thus I recommend allowing to add annotatedTypes but only for
> > classes which
> >>>>  are not in a BDA (in other words: they are in a jar without a
> > beans.xml).
> >>>>
> >>>>  Stu, Shane, what do you think about that solution? That should
> > cover the
> >>>>  most important use cases. All features beyond that are not portable
> > in
> >>>>  CDI-1.0.
> >>>>
> >>>>  LieGrue,
> >>>>  strub
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>  ----- Original Message -----
> >>>>>  From: Shane Bryzak <[hidden email]>
> >>>>>  To: [hidden email]
> >>>>>  Cc: Jason Porter <[hidden email]>; Mark Struberg
> > <
> >>>>  [hidden email]>
> >>>>>  Sent: Friday, October 12, 2012 1:01 AM
> >>>>>  Subject: Re: Seam XML config
> >>>>>
> >>>>>  I think we have to support creation of new beans.  Take a look
> > at [1],
> >>>>>  which is a blog post on configuring Drools within Spring.  A
> > little
> >>>  way
> >>>>>  down, under the sessions.xml heading he has an example showing
> > a
> >>>  Drools
> >>>>>  configuration.  We need to be able to support the same kind of
> >>>>>  configuration with CDI.
> >>>>>
> >>>>>  On 12/10/12 08:00, Jason Porter wrote:
> >>>>>>    Great! Thanks Mark. Nothing really complicated here. I
> > think the
> >>>  big
> >>>>>>    question now, is being able to actually create new beans
> > using
> >>>  the
> >>>>  config,
> >>>>>>    or if we simply want to modify existing beans. For me
> > personally
> >>>  I'm -1
> >>>>>  on
> >>>>>>    creating beans using config and +1 on modifying existing
> > beans.
> >>>>>>
> >>>>>>    On Thu, Oct 11, 2012 at 3:22 PM, Mark Struberg
> >>>  <[hidden email]>
> >>>>>  wrote:
> >>>>>>
> >>>>>>>    sure, check the readme:
> >>>>>>>   https://github.com/struberg/InterDyn
> >>>>>>>
> >>>>>>>    LieGrue,
> >>>>>>>    strub
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>    ----- Original Message -----
> >>>>>>>>    From: Jason Porter
> > <[hidden email]>
> >>>>>>>>    To: [hidden email]
> >>>>>>>>    Cc:
> >>>>>>>>    Sent: Thursday, October 11, 2012 10:58 PM
> >>>>>>>>    Subject: Re: Seam XML config
> >>>>>>>>
> >>>>>>>>    Mark, do you have an example for InterDyn (or
> > whatever
> >>>  it's
> >>>>>  called?)
> >>>>>>>>
> >>>>>>>>    We also need to decide if we're going to
> > allow
> >>>  creation of new
> >>>>>  beans or
> >>>>>>>>    simply configure existing beans (adding /
> > removing
> >>>  metadata) using
> >>>>>  this
> >>>>>>>>    configuration.
> >>>>>>>>
> >>>>>>>>    On Fri, Sep 28, 2012 at 9:54 AM, Pete Muir
> >>>  <[hidden email]>
> >>>>>  wrote:
> >>>>>>>>
> >>>>>>>>>      Original inspiration for xml came from
> > Gavin's
> >>>  design for
> >>>>>  CDI 1.0. I
> >>>>>>>>    don't
> >>>>>>>>>      know more details about why they went this
> >>>  direction.
> >>>>>>>>>
> >>>>>>>>>      On 25 Sep 2012, at 00:19, Jason Porter
> > wrote:
> >>>>>>>>>
> >>>>>>>>>      > It did (maybe it still does), but at
> > some
> >>>  point we
> >>>>>  decided that
> >>>>>>>>    wasn't
> >>>>>>>>>      > recommended, I don't recall why
> > though,
> >>>  perhaps
> >>>>>  Stuart or Pete
> >>>>>>>>    remembers.
> >>>>>>>>>      >
> >>>>>>>>>      > On Mon, Sep 24, 2012 at 5:11 PM,
> > Romain
> >>>  Manni-Bucau
> >>>>>>>>>      > <[hidden email]>wrote:
> >>>>>>>>>      >
> >>>>>>>>>      >> each time i read this kind of conf
> > i think
> >>>  it should
> >>>>>  be the
> >>>>>>>>    opposite
> >>>>>>>>>      >>
> >>>>>>>>>      >> why not extending beans.xml (just
> > in the
> >>>  spirit, not
> >>>>>  in the same
> >>>>>>>>    file)
> >>>>>>>>>      >> adding <qualfiiers> etc?
> >>>>>>>>>      >>
> >>>>>>>>>      >>
> >>>>>>>>>      >> *Romain Manni-Bucau*
> >>>>>>>>>      >> *Twitter: @rmannibucau*
> >>>>>>>>>      >> *Blog:
> >>>  **http://rmannibucau.wordpress.com/*<
> >>>>>>>>>      >>
> > http://rmannibucau.wordpress.com/>
> >>>>>>>>>      >> *LinkedIn:
> >>>  **http://fr.linkedin.com/in/rmannibucau*
> >>>>>>>>>      >>
> >>>>>>>>>      >>
> >>>>>>>>>      >>
> >>>>>>>>>      >>
> >>>>>>>>>      >> 2012/9/25 Jason Porter
> >>>>>  <[hidden email]>
> >>>>>>>>>      >>
> >>>>>>>>>      >>> I'm going to send probably
> > the
> >>>  most
> >>>>>  comprehensive example
> >>>>>>>>    that exists
> >>>>>>>>>      >> about
> >>>>>>>>>      >>> what Seam XML can do:
> >>>>>>>>>      >>>
> >>>>>>>>>      >>>
> >>>>>>>>>      >>>
> >>>>>>>>>      >>
> >>>
> >
> https://github.com/seam/config/blob/develop/examples/princess-rescue/src/main/resources/META-INF/seam-beans.xml
> >>>>>>>>>      >>>
> >>>>>>>>>      >>> You can also find the Java
> > classes
> >>>  that back
> >>>>>  that config at
> >>>>>>>>>      >>>
> >>>>>>>>>      >>>
> >>>>>>>>>      >>
> >>>
> >
> https://github.com/seam/examples/tree/master/princess-rescue/src/main/java/org/jboss/seam/examples/princessrescue
> >>>>>>>>>      >>>
> >>>>>>>>>      >>> Mark, could you give some
> > examples of
> >>>  the stuff
> >>>>>  you would like
> >>>>>>>>    to see
> >>>>>>>>>      as
> >>>>>>>>>      >>> well?
> >>>>>>>>>      >>>
> >>>>>>>>>      >>> --
> >>>>>>>>>      >>> Jason Porter
> >>>>>>>>>      >>>
> > http://lightguard-jp.blogspot.com
> >>>>>>>>>      >>>
> > http://twitter.com/lightguardjp
> >>>>>>>>>      >>>
> >>>>>>>>>      >>> Software Engineer
> >>>>>>>>>      >>> Open Source Advocate
> >>>>>>>>>      >>> Author of Seam Catch - Next
> > Generation
> >>>  Java
> >>>>>  Exception Handling
> >>>>>>>>>      >>>
> >>>>>>>>>      >>> PGP key id: 926CCFF5
> >>>>>>>>>      >>> PGP key available at:
> > keyserver.net,
> >>>  pgp.mit.edu
> >>>>>>>>>      >>>
> >>>>>>>>>      >>
> >>>>>>>>>      >
> >>>>>>>>>      >
> >>>>>>>>>      >
> >>>>>>>>>      > --
> >>>>>>>>>      > Jason Porter
> >>>>>>>>>      > http://lightguard-jp.blogspot.com
> >>>>>>>>>      > http://twitter.com/lightguardjp
> >>>>>>>>>      >
> >>>>>>>>>      > Software Engineer
> >>>>>>>>>      > Open Source Advocate
> >>>>>>>>>      > Author of Seam Catch - Next Generation
> > Java
> >>>  Exception
> >>>>>  Handling
> >>>>>>>>>      >
> >>>>>>>>>      > PGP key id: 926CCFF5
> >>>>>>>>>      > PGP key available at: keyserver.net,
> >>>  pgp.mit.edu
> >>>>>>>>
> >>>>>>>>    --
> >>>>>>>>    Jason Porter
> >>>>>>>>   http://lightguard-jp.blogspot.com
> >>>>>>>>   http://twitter.com/lightguardjp
> >>>>>>>>
> >>>>>>>>    Software Engineer
> >>>>>>>>    Open Source Advocate
> >>>>>>>>    Author of Seam Catch - Next Generation Java
> > Exception
> >>>  Handling
> >>>>>>>>
> >>>>>>>>    PGP key id: 926CCFF5
> >>>>>>>>    PGP key available at: keyserver.net, pgp.mit.edu
> >>>
> >
>