mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Brégier <fred.breg...@free.fr>
Subject Re: ThreadPool in Mina with concurrent from Java5 Howto ?
Date Sun, 24 Sep 2006 20:42:56 GMT
I try, just for fun to begin to make the forward backport...
And it is quite complex. Not so easy I figure before.
(a lot of bad casting and so on, of course, but I had
to see it to be sure)

So I think the first method (search and replace the import
to remove any trace of backport) is the best right now,
as you guys tell me before.

Thanks a lot. If I get my work working, I will post an example
of creating ThreadPools (as a lot of users ask for it),
just to give my little contribution to Mina (at least in faq).

Frederic
==

I know it's considered "evil" but in cases like this, it just makes sense.
Why isn't the backport jar just using the same package names as the 1.5
concurrent code? If that were being done, you would simply have that jar on
the classpath if you were in 1.4 and remove it for 1.5. Piece of cake, 100%
compatibility and it's much simpler for all involved. No more backport jar
even if you are using 1.5.

Michael


> OK with everybody.
> I want to try two way from what I read :
>
> 1) modifying Mina such as it uses natively Java5 concurrent functions
>
> 2) or proposing a "forward"backport module that use Java5 native method
> such that we can either link with backport for Java4, or link with the
> "forward"
> backport for Java5.
>
> I don't want to go in a wrong direction for Mina.
> So I ask you what could be the best, for me of course,
> but also for all Mina users ?
>
> 1 is simple but I have to change every time I get a new version of Mina.
> However it is quite simple (just a search and replace).
>
> 2 is not too difficult (just wrap native Java5 functions in
> "forward-backport"
> library) and allow to not modify in any way Mina and to continue for
> others
> to develop Mina using more and more Java5 functionnality, at least those
> that are implemented in backport (take care of the difference between the
> native implementation and the backport one such as the syntax of generic
> types
> introduced in Java5).
>
> It depends a lot if Mina will go into Java5 compatibility or not ?
> I saw for version 1.1, so perhaps, waiting for this version using
> first method is the simplest.
> What do you think ?
>
> Frederic
>
> On 9/24/06, Greg Duffy <gduffy@gmail.com> wrote:
>>
>> Don't forget ArrayBlockingQueue in backport concurrent (and j.u.c)
>
>
> IIRC, it's a bounded queue.  No?
>
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP key fingerprints:
> * E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
> * B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6
>
>




Mime
View raw message