Threads in Tomcat

2004-02-15 Thread kwirirai
Thanks to All, I have done all the stuff to make my web app thread safe, It seems its fine for the moment.Except for a few more things. It seems threading is realy complex. I am forking out a new thread in my Handle request method and this is making the other request to wait for the other thread

threads in tomcat

2005-06-16 Thread Daniel Molina \(Inter-Media\)
Hello, If I use threads, through the Thread class, how can I can finish them whenever Tomcat reloads the application that created them. Thanks. Regards. Daniel Molina Wegener - To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Threads in TOMCAT 3.2

2001-06-27 Thread Valerdi Tormo, Jose
Hi, Anybody knows if it's posible encrease the number of threads with TOMCAT 3.2. I'm doing some performance testing and when I try to execute more that 100 request simultaneously I get the the error ... 2001-06-27 03:01:18 - ThreadPool: Pool exhausted with 100 threads. It's posible def

Threads in Tomcat 5

2004-04-01 Thread Angelov, Rossen
Hi, I'm trying to understand how exactly Tomcat 5 is organized to work with threads. Is there any documentation on how the connector is using the threads? What happens in the thread pool, how exactly the are threads picked from the pool and what is their state? And what happens with the released t

creating threads in tomcat

2004-02-10 Thread Damjan Majstorovic
l would be in one place, and I would use DB connection pooling provided by Tomcat. I like 2. because I understand it is bad to open new threads in Tomcat. I like 3 because I avoid having threads in Tomcat, but can get to DB thru classes that are already in my Tomcat JVM via RMI. I do not like

Threads in Tomcat 5

2004-10-06 Thread Juan Manuel Porras Gálvez
Hello all, I'm a newbie in mailing user list. My post is relationship with threads in Tomcat Server 5.0. Over Debian Linux v3.0 rc 2, threads are shown like processes; many processes are shown in process list command (ps -aux). We think that most of them, except one or two are threads

RE: threads in tomcat

2005-06-16 Thread Robert Harper
bject: threads in tomcat Hello, If I use threads, through the Thread class, how can I can finish them whenever Tomcat reloads the application that created them. Thanks. Regards. Daniel Molina Wegener - To unsubscribe, e-mail: [

Re: threads in tomcat

2005-06-16 Thread Wendy Smoak
From: "Daniel Molina (Inter-Media)" <[EMAIL PROTECTED]> > If I use threads, through the Thread class, how can I can finish them >whenever Tomcat reloads the application that created them. You can use a ServletContextListener which will be notified when the webapp starts and stops. Implement

Exexting threads in Tomcat

2005-09-02 Thread IndianAtTech
Hi All, I am using JSF framework for my project. I don't know if Tomcat is restcting me or JSF framework is restricting me. But I am unable to create and execute threads either in my JSF pages or my managed beans. I have created and exected threads successfully in this http://www.mystudentapa

Executing threads in Tomcat

2005-09-02 Thread IndianAtTech
Hi All, I am using JSF framework for my project. I don't know if Tomcat is restcting me or JSF framework is restricting me. But I am unable to create and execute threads either in my JSF pages or my managed beans. I have created and exected threads successfully in this http://www.mystudentapa

RE: Threads in Tomcat 5

2004-04-01 Thread Shapira, Yoav
ch is of course available. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Angelov, Rossen [mailto:[EMAIL PROTECTED] >Sent: Thursday, April 01, 2004 11:27 AM >To: 'Tomcat Users List' >Subject: Threads in Tomcat 5 > >Hi, > >I'

Re: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
why do you want to use a thread to manage authentication? given the requestProcessor threads are reused, it makes no sense to use the thread for the mapping. you're better off just authenticating the first time and setting the HttpSession, rather than look up the thread. I'm probably missing

RE: Threads in Tomcat 5

2004-04-01 Thread Angelov, Rossen
ginally created 2-3 years ago to work on iPlanet and now I'm trying move them to Tomcat but it looks like there will be lot of problems. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re:

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
nd now I'm trying move them to Tomcat but it looks like there will be lot of problems. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re: Threads in Tomcat 5 why do you want to us

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re: Threads in Tomcat 5 why do you want to use a thread to manage authentication? given the requestProcessor threads are reused, it makes no sense to use the thread for the mapping. you're

RE: Threads in Tomcat 5

2004-04-01 Thread Angelov, Rossen
ally pages) based on the product and the policy information. Each http session is related to an eRights session. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 12:26 PM To: Tomcat Users List Subject: RE: Threads in Tomcat 5 hit sen

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
resources (usually pages) based on the product and the policy information. Each http session is related to an eRights session. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 12:26 PM To: Tomcat Users List Subject: RE: Threads in Tomcat 5

RE: Threads in Tomcat 5

2004-04-01 Thread Ralph Einfeldt
ilto:[EMAIL PROTECTED] > Sent: Thursday, April 01, 2004 6:27 PM > To: 'Tomcat Users List' > Subject: Threads in Tomcat 5 > > > Hi, > > I'm trying to understand how exactly Tomcat 5 is organized to > work with > threads. Is there any documentation on h

RE: creating threads in tomcat

2004-02-10 Thread Shapira, Yoav
hru >RMI. > >I like 1. because all would be in one place, and I would use DB connection >pooling provided >by Tomcat. It's also good because you will be able to easily monitor and manage the DB threads via a web interface if you'd like. >I like 2. because I underst

AW: Threads in Tomcat 5

2004-10-06 Thread Steffen Heil
Hi > Are there any solution about limit the process or threads count?. Remember that Tomcat "server.xml" parameters don`t work. For me, these settings work. However, remember what they describe. They set the numbers of workers, not total threads. You applicaton might spawn threads, tomcat might s

HOW CAN I USE THREADS IN TOMCAT

2003-11-01 Thread Prince
Hi, I need to send a mail automatically at 10 minutes interval. how can i do this? how can i activate threads in tomcat? regards Prince - Original Message - From: "Bill Barker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 01, 2003 1:00 PM

How to increase max threads in Tomcat 4.1.12?

2002-12-16 Thread Tuan H. Le
Hi, When we ran a stress test on our application, it hang Tomcat service. We found an INFO message in stderr a message below INFO: All threads are busy, waiting. Please increase maxThreads or check the servlet status200 200 I have tried to increase the maxProcessors in \conf\server.xml from 20

Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-01 Thread Eric C
ubject: HOW CAN I USE THREADS IN TOMCAT > Hi, > I need to send a mail automatically at 10 minutes interval. how can i do > this? how can i activate threads in tomcat? > regards > Prince > > - Original Message - > From: "Bill Barker" <[EMAIL PROTECTED]&g

Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-01 Thread Erik Wright
rince" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Saturday, November 01, 2003 8:51 AM Subject: HOW CAN I USE THREADS IN TOMCAT Hi, I need to send a mail automatically at 10 minutes interval. how can i do this? how can i activate threads in tomca

RE: HOW CAN I USE THREADS IN TOMCAT

2003-11-01 Thread Fred Whipple
utnil the Web app shuts down. Just a thought! -Fred Whipple iMagine Internet Services > -Original Message- > From: Erik Wright [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 01, 2003 11:03 AM > To: Tomcat Users List > Subject: Re: HOW CAN I USE THREADS IN

Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread IvanLatysh
Hello, Prince! You wrote to "Tomcat Users List" <[EMAIL PROTECTED]> on Sat, 1 Nov 2003 13:21:42 +0530: P> Hi, P> I need to send a mail automatically at 10 minutes interval. how can P> i do this? how can i activate threads in tomcat? Tomcat is a Java application, t

Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread Mufaddal Khumri
I need to send a mail automatically at 10 minutes interval. how can P> i do this? how can i activate threads in tomcat? Tomcat is a Java application, there are no difference of using threads with Tomcat or without it. Simply expand Thread class, and run your thread. But don't forget

RE: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread Shapira, Yoav
Howdy, >I have an instance of MyMailScheduler - mmsched in a ContextListener >class for my webapp. mmsched spawns threads to do some work regarding >sending emails. In my contextDestroy method I do : mmsched = null; mmsched should have a close()/stop()/shutdown() method which stops its threads.

Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread Mufaddal Khumri
Hi, The problem is that stop / suspend are deprecated. The destroy() method has yet not been implemented ? What does one do then? I have a solution - Keep a reference to the instances of the threads spawned in a hashtable. In contextDestroy make all these references null . Will this solution

[Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
I've mainly worked in BEA WebLogic before and from colleagues and other sources I have heard it is not recommended (and sometimes not allowed, some even said) to create threads in your application. Indeed, when the application went live in a multi-server clustered environment, we got very inconsist

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Tim Funk
You can create threads all day in tomcat, but here are the importnatn things to consider: - WHY! Are threads really the correct solution? - If you create threads - what are their scope? Daemon, non-daemon? - If you create non-daemon threads - be prepared for the consequences such as the JVM not g

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
Well, that was part of my question if I cannot/don't implement daemon threads to do e.g. automatic daily tasks, what else? E.g, at the end of the day send an e-mail to a (real life) manager with a summary of the day's transactions something like that. Does Tomcat provide some sort of Actio

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Kwok Peng Tuck
Hello Riaan, you might want to check out jcrontab. http://jcrontab.sourceforge.net Riaan Oberholzer wrote: Well, that was part of my question if I cannot/don't implement daemon threads to do e.g. automatic daily tasks, what else? E.g, at the end of the day send an e-mail to a (real life) man

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Tim Funk
Tomcat doesn't provide this but other simple solutions exist such as exposing a URL and using cron + wget. (Some may also say kludge too) As for aggregating statistics - I would recommend using a log file to record the essential measurements then running your stats program on the logs. This way

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
... nice suggestion, but I am delivering an application as a .war file to a 3rd party and they just want the .war (+ context.xml) with everything in it hence, no other applications checking the logs or database. All functionality must come from the .war running in Tomcat. It is very important:

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread John Turner
cron = scheduler wget = command line HTTP/HTTPS client The requirement for delivering everything in a WAR file is all nice and dandy, but if you think about it, the requirement automatically breaks the other requirement: scheduling. If you cannot have a log file, and you cannot access a databa

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
Perhaps I should give a better explanation of how the application works: I deliver a .war file. I do have access to an underlying database. The scheduled tasks perform more on a "is time reached" than "has time elapsed" principle... eg, it triggers when "is it past midnight?" instead of "has 24 ho

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread John Turner
Nobody, from what I can tell, is saying "can't". You did ask, though. If you're willing to be diligent about coding your threads, go for it. I think the point of previous posts was that in many cases, there is no need for such a thing as your asking. There are always exceptions to the rule, t

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
You're right, no-one said I can't. :) I was hoping someone who has actually used it could give some feedback about it. The (obvious) reason why the scheduled task also cannot be active if the web-app is not active, is that the scheduled task requires users to use web-app. Eg, Friday at 15:00 you g

RE: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Shapira, Yoav
Howdy, >I cannot see why creating a daemon thread cannot cater >for this. You just start the thread in the init method >of the InitServlet (or any servlet you create with >start-when-app-starts). I'm actually a fan of the background daemon-thread approach, and think the user-threading limitation

RE: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Riaan Oberholzer
Yep, thanks... I've heard from other sources as well that the "ServletContextListener" approach is better. It gives me some comfort knowing other people find the approach safe and without too many pitfalls. :) --- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote: > > Howdy, > > >I cannot see why crea

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread srevilak
> From: Tim Funk > Subject: Re: [Q] Is it safe to create threads in Tomcat web-apps? > You can create threads all day in tomcat, but here are the importnatn things > to consider: > - WHY! Are threads really the correct solution? > - And last but not least: WHY! Are threads

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread Tim Funk
I am in total agreement and I have used user created threads on my site. I view user created threads as a "dangerous" and usually un-needed thing. Dangerous because of the side effects that aren't accounted for by more junior programmers such as concurrency, shutting down the JVM (or lack of b

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-28 Thread G. Wade Johnson
pread on a program to make it "better". That being said. Tim did not say "don't" he asked "why". That's much politer than I've normally been to people in a similar circumstance. G. Wade [EMAIL PROTECTED] wrote: > > > From: Tim Funk > >

Re: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-30 Thread Kwok Peng Tuck
jcrontab works ok, it is modeled after the unix crontab entries. Best bet is to try it and see if it meets ones needs :) Anton Tagunov wrote: So, what John is speaking about - spending less effort on thread coding and using an existing solution (native Unix crontab) may also be pushing you to usin

Re: [Q] Is it safe to create threads in Tomcat web-apps? (JCrontab)

2003-07-28 Thread Riaan Oberholzer
This looks promising, but what do they do differently than just starting a deamon thread and doing some background work? Why bother with this if you can start your own custom thread, or do they do something else? --- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote: > Hello Riaan, you might want to che

Re[2]: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-29 Thread Anton Tagunov
Hello Riaan! RO> (I have no idea what cron +wegt is???) As John has explained JT> cron = scheduler Unix world I would add to this :-) And on the files (or directories involved is named crontab, see bellow) JT> wget = command line HTTP/HTTPS client both Unix and Windows I just wanted to say that

Re[2]: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-29 Thread Anton Tagunov
Hello Srevilak! sgn> However, if the three steps are IO-bound, using multiple threads to sgn> run them concurrently can lead to a big improvement. One might also consider using some kind of thread pooler in this setting. Perhaps one could be crafted on top of jakarta-commons-pool -Anton --

RE: Re[2]: [Q] Is it safe to create threads in Tomcat web-apps?

2003-07-30 Thread Shapira, Yoav
av Shapira Millennium ChemInformatics >-Original Message- >From: Anton Tagunov [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 30, 2003 1:37 AM >To: Tomcat Users List >Subject: Re[2]: [Q] Is it safe to create threads in Tomcat web-apps? > >Hello Srevilak! > >sg