users@glassfish.java.net

Re: Working queue in Glassfish

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Fri, 10 Aug 2007 19:29:47 +0530

Florent Blondeau wrote:
> Thanks a lot,
>
> your links and explanations are a great help for me...
> Do you have some links to learn examples of connectors ?

A good article is
http://developers.sun.com/appserver/reference/techart/resource_adapters.html

Our JavaOne presentation in 2005 could also be a good place to start.
http://gceclub.sun.com.cn/java_one_online/2005/TS-3513/ts-3513.pdf

>
> The google search you make for the QuartzResourceAdapter only lead to
> JBoss results.
> Do you think this API will work under Glassfish ?

My web search only lead to the JBoss Resource Adapter. Ideally one could write a
Quartz RA that is portable and made to work with all J2EE 1.4 application servers.

I don't know much about this specific adapter, but if the adapter is developed
as a portable Connector 1.5 resource adapter, it should work under GlassFish. I
haven't tried it though, sorry. Please let us know your experiences if you try
that resource adapter.

Thanks
--Siva.

>
> Thanks again
>
> Sivakumar Thyagarajan a écrit :
>> glassfish_at_javadesktop.org wrote:
>>> Hi all,
>>>
>>> I post here to get some advice.
>>> I develop an application on Glassfish v2 that needs to perform
>>> regularly (as linux cron does) a lot of operations. These operations
>>> are pretty long, and must be performed by threads.
>>> So, i would like to manage a thread pool and give the threads the
>>> work to do via a WorkManager instantiated via the Quartz framework
>>> (which is used to perform scheduled task).
>>> My question is : Can I use a thread pool created via the Glassfish
>>> Admin console ? If I can, how can I call it from my code and pass
>>> work to do ?
>> The thread pool created via the admin console is an ORB thread pool
>> that is
>> meant to be assigned to J2EE connectors/resource adapters
>> [WorkManager] or the
>> ORB. This cannot be used externally [in a portable fashion] by
>> applications.
>>
>>> Or have I to implement my own thread pool and working queue ?
>> The EJB and the servlet specifications explicitly prohibit an
>> application from
>> create their own threads/thread-pool within the container. The portable
>> mechanism would be to use the Work Manager Contract in the J2EE connector
>> specification or handle such work asy.
>> http://java.sun.com/j2ee/1.4/docs/api/javax/resource/spi/work/WorkManager.html
>>
>> http://java.sun.com/developer/technicalArticles/J2EE/connectorarch1_5/
>> http://www.ibm.com/developerworks/java/library/j-jca2/
>>
>> Quartz integration could also be done via a resource adapter.
>> http://www.google.com/search?q=QuartzResourceAdapter
>>
>> Thanks
>> --Siva.
>>
>>> Or have I to implement my own thread pool and working queue ?
>>> Thanks for your responses
>>> [Message sent by forum member 'dazzx' (dazzx)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=230403
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>
>