You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@apache.org> on 2012/08/06 17:13:31 UTC

[chain2] ServiceLoader in Chain2 to load Jackson supported formats

Hi all guys,

I am prototyping the Jackson support as described in CHAIN-76 and
found an elegant solution with ServiceLoader to support, via Jackson,
multiple format support without hardcoding them in the ConfigParser
code but rather loading available parsers at runtime.

Since [chain2] hasn't been published yet and my prototype would
require an API which is not available on Java5, we have 3 options:

 * using the [discovery] component

 * using a backport[1] component I wrote time ago for java5 (it's ALv2)

 * upgrade to java6

The second option sounds to me the more reasonable since uses java
standard APIs and is Java6 compatible, while keeping Java5 backward
compatibility...

WDYT?
Many thanks in advance, all the best!
-Simo

[1] http://99soft.github.com/backport-spi/

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [chain2] ServiceLoader in Chain2 to load Jackson supported formats

Posted by Elijah Zupancic <el...@zupancic.name>.
I vote for going to Java 6. Java 6 is end of life in November, so it
seems a bit silly to support two end of life versions of Java. One
seems sufficient. That said - I may be breaking from the consensus
here at the Apache Commons.

-Elijah

On Mon, Aug 6, 2012 at 8:13 AM, Simone Tripodi <si...@apache.org> wrote:
> Hi all guys,
>
> I am prototyping the Jackson support as described in CHAIN-76 and
> found an elegant solution with ServiceLoader to support, via Jackson,
> multiple format support without hardcoding them in the ConfigParser
> code but rather loading available parsers at runtime.
>
> Since [chain2] hasn't been published yet and my prototype would
> require an API which is not available on Java5, we have 3 options:
>
>  * using the [discovery] component
>
>  * using a backport[1] component I wrote time ago for java5 (it's ALv2)
>
>  * upgrade to java6
>
> The second option sounds to me the more reasonable since uses java
> standard APIs and is Java6 compatible, while keeping Java5 backward
> compatibility...
>
> WDYT?
> Many thanks in advance, all the best!
> -Simo
>
> [1] http://99soft.github.com/backport-spi/
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



-- 
-Elijah

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [chain2] ServiceLoader in Chain2 to load Jackson supported formats

Posted by Simone Tripodi <si...@apache.org>.
Democracy wins, long live Java6! :)

thanks for the feedbacks!

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/


On Mon, Aug 6, 2012 at 6:08 PM, Matt Benson <gu...@gmail.com> wrote:
> +1 for Java 6 as well.
>
> Matt
>
> On Mon, Aug 6, 2012 at 10:59 AM, James Carman
> <ja...@carmanconsulting.com> wrote:
>> +1 to upgrade to Java 6.
>>
>> On Mon, Aug 6, 2012 at 11:13 AM, Simone Tripodi
>> <si...@apache.org> wrote:
>>> Hi all guys,
>>>
>>> I am prototyping the Jackson support as described in CHAIN-76 and
>>> found an elegant solution with ServiceLoader to support, via Jackson,
>>> multiple format support without hardcoding them in the ConfigParser
>>> code but rather loading available parsers at runtime.
>>>
>>> Since [chain2] hasn't been published yet and my prototype would
>>> require an API which is not available on Java5, we have 3 options:
>>>
>>>  * using the [discovery] component
>>>
>>>  * using a backport[1] component I wrote time ago for java5 (it's ALv2)
>>>
>>>  * upgrade to java6
>>>
>>> The second option sounds to me the more reasonable since uses java
>>> standard APIs and is Java6 compatible, while keeping Java5 backward
>>> compatibility...
>>>
>>> WDYT?
>>> Many thanks in advance, all the best!
>>> -Simo
>>>
>>> [1] http://99soft.github.com/backport-spi/
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://simonetripodi.livejournal.com/
>>> http://twitter.com/simonetripodi
>>> http://www.99soft.org/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [chain2] ServiceLoader in Chain2 to load Jackson supported formats

Posted by Matt Benson <gu...@gmail.com>.
+1 for Java 6 as well.

Matt

On Mon, Aug 6, 2012 at 10:59 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> +1 to upgrade to Java 6.
>
> On Mon, Aug 6, 2012 at 11:13 AM, Simone Tripodi
> <si...@apache.org> wrote:
>> Hi all guys,
>>
>> I am prototyping the Jackson support as described in CHAIN-76 and
>> found an elegant solution with ServiceLoader to support, via Jackson,
>> multiple format support without hardcoding them in the ConfigParser
>> code but rather loading available parsers at runtime.
>>
>> Since [chain2] hasn't been published yet and my prototype would
>> require an API which is not available on Java5, we have 3 options:
>>
>>  * using the [discovery] component
>>
>>  * using a backport[1] component I wrote time ago for java5 (it's ALv2)
>>
>>  * upgrade to java6
>>
>> The second option sounds to me the more reasonable since uses java
>> standard APIs and is Java6 compatible, while keeping Java5 backward
>> compatibility...
>>
>> WDYT?
>> Many thanks in advance, all the best!
>> -Simo
>>
>> [1] http://99soft.github.com/backport-spi/
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [chain2] ServiceLoader in Chain2 to load Jackson supported formats

Posted by James Carman <ja...@carmanconsulting.com>.
+1 to upgrade to Java 6.

On Mon, Aug 6, 2012 at 11:13 AM, Simone Tripodi
<si...@apache.org> wrote:
> Hi all guys,
>
> I am prototyping the Jackson support as described in CHAIN-76 and
> found an elegant solution with ServiceLoader to support, via Jackson,
> multiple format support without hardcoding them in the ConfigParser
> code but rather loading available parsers at runtime.
>
> Since [chain2] hasn't been published yet and my prototype would
> require an API which is not available on Java5, we have 3 options:
>
>  * using the [discovery] component
>
>  * using a backport[1] component I wrote time ago for java5 (it's ALv2)
>
>  * upgrade to java6
>
> The second option sounds to me the more reasonable since uses java
> standard APIs and is Java6 compatible, while keeping Java5 backward
> compatibility...
>
> WDYT?
> Many thanks in advance, all the best!
> -Simo
>
> [1] http://99soft.github.com/backport-spi/
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org