Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?

2010-04-14 Thread Pid

On 14/04/2010 05:22, Godmar Back wrote:

Hi,

I have a simple question I was unable to find an answer to even after 2
hours of reading documentation, APIs, and (partly) Tomcat source code.


What about the Servlet Spec?  v2.3 - 2.5 are actually surprisingly 
readable for a spec, sadly the same isn't true of the forthcoming 3.0.


If you haven't read it, then do not pass Go...


In my web application, I'm using the 'reloadable='true'' attribute to
Context to reload the application automatically when a .class or jar files
changes. To avoid a quickly accumulating memory leak, I need to shut down a
service thread my application has started when the web application is
reloaded.

What API function can be used to notify my application that it is about to
be shut down, so that the thread in question can exit?

First, is there a standard API that would work also in other J2EE containers
besides Tomcat?


As Bob suggested, ServletContextListener is the way forwards.


Second, is there a custom API in Tomcat?


Actually yes, but as you might imagine, there are restrictions.

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Lifecycle 
Listeners



Third, if there is no API that a web application could use by itself, is it
possible to achieve my goal by writing a custom thread manager that is
loaded outside the specific web application? If so, are there examples of
how to add such a class to the configuration?


n/a I guess.


I'm really interested in a solution that would be contained inside the web
application (i.e., first or second above) and that would not require changes
to the server configuration, so that it would work in hosted environments
where I do not control the Tomcat configuration.  I'm using the latest 6.0
release (6.0.20).


6.0.26?


p


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6.0 clustering problem with replication mode.

2010-04-14 Thread Pardeep Ruhil

Hi,
We are running our application in  load balanced mode in Tomcat 6.0 with 
session replication.
When we are starting the servers in load balanced mode,  then in the console we 
are getting the following  error :

2010-04-14 11:47:51,078 (main) [ VfsLog.java:122:INFO ] Using 
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\vfs_cache as temporary files store.
2010-04-14 11:48:05,140 (GroupChannel-Heartbeat-1) [   
GroupChannel.java:665:ERROR] Unable to send heartbeat through Tribes 
interceptor stack. Will try to sleep again.
java.util.ConcurrentModificationException
at 
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at 
org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:152)
at 
org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)
class org.webslinger.commons.vfs.flat.FlatFileProvider
2010-04-14 11:48:09,937 (main) [  ChannelSocket.java:387:INFO ] JK: ajp13 
listening on /0.0.0.0:8009
2010-04-14 11:48:09,984 (main) [ JkMain.java:344:INFO ] Jk running 
ID=0 time=16/78  config=null
2010-04-14 11:48:10,125 (main) [ Http11Protocol.java:209:INFO ] Starting 
Coyote HTTP/1.1 on http-0.0.0.0-8080

When  we are testing 100 concurrent users using JMeter, it is giving following 
error after  5-10 mins.

0-04-14 09:46:10,703 (GroupChannel-Heartbeat-1) [  
BioSender.java:287:WARN ] Unable to read acknowledgement from [/192.168.1.3:1,93
a.net.SocketTimeoutException: Read timed out
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.read(SocketInputStream.java:129)
 at java.net.SocketInputStream.read(SocketInputStream.java:182)
 at 
org.apache.catalina.tribes.transport.bio.BioSender.waitForAck(BioSender.java:263)
 at 
org.apache.catalina.tribes.transport.bio.BioSender.pushMessage(BioSender.java:245)
 at 
org.apache.catalina.tribes.transport.bio.BioSender.sendMessage(BioSender.java:125)
 at 
org.apache.catalina.tribes.transport.bio.MultipointBioSender.sendMessage(MultipointBioSender.java:52)
 at 
org.apache.catalina.tribes.transport.bio.PooledMultiSender.sendMessage(PooledMultiSender.java:51)
 at 
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
 at 
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216)
 at 
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175)
 at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89)
 at 
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.ping(AbstractReplicatedMap.java:253)
 at 
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.heartbeat(AbstractReplicatedMap.java:793)
 at 
org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:153)
 at 
org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)
0-04-14 09:46:13,718 (GroupChannel-Heartbeat-1) 
[AbstractReplicatedMap.java:795:ERROR] Unable to send 
AbstractReplicatedMap.ping message
.apache.catalina.tribes.ChannelException: java.net.SocketTimeoutException: Read 
timed out; Faulty members:tcp://{-64, -88, 1, 3}:4001;
 at 
org.apache.catalina.tribes.transport.bio.MultipointBioSender.sendMessage(MultipointBioSender.java:54)
 at 
org.apache.catalina.tribes.transport.bio.PooledMultiSender.sendMessage(PooledMultiSender.java:51)
 at 
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
 at 
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)
 at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
 at 

need help in setting up virtual url for tomcat 5

2010-04-14 Thread Vivek Kanchan
 HI,
 
  I have setup tomcat 5 for a customer, now i need to use virtual url and
 por=
  t
  t other than 8080 , please let me know how to do it , what files to
 change =
  for these.


Thanks,
Vivyek kanchan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: need help in setting up virtual url for tomcat 5 URGENT

2010-04-14 Thread Vivek Kanchan
This is urgent please , i am new to tomcat. :(

Thanks,
Vivyek kanchan

-Original Message-
From: Vivek Kanchan 
Sent: Wednesday, April 14, 2010 4:32 PM
To: users@tomcat.apache.org
Subject: need help in setting up virtual url for tomcat 5


 HI,
 
  I have setup tomcat 5 for a customer, now i need to use virtual url and
 por=
  t
  t other than 8080 , please let me know how to do it , what files to
 change =
  for these.


Thanks,
Vivyek kanchan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: need help in setting up virtual url for tomcat 5 URGENT

2010-04-14 Thread Pid
On 14/04/2010 12:10, Vivek Kanchan wrote:
 This is urgent please , i am new to tomcat. :(

People volunteer their support here for free.  If you need urgent
support you may have to look for a professional.

In the meantime, start reading here:

 http://tomcat.apache.org/tomcat-6.0-doc/index.html

and then:

 http://tomcat.apache.org/tomcat-6.0-doc/config/index.html


p


 Thanks,
 Vivyek kanchan
 
 -Original Message-
 From: Vivek Kanchan 
 Sent: Wednesday, April 14, 2010 4:32 PM
 To: users@tomcat.apache.org
 Subject: need help in setting up virtual url for tomcat 5
 
 
  HI,

 I have setup tomcat 5 for a customer, now i need to use virtual url and
 por=
 t
 t other than 8080 , please let me know how to do it , what files to
 change =
 for these.
 
 
 Thanks,
 Vivyek kanchan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?

2010-04-14 Thread Godmar Back
On Wed, Apr 14, 2010 at 3:17 AM, Pid p...@pidster.com wrote:



  In my web application, I'm using the 'reloadable='true'' attribute to
 Context to reload the application automatically when a .class or jar files
 changes. To avoid a quickly accumulating memory leak, I need to shut down
 a
 service thread my application has started when the web application is
 reloaded.

 What API function can be used to notify my application that it is about to
 be shut down, so that the thread in question can exit?

 First, is there a standard API that would work also in other J2EE
 containers
 besides Tomcat?


 As Bob suggested, ServletContextListener is the way forwards.


Thank you for your replies. I did see ServletContextListener (as well as
LifeCycleListener, etc. etc.). What I couldn't find out is how to obtain an
instance of the object that would support an 'addServletContextListener'
method.

For instance, if you look at
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.htmlit
says:

To recieve (sic) notification events, the implementation class must be
configured in the deployment descriptor for the web application.

This doesn't sound like an API to me, it sounds like a configuration option,
so it doesn't answer my question. Is it true that there is, basically, no
API a web application can call at runtime to add such listeners?

The most likely candidate to which to add a ServletContextListener would be
a ServletContext, but it doesn't appear to support an 'addListener' method,
unless I'm overlooking it:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html



  Second, is there a custom API in Tomcat?


 Actually yes, but as you might imagine, there are restrictions.

 http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#LifecycleListeners


I saw that too, but again, it doesn't answer my problem. On the page you
quote it says:

The class name you specify must implement the
org.apache.catalina.LifecycleListener interface, and the class must be
packaged in a jar and placed in the $CATALINA_HOME/lib directory. 

I am interested in a solution that does not require access to the
$CATALINA_HOME/lib directory. This directory is accessible only to the
Tomcat administrator, and I would like my web app - if possible - to be
deployed even in scenarios where the Tomcat configuration cannot be changed.

And lastly, this solution would not work because the LifecycleListener
itself would not be reloaded, since (to my knowledge) jar files in
$CATALINA_HOME/lib aren't reloaded.


 I'm really interested in a solution that would be contained inside the web
 application (i.e., first or second above) and that would not require
 changes
 to the server configuration, so that it would work in hosted environments
 where I do not control the Tomcat configuration.  I'm using the latest 6.0
 release (6.0.20).


 6.0.26?


6.0.24, actually.

Thank you for your insights.

 - Godmar


Re: Tomcat 6.0 clustering problem with replication mode.

2010-04-14 Thread Filip Hanik - Dev Lists

The first error
java.util.ConcurrentModificationException
happens cause the membership changed in between. The error logs, but the 
system is not interrupted.


The second error
java.net.SocketTimeoutException: Read timed out

This means the node failed to respond. This means you got a problem. You 
should post

- your exact tomcat version
- your configuration
- your jvm version

best
Filip


On 04/14/2010 05:01 AM, Pardeep Ruhil wrote:

Hi,
We are running our application in  load balanced mode in Tomcat 6.0 with 
session replication.
When we are starting the servers in load balanced mode,  then in the console we 
are getting the following  error :

2010-04-14 11:47:51,078 (main) [ VfsLog.java:122:INFO ] Using 
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\vfs_cache as temporary files store.
2010-04-14 11:48:05,140 (GroupChannel-Heartbeat-1) [   
GroupChannel.java:665:ERROR] Unable to send heartbeat through Tribes 
interceptor stack. Will try to sleep again.
java.util.ConcurrentModificationException
 at 
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
 at java.util.AbstractList$Itr.next(AbstractList.java:343)
 at 
org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:152)
 at 
org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)
class org.webslinger.commons.vfs.flat.FlatFileProvider
2010-04-14 11:48:09,937 (main) [  ChannelSocket.java:387:INFO ] JK: ajp13 
listening on /0.0.0.0:8009
2010-04-14 11:48:09,984 (main) [ JkMain.java:344:INFO ] Jk running 
ID=0 time=16/78  config=null
2010-04-14 11:48:10,125 (main) [ Http11Protocol.java:209:INFO ] Starting 
Coyote HTTP/1.1 on http-0.0.0.0-8080

When  we are testing 100 concurrent users using JMeter, it is giving following 
error after  5-10 mins.

0-04-14 09:46:10,703 (GroupChannel-Heartbeat-1) [  
BioSender.java:287:WARN ] Unable to read acknowledgement from [/192.168.1.3:1,93
a.net.SocketTimeoutException: Read timed out
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.read(SocketInputStream.java:129)
  at java.net.SocketInputStream.read(SocketInputStream.java:182)
  at 
org.apache.catalina.tribes.transport.bio.BioSender.waitForAck(BioSender.java:263)
  at 
org.apache.catalina.tribes.transport.bio.BioSender.pushMessage(BioSender.java:245)
  at 
org.apache.catalina.tribes.transport.bio.BioSender.sendMessage(BioSender.java:125)
  at 
org.apache.catalina.tribes.transport.bio.MultipointBioSender.sendMessage(MultipointBioSender.java:52)
  at 
org.apache.catalina.tribes.transport.bio.PooledMultiSender.sendMessage(PooledMultiSender.java:51)
  at 
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
  at 
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
  at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
  at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.sendMessage(TcpFailureDetector.java:87)
  at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
  at 
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor.sendMessage(MessageDispatchInterceptor.java:73)
  at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.sendMessage(ChannelInterceptorBase.java:75)
  at 
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:216)
  at 
org.apache.catalina.tribes.group.GroupChannel.send(GroupChannel.java:175)
  at org.apache.catalina.tribes.group.RpcChannel.send(RpcChannel.java:89)
  at 
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.ping(AbstractReplicatedMap.java:253)
  at 
org.apache.catalina.tribes.tipis.AbstractReplicatedMap.heartbeat(AbstractReplicatedMap.java:793)
  at 
org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:153)
  at 
org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:661)
0-04-14 09:46:13,718 (GroupChannel-Heartbeat-1) 
[AbstractReplicatedMap.java:795:ERROR] Unable to send 
AbstractReplicatedMap.ping message
.apache.catalina.tribes.ChannelException: java.net.SocketTimeoutException: Read 
timed out; Faulty members:tcp://{-64, -88, 1, 3}:4001;
  at 
org.apache.catalina.tribes.transport.bio.MultipointBioSender.sendMessage(MultipointBioSender.java:54)
  at 
org.apache.catalina.tribes.transport.bio.PooledMultiSender.sendMessage(PooledMultiSender.java:51)
  at 
org.apache.catalina.tribes.transport.ReplicationTransmitter.sendMessage(ReplicationTransmitter.java:80)
  at 
org.apache.catalina.tribes.group.ChannelCoordinator.sendMessage(ChannelCoordinator.java:78)
  at 

Where do CATALINA_OPTS get defined?

2010-04-14 Thread laredotornado

Hi,

I'm using Tomcat 6.0.26 on a Mac 10.6.3.  Where is the best place to store
the CATALINA_OPTS environment variable?  I'm running Tomcat as a daemon on
my system.

Thanks, - Dave
-- 
View this message in context: 
http://old.nabble.com/Where-do-CATALINA_OPTS-get-defined--tp28243278p28243278.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?

2010-04-14 Thread Godmar Back
On Wed, Apr 14, 2010 at 10:12 AM, Pid p...@pidster.com wrote:

  For instance, if you look at
 
 http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html
  it says:
 
  To recieve (sic) notification events, the implementation class must be
  configured in the deployment descriptor for the web application.

 Web applications are largely configured by the web.xml file in
 app/WEB-INF.  Servlets, listeners etc are all configured in it.


Thank you for your confirmation.  I thought I was going nuts, after having
waded through various *Facade classes, hoping to find an API method I could
call at runtime.

I have added a ServletContextListener, but it is very much a solution I
strongly dislike. The reason is that my application is layered on top of
another application (ZK), and I don't really want to touch web.xml.
'web.xml' describes how ZK is configured to run inside Tomcat or another
J2EE server. My applications runs on top of ZK, and having to go and made
changes to the underlying deployment descriptor violates basic principles of
layering.

It also creates a maintenance problem (unless an application can have
multiple .xml files that are combined to form a deployment descriptor).
Whenever ZK is updated, a new version of web.xml will be installed, and I
would then have to merge my listener declaration into the new file.

Just out of curiosity, what is the rationale for the (apparently deliberate)
lack of an runtime API?

 - Godmar


Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?

2010-04-14 Thread David kerber

On 4/14/2010 10:20 AM, Godmar Back wrote:

On Wed, Apr 14, 2010 at 10:12 AM, Pidp...@pidster.com  wrote:


For instance, if you look at


http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

it says:

To recieve (sic) notification events, the implementation class must be
configured in the deployment descriptor for the web application.


Web applications are largely configured by the web.xml file in
app/WEB-INF.  Servlets, listeners etc are all configured in it.



Thank you for your confirmation.  I thought I was going nuts, after having
waded through various *Facade classes, hoping to find an API method I could
call at runtime.

I have added a ServletContextListener, but it is very much a solution I
strongly dislike. The reason is that my application is layered on top of
another application (ZK), and I don't really want to touch web.xml.
'web.xml' describes how ZK is configured to run inside Tomcat or another
J2EE server. My applications runs on top of ZK, and having to go and made
changes to the underlying deployment descriptor violates basic principles of
layering.


You don't have to modify the ZK web.xml, AFAIK.  Your app can have its 
own web.xml, and the contents will both be applied.




It also creates a maintenance problem (unless an application can have
multiple .xml files that are combined to form a deployment descriptor).
Whenever ZK is updated, a new version of web.xml will be installed, and I
would then have to merge mylistener  declaration into the new file.

Just out of curiosity, what is the rationale for the (apparently deliberate)
lack of an runtime API?


Someone else will have to confirm, but I believe it's because a 
ServletContextListener is just about the first thing loaded by your app. 
 Because of that, runtime APIs are too late to help you; context 
listeners can signal (among other things) when a context is first 
initialized, and your code hasn't started up at that point.



D

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat on AIX 5.3

2010-04-14 Thread János Löbb

Hi,

I installed Tomcat 6.0.26 in an IBM P6 LPAR .  The java version is  
1.5.0 that is equivalent to Java 5.  The LPAR has 12G memory and  
there are two databases on it, a Sybase and a MySql.  Sybase takes 3 G  
and mysql takes 3 G, so there is still plenty for Tomcat.


The idea to put Tomcat here, was, that the webapp is connecting to the  
Sybase database on this LPAR, so getting the data locally should be  
faster than getting it via the network from another machine running  
Tomcat.


Interestingly it is not the case.  When the same webapp deployed on  
the LPAR and on the other machine - an OSX Server  10.5.8 -, the  
screens on a client machine are coming much faster from the OSX server  
compared to the AIX LPAR.


Is there anything special configuring Tomcat on AIX than on OSX ?

On both machines the memory settings are the same for tomcat :
CATALINA_OPTS=-server -Xms512M -Xmx1024M

and on AIX the option to use the IPv4 Stack is set in JAVA_OPTS.

None of the .xml files were modified in the conf directory.

Thanks ahead,

János
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Q: how to obtain notification when a WebApp is unloaded/reloaded?

2010-04-14 Thread Pid
On 14/04/2010 15:31, David kerber wrote:
 On 4/14/2010 10:20 AM, Godmar Back wrote:
 On Wed, Apr 14, 2010 at 10:12 AM, Pidp...@pidster.com  wrote:

 For instance, if you look at

 http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

 it says:

 To recieve (sic) notification events, the implementation class must be
 configured in the deployment descriptor for the web application.

 Web applications are largely configured by the web.xml file in
 app/WEB-INF.  Servlets, listeners etc are all configured in it.


 Thank you for your confirmation.  I thought I was going nuts, after
 having
 waded through various *Facade classes, hoping to find an API method I
 could
 call at runtime.

 I have added a ServletContextListener, but it is very much a solution I
 strongly dislike. The reason is that my application is layered on top of
 another application (ZK), and I don't really want to touch web.xml.
 'web.xml' describes how ZK is configured to run inside Tomcat or another
 J2EE server. My applications runs on top of ZK, and having to go and made
 changes to the underlying deployment descriptor violates basic
 principles of
 layering.
 
 You don't have to modify the ZK web.xml, AFAIK.  Your app can have its
 own web.xml, and the contents will both be applied.

Hmm. What does your app/code do in relation to the other app?

 It also creates a maintenance problem (unless an application can have
 multiple .xml files that are combined to form a deployment descriptor).
 Whenever ZK is updated, a new version of web.xml will be installed, and I
 would then have to merge mylistener  declaration into the new file.

 Just out of curiosity, what is the rationale for the (apparently
 deliberate)
 lack of an runtime API?

Ask Sun.

Servlet 3.0 adds multiple deployent descriptor 'fragments' and
programmatic listener, servlet and filter loading.  Tomcat 7 will
support this spec and is nearing a first release.

 Someone else will have to confirm, but I believe it's because a
 ServletContextListener is just about the first thing loaded by your app.

SCLs are loaded first, yes.  I'm not privy to the reasoning for the way
the original spec works.


p

  Because of that, runtime APIs are too late to help you; context
 listeners can signal (among other things) when a context is first
 initialized, and your code hasn't started up at that point.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: Where do CATALINA_OPTS get defined?

2010-04-14 Thread Pid
On 14/04/2010 15:20, laredotornado wrote:
 
 Hi,
 
 I'm using Tomcat 6.0.26 on a Mac 10.6.3.  Where is the best place to store
 the CATALINA_OPTS environment variable?  I'm running Tomcat as a daemon on
 my system.
 
 Thanks, - Dave

Do you mean where is the best place to set it?

Which method are you using to run it as a daemon?


p



signature.asc
Description: OpenPGP digital signature


Re: Where do CATALINA_OPTS get defined?

2010-04-14 Thread laredotornado

Yes, what is the best place to set it.  

I have created a script under /Library/LaunchDaemons/.

Thanks, - Dave



Pid * wrote:
 
 On 14/04/2010 15:20, laredotornado wrote:
 
 Hi,
 
 I'm using Tomcat 6.0.26 on a Mac 10.6.3.  Where is the best place to
 store
 the CATALINA_OPTS environment variable?  I'm running Tomcat as a daemon
 on
 my system.
 
 Thanks, - Dave
 
 Do you mean where is the best place to set it?
 
 Which method are you using to run it as a daemon?
 
 
 p
 
 
  
 

-- 
View this message in context: 
http://old.nabble.com/Where-do-CATALINA_OPTS-get-defined--tp28243278p28243739.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Where do CATALINA_OPTS get defined?

2010-04-14 Thread Pid
On 14/04/2010 15:53, laredotornado wrote:
 
 Yes, what is the best place to set it.  
 
 I have created a script under /Library/LaunchDaemons/.

If it's calling a shell script, how about an appropriate place in the
shell script?  It doesn't need to be present in the system environment.


p

 Thanks, - Dave
 
 
 
 Pid * wrote:

 On 14/04/2010 15:20, laredotornado wrote:

 Hi,

 I'm using Tomcat 6.0.26 on a Mac 10.6.3.  Where is the best place to
 store
 the CATALINA_OPTS environment variable?  I'm running Tomcat as a daemon
 on
 my system.

 Thanks, - Dave

 Do you mean where is the best place to set it?

 Which method are you using to run it as a daemon?


 p


  

 




signature.asc
Description: OpenPGP digital signature


Re: Tomcat on AIX 5.3

2010-04-14 Thread Filip Hanik - Dev Lists
you'd have to figure out what takes the time. Could be anything, 
including a DNS timeout


Filip

On 04/14/2010 08:34 AM, János Löbb wrote:

Hi,

I installed Tomcat 6.0.26 in an IBM P6 LPAR .  The java version is 
1.5.0 that is equivalent to Java 5.  The LPAR has 12G memory and 
there are two databases on it, a Sybase and a MySql.  Sybase takes 3 G 
and mysql takes 3 G, so there is still plenty for Tomcat.


The idea to put Tomcat here, was, that the webapp is connecting to the 
Sybase database on this LPAR, so getting the data locally should be 
faster than getting it via the network from another machine running 
Tomcat.


Interestingly it is not the case.  When the same webapp deployed on 
the LPAR and on the other machine - an OSX Server  10.5.8 -, the 
screens on a client machine are coming much faster from the OSX server 
compared to the AIX LPAR.


Is there anything special configuring Tomcat on AIX than on OSX ?

On both machines the memory settings are the same for tomcat :
CATALINA_OPTS=-server -Xms512M -Xmx1024M

and on AIX the option to use the IPv4 Stack is set in JAVA_OPTS.

None of the .xml files were modified in the conf directory.

Thanks ahead,

János
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat on AIX 5.3

2010-04-14 Thread János Löbb

Filip,

What tool  - java based or aix based -, can I use to see where does  
the time go ?  /I am not a Java programmer/
I do not think it is the webapp, or tomcat, because the same  
configuration is fast on OSX server.

DNS is working fine.

Thanks ahead,

János

On Apr 14, 2010, at 11:28 AM, Filip Hanik - Dev Lists wrote:

you'd have to figure out what takes the time. Could be anything,  
including a DNS timeout


Filip

On 04/14/2010 08:34 AM, János Löbb wrote:

Hi,

I installed Tomcat 6.0.26 in an IBM P6 LPAR .  The java version is  
1.5.0 that is equivalent to Java 5.  The LPAR has 12G memory and  
there are two databases on it, a Sybase and a MySql.  Sybase takes  
3 G and mysql takes 3 G, so there is still plenty for Tomcat.


The idea to put Tomcat here, was, that the webapp is connecting to  
the Sybase database on this LPAR, so getting the data locally  
should be faster than getting it via the network from another  
machine running Tomcat.


Interestingly it is not the case.  When the same webapp deployed on  
the LPAR and on the other machine - an OSX Server  10.5.8 -, the  
screens on a client machine are coming much faster from the OSX  
server compared to the AIX LPAR.


Is there anything special configuring Tomcat on AIX than on OSX ?

On both machines the memory settings are the same for tomcat :
CATALINA_OPTS=-server -Xms512M -Xmx1024M

and on AIX the option to use the IPv4 Stack is set in JAVA_OPTS.

None of the .xml files were modified in the conf directory.

Thanks ahead,

János
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat on AIX 5.3

2010-04-14 Thread Harry Metske
Janos,

there are no clues that the delays are caused by tomcat, so maybe you should
look in general at other causes of delays.
There are a multiple components in the chain that can cause delays,
networking, IO, CPU.
You did not mention how much CPU you have at your disposal on your P6
machine, maybe you can have a look with IBM's nmon tool, contact your AIX
support colleagues.
And if your application has logging (maybe you can increase loglevels), that
is the first spot to look at, that should give you a clue where the delays
are.

regards,
Harry


2010/4/14 János Löbb janos.l...@yale.edu

 Filip,
 ,
 What tool  - java based or aix based -, can I use to see where does the
 time go ?  /I am not a Java programmer/
 I do not think it is the webapp, or tomcat, because the same configuration
 is fast on OSX server.
 DNS is working fine.

 Thanks ahead,

 János

 On Apr 14, 2010, at 11:28 AM, Filip Hanik - Dev Lists wrote:

  you'd have to figure out what takes the time. Could be anything, including
 a DNS timeout

 Filip

 On 04/14/2010 08:34 AM, János Löbb wrote:

 Hi,

 I installed Tomcat 6.0.26 in an IBM P6 LPAR .  The java version is
 1.5.0 that is equivalent to Java 5.  The LPAR has 12G memory and there are
 two databases on it, a Sybase and a MySql.  Sybase takes 3 G and mysql takes
 3 G, so there is still plenty for Tomcat.

 The idea to put Tomcat here, was, that the webapp is connecting to the
 Sybase database on this LPAR, so getting the data locally should be faster
 than getting it via the network from another machine running Tomcat.

 Interestingly it is not the case.  When the same webapp deployed on the
 LPAR and on the other machine - an OSX Server  10.5.8 -, the screens on a
 client machine are coming much faster from the OSX server compared to the
 AIX LPAR.

 Is there anything special configuring Tomcat on AIX than on OSX ?

 On both machines the memory settings are the same for tomcat :
 CATALINA_OPTS=-server -Xms512M -Xmx1024M

 and on AIX the option to use the IPv4 Stack is set in JAVA_OPTS.

 None of the .xml files were modified in the conf directory.

 Thanks ahead,

 János
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org