RE: Connection is closed when CometEvent.close is called during an event

2010-06-29 Thread Reich, Matthias
-Original Message- From: Konstantin Kolinko Sent: Friday, June 11, 2010 4:46 AM To: Tomcat Users List Subject: Re: Connection is closed when CometEvent.close is called during an event Regarding Comet + Keep-Alive, if it does not work, it is worth filing an enhancement

RE: Connection is closed when CometEvent.close is called during an event

2010-06-15 Thread Reich, Matthias
Konstantin Kolinko wrote: 2010/6/11 Reich, Matthias matthias.re...@siemens-enterprise.com: The concept of long poll is e.g. described in http://www.javaworld.com/javaworld/jw-03-2008/jw-03-asynchhttp .html?page=6 The sequence of events in my situation is as follows: - a poll request

RE: Connection is closed when CometEvent.close is called during an event

2010-06-10 Thread Reich, Matthias
On 10/06/2010 9:49 PM, Konstantin Kolinko wrote: 2010/6/8 Reich, Matthias: I modified the code (in 6.0.20 and 6.0.26) so that the error flag is not set. With that change Tomcat kept the connection open: ...    if (response.isClosed() || !request.isComet()) {        if (status

Connection is closed when CometEvent.close is called during an event

2010-06-08 Thread Reich, Matthias
Hello, I am using a CometProcessor servlet in a long-poll scenario, and recently had a closer look at the life span of connections that are used for poll requests. I noticed that connections are closed by Tomcat whenever a poll request was answered (and closed) directly during processing of the

RE: Can we slow down the speed of servlet response ?

2008-04-27 Thread Reich, Matthias
Hi, if your simulation really requires waiting on server side, you could also have a look at Comet (http://tomcat.apache.org/tomcat-6.0-doc/aio.html). A Comet solution would not block a thread per request while waiting for the timeout condition. By the way, when using the Http11NioProtocol on a

RE: Share session cookie across subdomains

2008-04-24 Thread Reich, Matthias
Hi, I haven't thought about the idea in detail, but would it be possible to wrap the response? The wrapper would have to ensure that cookie replacement is applied before any data is written to the output stream or writer. A remaining issue would be that encoded (redirect-) URLs in the response

RE: Share session cookie across subdomains

2008-04-21 Thread Reich, Matthias
With your implementation, the valve will have the effect that a session is created upon first access to a server, not only when required by the application. (see also discussion on http://www.nabble.com/Cookie-less-session-tracking---whats-are-the-downs ides-tp16738472p16738472.html ) Thus, the

RE: different context on different ports, but one tomcat

2008-02-20 Thread Reich, Matthias
If the webapps shall be completely isolated and shall not share connectors it could be an option to define three separate services in server.xml. Then the transport guarantee for webapp2 is given by the server configuration. You should be aware that you must assign separate thread pools to each

RE: Logging in separate Thread

2008-02-14 Thread Reich, Matthias
I think it is better to start one background worker thread and pass the log requests to that thread with the help of a queue. You can also consider to let the worker cache the DNS lookup results. (Usually you will see requests from the same clients lots of times.) - Matthias -Original

RE: NIO connector

2008-02-01 Thread Reich, Matthias
Hi, I am doing it this way: Connector c = new Connector(protocol); c.setPort(port); if (secure) { c.setScheme(https); c.setSecure(true); } // now set further attributes as required - Matthias -Original Message- From: brien colwell [mailto:[EMAIL PROTECTED]

RE: Subclass of Servlet: Inherited method is not visible

2008-01-23 Thread Reich, Matthias
You should ask the implementors of ParameterMethodResolvingServlet (according to Google this seems to a project within dfki), or look at it's implementation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 23, 2008 12:24 PM To:

RE: Comet Development

2008-01-21 Thread Reich, Matthias
I think you need to explain a little more on what you want to achieve by using comet with JSPs. The JSP processing model is bound to the traditional Servlet processing model, and a compiled JSP is a traditional Servlet - not a Comet Servlet. I am not sure if including response snippets generated

RE: Tomcat 6 embedded use - problems with jsp - No Java compiler available

2008-01-18 Thread Reich, Matthias
Hi Oliver, I would guess that a library is missing in your classpath. I am also using Tomcat in embedded mode, and I had seen the same kind of error because I missed to add el-api.jar to the classpath. These are the tomcat libraries I have included and which are sufficient (without any further

RE: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-12-06 Thread Reich, Matthias
I think the problem arises because a.public static final boolean IS_SECURITY_ENABLED = (System.getSecurityManager() != null); is more a macro definition than a constant definition. But as Java does not support macros, the compiler cannot replace occurrences of 'IS_SECURITY_ENABLED'

RE: log4j error

2007-11-18 Thread Reich, Matthias
Hi, another approach is the use of a RepositorySelector. - you rely on the container to provide the log4j classes and to install a suitable RepositorySelector (should happen as early as possible, e.g. in a ServerLifeCycleListener) - each webapp can still provide it's own logging configuration -

CLIENT-CERT authentication with APR connector only for protected resources?

2007-10-31 Thread Reich, Matthias
Hi, is there a way to configure the APR connector in a way that it requests a client certificate only if the client accesses a resource that is protected by a security constraint? This works with a Java connector if I specify the option clientAuth=false. The client certificate is not requested

RE: Comet example at Tomcat 6

2007-07-26 Thread Reich, Matthias
Perhaps you should add this to the example: protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, you must be using the APR or NIO connector to get

RE: Shared form authentication when using SingleSignOn

2007-07-19 Thread Reich, Matthias
Hi, I had to solve a similar problem a while ago. The solution I found was a small Servlet that I deployed in the other webapps. This Servlet used a RequestDispatcher to dispatch the login/... requests to the login servlet of the main webapp. However, as far as I remember, the redirect back to

Tomcat 6.0.13 - NPE in AprEndpoint run method

2007-07-18 Thread Reich, Matthias
Hi, When sending requests to Tomcat during the startup phase, I got a NPE in the AprEndpoint run method, line 1495: getPoller().add(socket); This can happen because in the start method, the pollers are initialized after the acceptor threads already have been started so that the getPoller()

RE: axis - tomcat loader constraint violation

2007-07-13 Thread Reich, Matthias
Hi, it looks as if class javax/xml/rpc/Service was as well found in common/lib as in the WEB-INF/lib folder of your webapp. If the webapp classloader looks for this class, it will first look in webapps private resources. However, the class had been loaded and resolved before via the common

RE: read data/infinite loop problem with comet

2007-06-26 Thread Reich, Matthias
Hi, my feeling is that the CoyoteAdapter does a check that should not be done in this place (just because the implicit assumption is wrong that nothing will happen concurrently during the few nano seconds between the Servlet's available() check and the check of the adapter.) It looks as if the

RE: Comet example Tomcat 6 not working.

2007-06-21 Thread Reich, Matthias
There have been a lot of things fixed and enhanced in the Comet area since version 6.0.10. You should better try with version 6.0.13. Regards, Matthias -Original Message- From: Ritesh Kumar [mailto:[EMAIL PROTECTED] Sent: Thursday, June 21, 2007 11:43 AM To: users@tomcat.apache.org

RE: Comet: Unsufficiently synchronized recycling decisions

2007-06-14 Thread Reich, Matthias
, Matthias -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 8:09 PM To: Tomcat Users List Subject: Re: Comet: Unsufficiently synchronized recycling decisions Reich, Matthias wrote: Hello, I did not get any response on my

RE: Comet: Unsufficiently synchronized recycling decisions

2007-06-13 Thread Reich, Matthias
to receive any reaction? Regards, Matthias -Original Message- From: Reich, Matthias Sent: Wednesday, May 30, 2007 2:04 PM To: 'Tomcat Users List' Subject: Comet: Unsufficiently synchronized recycling decisions Hi, as mentioned in my contribution to topic 'Web application

RE: Web application receives request parameters sent to another application on Tomcat 6

2007-05-30 Thread Reich, Matthias
with topic 'Comet: Unsufficiently synchronized recycling decisions'. Regards, Matthias -Original Message- From: Reich, Matthias Sent: Tuesday, May 29, 2007 10:54 AM To: 'Tomcat Users List' Subject: RE: Web application receives request parameters sent to another application on Tomcat 6

Comet: Unsufficiently synchronized recycling decisions

2007-05-30 Thread Reich, Matthias
Hi, as mentioned in my contribution to topic 'Web application receives request parameters sent to another application on Tomcat 6', I sometimes get non-recycled Request objects in a BEGIN event. A non-recycled request object appeared in a BEGIN event if the previous request processed by the

RE: Web application receives request parameters sent to another application on Tomcat 6

2007-05-29 Thread Reich, Matthias
Hi, I am experiencing a behavior that may be related to the mentioned problem. My Servlet uses the Comet interfaces of Tomcat 6. For debugging purposes, when my Servlet receives a BEGIN event, it stores a request counter in an atttribute of the HttpServletRequest object. (This is done to see in

RE: comet read event

2007-05-23 Thread Reich, Matthias
Hi, I think you have to add cometEvent.getHttpServletResponse().getWriter().flush(); also in the READ event case. Matthias -Original Message- From: Peter Warren [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 10:11 PM To: users@tomcat.apache.org Subject: comet read event

RE: WebApps not isolated

2007-05-23 Thread Reich, Matthias
ResourceBundle.getBundle uses the ClassLoader that was used to load the class that's calling this method when it looks up the resource. Have you checked that the class which contains the call to ResourceBundle.getBundle is loaded by the expected WebappClassLoaders? Matthias -Original

RE: Missing ETag in 304 Header

2007-05-18 Thread Reich, Matthias
Hi, the spec says that a 304 response MUST include header - ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request Does Tomcat send an ETag header in a 200 response when it serves static content? If not (and I assume that it doesn't), I

RE: url-pattern troubles...

2007-05-11 Thread Reich, Matthias
The annoying thing about it is, that you cannot use a pattern that says ignore /protected/include. Thus, you must specify patterns for all subdirectories that shall be protected separately. Matthias -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: Friday,

RE: NioEndpoint closes connection upon timeout

2007-05-08 Thread Reich, Matthias
-Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 11:00 AM However, the Javadoc of enum EventSubType says: TIMEOUT - the connection timed out (sub type of ERROR); note that this ERROR type is not fatal, and the

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-03 Thread Reich, Matthias
-Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Wouldn't every application which isn't as dumb as the chat example (which does not care about the content it reads but simply passes it back to it's clients) need to implement it's own mechanism to check

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-03 Thread Reich, Matthias
-Original Message- From: Rémy Maucherat [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 02, 2007 11:13 PM On 5/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: It's a race condition and the problem occurs quite infrequently (especially with small request bodies). The larger the

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Reich, Matthias
-Original Message- From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 7:24 PM To: Tomcat Users List Subject: Re: Comet: problem with request.getParameter() in Comet POST requests GET parameters, ie parameters in the URL will work. However,

RE: Comet: problem with request.getParameter() in Comet POST requests

2007-05-02 Thread Reich, Matthias
Wouldn't every application which isn't as dumb as the chat example (which does not care about the content it reads but simply passes it back to it's clients) need to implement it's own mechanism to check whether there is enough input available to start parsing a chunk of data?

RE: WAR File loaded into embedded Tomcat not reachable

2007-04-30 Thread Reich, Matthias
Hi, you did not tell us about how you load the war file. If the extension is correct (mynewwar.ZIP) I think it won't be loaded automatically. If it is named mynewwar.war and e.g. available in directory C:\mywebapps this should work: Context ctxt = embedded.createContext(/mynewwar ,

RE: Memory Leak with Comet

2007-04-27 Thread Reich, Matthias
Hello again, I would like to give you another chance to see the situation where the processing objects are not recycled. After all my observations, I had the feeling that the reason for the non-recycled processing objects must be problems with concurrent access to queues or maps that hold these

RE: Memory Leak with Comet

2007-04-26 Thread Reich, Matthias
Excuse me that I left you alone during the discussion yesterday! Let me clarify: The scenario is that the client polls for events. Thus, it sends a subsequent poll request once it got an answer from the server. (And how should I bring Tomcat to create hundreds of request objects with four

RE: comet events and connections

2007-04-26 Thread Reich, Matthias
Well, anyway the lifecycle should be well-defined, and I doubt that it currently is well-defined. If I try to find a better name for class CometEvent which reflects the lifecycle of it's instances according to the current implementation, the name CometRequest fits much better than the name

RE: Memory Leak with Comet

2007-04-26 Thread Reich, Matthias
Subject: Re: Memory Leak with Comet On 4/26/07, Reich, Matthias [EMAIL PROTECTED] wrote: The clear semantics of this approach would be: Processing is the same as for synchronous requests , except that the RequestProcessor thread is released from processing early, and another thread

RE: Tomcat - CometProcessor question

2007-04-25 Thread Reich, Matthias
Hi, I am working on a similar scenario and currently elaborate on the Comet interfaces. 1. With the BEGIN event you get a fully parsed request object, i.e. you don't need to wait for READ events to start processing the request. 2. You can keep a reference to the request and response object so

RE: Memory Leak with Comet

2007-04-25 Thread Reich, Matthias
I tried with Tomcat6 compiled from trunk revision 532271 and two browsers sending the requests. Unfortunately it is not that easy for me to put the dump on a public web server. Instead, I had a look at the dump myself. First I ran Tomcat with a single connector with attribute maxThreads=20, and

RE: Memory Leak with Comet

2007-04-25 Thread Reich, Matthias
Maucherat [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 25, 2007 3:11 PM To: Tomcat Users List Subject: Re: Memory Leak with Comet On 4/25/07, Reich, Matthias [EMAIL PROTECTED] wrote: First I ran Tomcat with a single connector with attribute maxThreads=20, and started it with -Xmx10m

Memory Leak with Comet

2007-04-24 Thread Reich, Matthias
Hello, I am sorry that I did not address the memory leak issue to the users list first, before sending this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=42217 I am aware of the fact that memory allocation occurs in Java progams, and that Tomcat will exploit some resource pools

RE: Memory Leak with Comet

2007-04-24 Thread Reich, Matthias
: Re: Memory Leak with Comet On 4/24/07, Reich, Matthias [EMAIL PROTECTED] wrote: If memory allocation of Tomcat continues until I see messages like org.apache.coyote.http11.Http11NioProcessor: Error processing request java.lang.OutOfMemoryError: Java heap space There are leaks that have been