Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Padam J Singh
Eric, You can use a simple Consumer/Producer pattern here. See the java.util.Queue classes. What I have done in a similar situation is create a single Queue, multiple consumer threads all blocking on the same queue. A user action puts something in the queue, and one of the thread comes out

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread André Warnier
Eric P wrote: Hi all, In my Tomcat app I'm looking for a good (or commonly used) method for firing off an asynchronous task. For example, a user registers for an account, and an a task to send a verification email to the user is triggered w/o delaying the response to the user (i.e., task

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Pid
On 22/07/2010 05:58, Eric P wrote: Hi all, In my Tomcat app I'm looking for a good (or commonly used) method for firing off an asynchronous task. For example, a user registers for an account, and an a task to send a verification email to the user is triggered w/o delaying the response to

Re: Problems starting Tomcat on windows 7 64bit.

2010-07-22 Thread Pid
On 22/07/2010 04:30, sharkanana wrote: I've run tomcat so many times before on every one of my computers with no problem, but I just went to do it today on my desktop and am getting an error immediately on the start of the server. I have set catalina_home, classpath, In addition to

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Mikolaj Rydzewski
On 07/22/2010 10:17 AM, Pid wrote: Have a look at Executors.class in java.util.concurrent. You can start/stop an ExecutorService in the init/destroy methods of your Servlet, submit a Runnable to the ExecutorService representing the job(s) you want to execute. Timer / TimerTask might be

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread André Warnier
André Warnier wrote: Eric P wrote: Hi all, In my Tomcat app I'm looking for a good (or commonly used) method for firing off an asynchronous task. For example, a user registers for an account, and an a task to send a verification email to the user is triggered w/o delaying the response to

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Mikolaj Rydzewski
On 07/22/2010 10:33 AM, André Warnier wrote: Talking further to myself, I'll add that it also makes it easier to suspend/resume the sending of emails separately if you need to for some reason, without having to change anything to your running webapp. I know, it is certainly less exciting than

Re: Tuning garbage collection

2010-07-22 Thread paul womack
laredotornado wrote: Hi, I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you use to tune your garbage collection parameters? My main strategy is to see if I have any cripping GC problems. If not, I leave the GC to its own (or Sun's) devices. GC tuning is likely to be

Re: Tuning garbage collection

2010-07-22 Thread Ken Bowen
Google is your friend: java garbage collection log format quickly leads to http://stackoverflow.com/questions/895444/java-garbage-collection-log-messages and others Then figure out if you actually have a problem which requires any adjustment. On Jul 21, 2010, at 5:07 PM,

Re: Tuning garbage collection

2010-07-22 Thread Ronald Klop
Op donderdag, 22 juli 2010 14:14 schreef paul womack pwom...@papermule.co.uk: laredotornado wrote: Hi, I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you use to tune your garbage collection parameters? My main strategy is to see if I have any cripping GC problems.

RE: Fire off asynch task in Tomcat.

2010-07-22 Thread Martin Gainty
Miki/Andre //i wasnt able to determine JMX ability to schedule a specific task for a specific time? //could you reply with an example demonstrating that capability? //in the meanwhile you *could* implement Axis2 SchedulerTimerTask //granted java.util.Timer is weak on specific time but if

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Mikolaj Rydzewski
On 07/22/2010 03:49 PM, Martin Gainty wrote: //i wasnt able to determine JMX ability to schedule a specific task for a specific time? I was referring to Andre's sentence: [using database] makes it easier to suspend/resume the sending of emails separately if you need to for some reason,

Cluster session failover question

2010-07-22 Thread Darren Kukulka
Hi Tomcatters, Just a quick question regarding Apache Web Server load balancing down to Tomcat cluster. We have a number of 2-node Tomcat 6.0.20 clusters, all configured as peer to peer pairs, on the same subnet with no real network oddities mesh getting in the way to speak of. Apache

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread André Warnier
Mikolaj Rydzewski wrote: On 07/22/2010 03:49 PM, Martin Gainty wrote: //i wasnt able to determine JMX ability to schedule a specific task for a specific time? I was referring to Andre's sentence: [using database] makes it easier to suspend/resume the sending of emails separately if you

Re: Cluster session failover question

2010-07-22 Thread Rainer Jung
On 22.07.2010 16:19, Darren Kukulka wrote: Hi Tomcatters, Just a quick question regarding Apache Web Server load balancing down to Tomcat cluster. We have a number of 2-node Tomcat 6.0.20 clusters, all configured as peer to peer pairs, on the same subnet with no real network oddities mesh

intermittent javax.net.ssl.SSLException: Invalid padding tomcat6.x linux

2010-07-22 Thread Michele Mase'
Hi folks! I've a strange problem, please help me to find a solution (not telling me to make a script in order restart tomcat in case of the exception) Under linux environment, RedHat EL5.5 Jdk 1.5.0_22 Tomcat6.0.26 our webapps takes strange intermittent javax.net.ssl.SSLException: Invalid padding

Re: Cluster session failover question

2010-07-22 Thread Jon Brisbin
On Jul 22, 2010, at 9:19 AM, Darren Kukulka wrote: Another, more difficult scenario, is when one of the Tomcat cluster nodes begins to groan and become unresponsive, say when OldGen or PermGen becomes full...in this case the mod_jk connector does not identify the node as having failed and

Connection Refused On Tomcat Server Shutdowns if...

2010-07-22 Thread John A Parker
Using apache-tomcat-6.0.28... We are encountering issue with catalina.sh stops IF we use a variable to set the SHUTDOWN port. e.g.: CATALINA_OPTS = ...-Dco.shutdown.port=8104 ... server.xml =... !- Server port=8104 shutdown=SHUTDOWN --

Re: Connection Refused On Tomcat Server Shutdowns if...

2010-07-22 Thread David Fisher
If you look at catalina.sh you will see that stop does not include CATALINA_OPTS: $_RUNJAVA $JAVA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \

Re: Connection Refused On Tomcat Server Shutdowns if...

2010-07-22 Thread Rainer Jung
On 22.07.2010 17:02, John A Parker wrote: Using apache-tomcat-6.0.28... We are encountering issue with catalina.sh stops IF we use a variable to set the SHUTDOWN port. e.g.: CATALINA_OPTS = ...-Dco.shutdown.port=8104 ... server.xml =... !- Server

Re: Connection Refused On Tomcat Server Shutdowns if...

2010-07-22 Thread Rainer Jung
On 22.07.2010 17:24, David Fisher wrote: If you look at catalina.sh you will see that stop does not include CATALINA_OPTS: $_RUNJAVA $JAVA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \

RE: Connection Refused On Tomcat Server Shutdowns if...

2010-07-22 Thread John A Parker
Rainer, et al, Obvious (now that you point it out! (:-\). Moving my settings to JAVA_OPTS corrected the behavior. THANKS TO ALL! John Cornell University (607) 255-9356 john.a.par...@cornell.edu -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Thursday, July

Notification on Tomcat Active HTTP Threads 400

2010-07-22 Thread kapilok
1. Is there a JMX counter/attribute that measures active/busy HTTP threads? 2. How can I send a notification on exceeding a threshold value on this counter? 3. Can this be achieved through some admin console? Modifying tomcat code is not an option. Thanks, Kapil -- View this message in context:

RE: Problems starting Tomcat on windows 7 64bit.

2010-07-22 Thread sharkanana
java -version java version 1.6.0_18 Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode) javac -version javac 1.6.0_18 Tomcat 7 is the version I'm currently trying to run with, I installed it by extracting the zip file. I'm starting with

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric, On 7/22/2010 12:58 AM, Eric P wrote: One idea would be to insert a record into a database table that signifies an email should be sent to the user. This table could be regularly checked by a scheduled job (e.g., a TimerTask) that runs every

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 7/22/2010 4:33 AM, André Warnier wrote: André Warnier wrote: Talking further to myself, I'll add that it also makes it easier to suspend/resume the sending of emails separately if you need to for some reason, without having to change

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Eric, On 7/22/2010 12:56 PM, Christopher Schultz wrote: Eric, On 7/22/2010 12:58 AM, Eric P wrote: One idea would be to insert a record into a database table that signifies an email should be sent to the user. This table could be regularly

Re: Notification on Tomcat Active HTTP Threads 400

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kapil, On 7/22/2010 12:07 PM, kapilok wrote: 1. Is there a JMX counter/attribute that measures active/busy HTTP threads? Yes, depending on the Tomcat version. You didn't mention yours. 2. How can I send a notification on exceeding a threshold

Re: Problems starting Tomcat on windows 7 64bit.

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 7/22/2010 12:21 AM, Caldarale, Charles R wrote: From: sharkanana [mailto:sharkan...@gmail.com] Subject: Problems starting Tomcat on windows 7 64bit. I have tried many different versions of tomcat and all give the same problem. So

SSL, mod_proxy_ajp and AJP connectors query

2010-07-22 Thread Brett Delle Grazie
Hi, I'm using RHEL5.5 (Up-to-date) Apache httpd-2.2.3 (from RHEL) with mod_proxy/mod_proxy_ajp Tomcat 6.0.28 (binary distribution from apache). Tomcat native libs (1.1.20, compiled) I have a question regarding AJP connectors and SSL Our application is being SSL offloaded at the HTTPD server end

Re: SSL, mod_proxy_ajp and AJP connectors query

2010-07-22 Thread Rainer Jung
On 22.07.2010 19:31, Brett Delle Grazie wrote: Hi, I'm using RHEL5.5 (Up-to-date) Apache httpd-2.2.3 (from RHEL) with mod_proxy/mod_proxy_ajp Tomcat 6.0.28 (binary distribution from apache). Tomcat native libs (1.1.20, compiled) I have a question regarding AJP connectors and SSL Our

Error of Tomcat using Struts2

2010-07-22 Thread bladu
Hi, I am developing an Struts2 application, but unfortunately it doesn´t run, It gives me the following error: ERROR: Servlet /webstruts throw exception de load() javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE Anybody knows how

Default JVM argument for tomcat

2010-07-22 Thread Gopi Valleru
Hi, For tomcat, if we dont give any memory args in catalina.sh, then want is the xms and xmx values. And can we monitor tomcat memory utilization from tomcat manager(console). If we are not using tomcat console then is there any way to monitor memory utilization of tomcat instance. -- Thanks,

Re: Default JVM argument for tomcat

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gopi, On 7/22/2010 5:11 PM, Gopi Valleru wrote: For tomcat, if we dont give any memory args in catalina.sh, then want is the xms and xmx values. This is entirely up to the JVM, and is not Tomcat-specific. If you don't specify any memory settings,

Re: SSL, mod_proxy_ajp and AJP connectors query

2010-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brett, On 7/22/2010 1:31 PM, Brett Delle Grazie wrote: Tomcat 6.0.28 (binary distribution from apache). My question is, in the Tomcat server.xml, do I require _two_ AJP connectors as follows: (executor omitted for simplicity) !-- AJP

Re: Default JVM argument for tomcat

2010-07-22 Thread Gopi Valleru
Hi Chris, Thanks for your quick reply. *This is entirely up to the JVM, and is not Tomcat-specific. If you don't specify any memory settings, Tomcat does not add any of its own.* In a new tomcat domain I haven't added any xms and xmx values. When i went to the console and i can see Free memory:

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Pid
On 22/07/2010 15:37, André Warnier wrote: Mikolaj Rydzewski wrote: On 07/22/2010 03:49 PM, Martin Gainty wrote: //i wasnt able to determine JMX ability to schedule a specific task for a specific time? I was referring to Andre's sentence: [using database] makes it easier to

Re: Fire off asynch task in Tomcat.

2010-07-22 Thread Eric P
Christopher Schultz wrote: Oh, and one more thing: any in-memory solution you come up with (that is, without writing to a database) is likely to suffer from loss of jobs in the event of a crash or poorly-coded exception-handling. This isn't necessarily a case for using a separate process just

Re: Problems starting Tomcat on windows 7 64bit.

2010-07-22 Thread sharkanana
Here is my server.xml. It is default. ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The

Tomcat AJP vs mod_jk's max_pool_size

2010-07-22 Thread Imran Khan
Hi, I am currently using apache tomcat 5.5 using mod_jk to connect with apache 2.2. I am curious to understand how the AJP 1.3 connector works. Basically I would like to know if maxThreads attribute has the same meaning with the AJP connector as it does with standard HTTP connectors. I would

Re: Spring security configuration in web.xml results in 403 error

2010-07-22 Thread Ashish Jain
any takers for this Q??? On Thu, Jul 15, 2010 at 1:38 PM, Ashish Jain ashja...@gmail.com wrote: Hi, I have an application which uses non interactive login and hence utilizes NONLogin Authenticator in tomcat. Here is a snippet from web.xml. context-param