> -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 enhancemen
Konstantin Kolinko wrote:
> 2010/6/11 Reich, Matthias :
> >
> > 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:
>
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() ||
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
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 L
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
mus
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 v
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
c
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 Messag
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]
If your server knows the sessionID, why not simply let the server send an http
request with the appropriate JSESSIONID cookie?
I am not sure, but I think Tomcat will assign the cached session to this
request even if it comes from a different remote address.
- Matthias
-Original Message
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: users@tomcat.ap
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
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 jas
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' wi
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
- th
You should also have a look at
/org/apache/catalina/authenticator/FormAuthenticator.java
In this class you can find the details about how requests are saved and
restored.
When I once digged into the details I wondered whether it is correct to
restore all the headers of the original request.
E.
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
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
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 th
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() ca
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
clas
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 Co
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.o
,
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
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 menti
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 same
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
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 t
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 Mess
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 eve
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
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
> -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 fata
The NioEndpoint seems to close a connection during the timeout handling.
My client reacts to a connection failure with a resubmit of the last
request,
and I see this in the log:
07.05.2007 22:08:14 comettest.CometServlet event
WARNUNG: BEGIN(16) POST /comettest/comet/request?action=poll&count=1
07
> -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 l
> -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
> > 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?
> -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.
> >
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" ,
"C:\my
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 o
Tomcat Users List
> 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 re
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 Come
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
browser
iginal Message-
From: Rémy 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 maxTh
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 s
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 th
bject: 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
Th
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 be
49 matches
Mail list logo