Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: Thread Pooling Design Issue - AutevoSpaces

James Love

2003-11-18

Replies:

Uthiresh
We have been doing work in this area with customers using BEA and IBM
app server products. If you are interested then please do speak to
Jugdeep Singh (copied here). Our product, AutevoSpaces, works with
Weblogic (we are working with BEA in a number of customer scenarios at
present) and can ease the burden in your areas of concern.

Please feel free also to pre-register for our latest version of
AutevoSpaces that will be downloadable udring the first week of December
- http://www.intamission.com/products/default.asp?PageID=98

Regards. James.

James Love
CEO, IntaMission
www.intamission.com
+44 (0) 7802451281





> -----Original Message-----
> From: A mailing list for Java(tm) 2 Platform, Enterprise
> Edition [mailto:J2EE-INTEREST@(protected)
> Uthiresh Narayanan
> Sent: 18 November 2003 06:11
> To: J2EE-INTEREST@(protected)
> Subject: Thread Pooling Design Issue
>
>
> Hi everybody,
>
>      I have a business scenario, where there are multiple
> database transactions to be performed. Each transaction is a
> very heavy duty process and takes almost 30-45 mins approx.
> Each of the process request is intiated by the user and are
> added in a table. They have to be performed, not necessarily
> one at a time. But since each process consumes a lot of DB
> resources, I cant have a *LOT* of these processes running at
> one time. The end of the process is signalled when a flag is
> updated in that specific request entry in the table.
>
> I am planning to implement this as a thread pooling design
> where one thread from the pool will service each request (ie.
> make a JDBC call and run the stored procedure for the
> transaction). After servicing it will return to the pool and
> then service a new request. I can limit the number of
> concurrently running transactions by knowing the number of
> threads runnning and so queue up other requests in the DB
> table. I am interested in knowing other techniques to decide
> to queue u these requests. Now these transactions are very
> data intensive and it might be possible that the threads get
> struck in them for a long time.
>
> One problem I forsee in this is if a thread get struck up in
> the database process and never comes out (I cant keep a JDBC
> timeout coz I dont know how much time each process might
> take!) so the thread becomes unusable and moreover the
> request is unserviced. When I run this program on my
> appserver, after some time I get the StuckThreadMaxTime
> warning in the thread dump and the appserver hangs up.(Each
> request is a row in the database and new requests are
> identified by a simple N flag , a 'P' fl;ag for processing
> and after servicing they are made Y). Now this row will be
> stuck up in 'P' state forever.. I want to reset this flag to
> N so that it can be picked up by some other thread and start
> processing again.
>
> Moreover if threads keep getting stuck the pool will
> eventually be empty. I know that I can dynamically increase
> the size of the pool, but till when? The number of user
> requests will be quite high.
>
> What might be other issues with this design paradigm ? and
> thread pooling in general. I know this is not a robust design
> technique, so would be glad to hear ur suggestions.
>
> I am running Weblogic 7.0 and Oracle 8i.
>
> TIA.
> reagrds,
> uthiresh
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@(protected)
> include in the body of the message "signoff J2EE-INTEREST".
> For general help, send email to listserv@(protected)
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@(protected)
of the message "signoff J2EE-INTEREST". For general help, send email to
listserv@(protected)".


©2008 junlu.com - Jax Systems, LLC, U.S.A.