[concurrency-interest] Executors, Work Manager, JEE

Dhanji R. Prasanna dhanji at gmail.com
Thu Feb 1 21:11:01 EST 2007


If you have access to JEE 1.4+ container(s) you can use the Timer EJB
service to schedule and execute tasks asynchronously.

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Session5.html

Honestly I cant think of a reason you would need to spawn threads from
an appserver. JEE 1.4 and above give you most of the functionality you
require out of the box. And whatever obscure need you may have outside
of that (maybe some warped and twisted reading/writing of multiple
disk files?) can easily be added by wrapping an whatever SE service in
a resource adapter.

On 2/2/07, Ryan LeCompte <Ryan.LeCompte at pango.com> wrote:
>
>
>
> Thank you all for your suggestions! I'll be investigating this further.
>
> Ryan
>
>  ________________________________
>  From: concurrency-interest-bounces at cs.oswego.edu on behalf
> of Gregg Wonderly
> Sent: Thu 2/1/2007 1:42 PM
> Cc: concurrency-interest at cs.oswego.edu
> Subject: Re: [concurrency-interest] Executors, Work Manager, JEE
>
>
>
>
>
>
>
> Ryan LeCompte wrote:
> > Thanks for responding. I basically need a safe way to asynchronously
> > schedule work to be executed, as well as schedule work to be executed
> > periodically (think Quartz or java.util.Timer). I was thinking I could
> > use the new Executor/task framework to achieve this, but I am not sure
> > if this is "safe" within JEE containers, although the new concurrency
> > utilities avoid the direct use of java.lang.Thread directly. Any insight
> > would be very helpful.
>
> The JEE model is already using "pools" to dispatch inbound work requests
> (web
> pages or method calls etc).  I don't think that the design paradigm was
> intended
> to include so many of the other things that one might find in code that is
> more
> like an application or container itself.  As others have said, you might
> need to
> consider your design basis to see if you really should put that other stuff
> into
> another place such as a simple JSE application or into a larger service
> platform
> such as Jini or something else which can provide your the power that you
> need
> with the portability that you might desire.
>
> Gregg Wonderly
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>
>


More information about the Concurrency-interest mailing list