Re: WebSockets Thread Safety question

2013-07-11 Thread Darryl Miles
Martin Gainty wrote: use java.util.Collections.synchronizedList or even better use a ConcurrentLinkedQueue class (with offer()/peek()/poll() APIs), as I suspect you never need to access the middle elements in the ordered list directly, so why carry this extra java.util.List API

Re: static objects, server.xml and preventing running out of available file descriptors

2006-09-24 Thread Darryl Miles
Mladen Adamovic wrote: Also, I've put in /etc/profile.local the line ulimit -n 8192, hoping it will help. WARNING: If you are unix the JVM uses the select() then increasing the ulimit above the default 1024 maybe dangerous. This is because the default select() usage set only allocates

Re: Starting background thread in contextInitialized ...

2006-09-04 Thread Darryl Miles
Andrés González wrote: Maybe a little OT, but: do you think it is a good architecture to have such a background thread processing those records periodically?. YMMV. For me I have many jobs running, some timed on a regular schedule, some timed and/or triggered from events (message passing),

Re: Starting background thread in contextInitialized ...

2006-09-03 Thread Darryl Miles
Velja Radenkovic wrote: I need to periodicaly (12 hrs) check few thousands of database records and to perform some transactions. My first intention was to start a thread in contextInitialized for this purpose. After searching the internet (including this mailing list), I'm in doubt. There are

Re: Tomcat 5.5 setting two JSESSIONID cookies in same response

2006-09-01 Thread Darryl Miles
David Cotter wrote: This turns out to be because I call session.invalidate() and then request.getSession(true). I don't have to do this so it's fine. Don't know if two JSESSIONIDs is valid behaviour. In the case of the sample quoted the new one will just overwrite it. There are a few minor

Re: HTTP/1.1 400 Bad Request --- Tomcat 5.0.28/IIS6 (Win2003)/JK-1.2.15

2006-08-31 Thread Darryl Miles
Piero Cavalieri wrote: The get: GET /geonetwork/srv/en/main.search?extended=offremote=offattrset=geoany=hitsPerPage=10 HTTP/1.1 The response: HTTP/1.1 400 Bad Request Content-Type: text/html Date: Thu, 31 Aug 2006 10:02:04 GMT Connection: close Content-Length: 35 Is it because you are

Re: Session hijacking with Tomcat/Myfaces - unable to fix it

2006-08-10 Thread Darryl Miles
Well HTTP Cookies have a solution to this problem. They have a Secure keyword in the Set-Cookie line. This stops the client leaking the cookie outside of a secure channel. The problem is I dont think Tomcat keeps track and flags if a session has been exposed via a non-secure channel or

Re: Session hijacking with Tomcat/Myfaces - unable to fix it

2006-08-10 Thread Darryl Miles
Tomas Hulek wrote: Unfortunately, filters are skipped (ie. not called at all) when form-based login page is processed as a result of client requesting a secure area. We tried that too... By the way, the original URL that the client requested is hidden in the session in a way which prevents the

Re: Session hijacking with Tomcat/Myfaces - unable to fix it

2006-08-10 Thread Darryl Miles
Maurice Yarrow wrote: Thanks for adding this thought. As per my previous note on this subject, in light of your (relative) confidence in using IP, maybe I _should_ reconsider the getRemoteAddr() and simply use it as an addt'l advisory for making session auth decision on successive pages as

Re: Hot code replace

2006-08-09 Thread Darryl Miles
Ulath wrote: i am trying to use eclipse with tomcat (myeclipse plugin) but when i change one of my class (JSF backing beans) i get Hot code replace failed - Scheme change not implemented error, so i need to restart tomcat each time what could i do to enable hot code replacement? What IDE

Re: Tomcat Crashing -- how do I read the resulting hs_err_pid11598.log?

2006-07-20 Thread Darryl Miles
Kim Albee wrote: The box has 4GB of RAM on it, and has experienced a memory failure. We tested the physical RAM on the server, and it failed 2 extended memory tests, so we replaced the RAM. We also saw that the swap space was only at 1.5GB, so we upped that to 6.5 GB. For most real-time

Re: Removal of headers in HttpServletResponse object

2006-07-20 Thread Darryl Miles
Geir Øvsttun (AS/ETO) wrote: Server: Apache-Coyote/1.1 Content-Type: text/html;charset=ISO-8859-1 Content-Length: 82 Date: Thu, 20 Jul 2006 09:53:33 GMT These headers are not included by the various embedded devices I am trying to simulate. As the HttpServletResponse class does not have a

Re: Memory Leak question - please help

2006-06-29 Thread Darryl Miles
John McClain wrote: How do I know what memory is expected to be retained by Tomcat outside of my application classes There seems to be caches / pools / classloaders as almost every GC root. Is there some list out there that defines valid Catalina GC roots for a running webapplication?? If

Re: Tomcat creating two threads for one request

2006-06-26 Thread Darryl Miles
ametsi wrote: The problem seems to occur by a double submission of the Post. That is, I found that except of the “submit” button of the form that I use which invokes the jsp, I am also using a small java script, which accidentally submits the Post for one more time. I changed the java script and

Re: Tomcat's scalability

2006-06-21 Thread Darryl Miles
Mladen Adamovic wrote: Max number of Java thread, IMHO. Java thread is not the same as operating system thread. In fact, JVM used to be single threaded on Linux and Windows and I'm not quite sure has it changed recently. So, you might have 800 Java threads but it is still one thread on

Re: Tomcat's scalability

2006-06-21 Thread Darryl Miles
Mladen Adamovic wrote: Biernatowski, Is your HTTP application multi-threaded ? Irrelevant. Unimportant. Why is that ? What happens if his app is using this line in JSP ? %@ page isThreadSafe=false % Google is your friend. Or to have i.e. extremely large Lucene database or some other

Re: Tomcat's scalability

2006-06-19 Thread Darryl Miles
Leon Rosenberg wrote: On 6/19/06, Mladen Adamovic [EMAIL PROTECTED] wrote: Leon Rosenberg wrote: Teoreticly, your servers should be faster if you configure 4 Tomcat instances (4 JVMs) to do round robin. You should be able to improve performances almost 4x. could you explain why?? Isn't

Re: AJP vs. JNI

2006-06-12 Thread Darryl Miles
Mann, Bradley wrote: Hello, I am trying to discover the differences between these two protocols (AJP and JNI) when using the Jakarta Connector with Apache HTTPD and Tomcat. Any information on the difference between these two and what scenarios work best with each is greatly appreciated. Chalk

Re: A way to know if file download has ended

2006-06-05 Thread Darryl Miles
Bachler, Elisabeth (Elisabeth) wrote: Thank you to everyone. I will investigate further. Elisabeth Maybe this thread is related (excuse the horid apache web interface) : http://mail-archives.apache.org/mod_mbox/tomcat-users/200604.mbox/[EMAIL PROTECTED] Darryl

Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles
Michael Decker wrote: 1.) Which mod should I use? Configuration: Apache and Tomcat are running on same pc. I expect low traffic, because it's an intranet application. I've read about mod_jk, mod_jk2, mod_proxy [1], mod_proxy_ajp [2] According to Apache FAQ [3] and JBoss FAQ [4] only mod_jk or

Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles
Michael Decker wrote: The AJP protocol will convery the SSL information to tomcat fairly seamlessly, the idea being from the web-app's point of view it can't tell the difference between an Apache fronted HTTP session and one coming in via a AJP connector. You mean, that the session will be

Re: Tomcat 5.5 / Apache 2 / Join (Tomcat-) Session with SSL-Session / Which mod should be used?

2006-05-19 Thread Darryl Miles
Michael Decker wrote: My problem is, that the application session (set by cookie or url parameter) is not associated with the SSL session. And I hope, there is an easy way to that. I dont understand why you want to connect to two (under my definition of each explained above). Why I want that?

Re: 2.4 servlet spec compliance (getContextPath)

2006-05-14 Thread Darryl Miles
Bill Barker wrote: Carlin Rogers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Pretty much all of them have been discussed at length on [EMAIL PROTECTED] and/or BZ. The archives are your friend :). Is there information on any other areas of the spec that Tomcat has chosen not to

Re: User WEb Applications

2006-05-04 Thread Darryl Miles
Robert Frank wrote: I'm trying to set up the standalone server such that users can install and deply webapplications in their home directory (this is for a lab). Heh... Container stability during development for a single user is hard enough than to have to worry about what your other lab

Re: enforcing serialization of session attributes

2006-05-03 Thread Darryl Miles
Maybe you need to have: Context ...SNIP... Manager className=org.apache.catalina.session.PersistentManager saveOnRestart=true distributable=true debug=0 Store className=org.apache.catalina.session.FileStore/ /Manager /Context In your META-INF/context.xml or maybe

Re: Servlet inter-communication

2006-05-03 Thread Darryl Miles
Maybe a useful URL to help address this matter when it bites, look for the java code in the forum thread: http://forum.hibernate.org/viewtopic.php?t=935948start=150 Something to put at the end of your javax.servlet.ServletContextListener#contextDestroyed(ServletContextEvent). Abstracting

Re: Last Byte Detection

2006-04-27 Thread Darryl Miles
Nicolas Schwartz wrote: I want to detect if a terminal gets all of the file he wanted to download through the HTTP connection. Maybe jarkarta commons-fileupload project is your friend http://jakarta.apache.org/commons/fileupload/ Darryl

Re: Last Byte Detection

2006-04-27 Thread Darryl Miles
Nicolas Schwartz wrote: I want to detect if a terminal gets all of the file he wanted to download through the HTTP connection. Maybe jakarta commons-httpclient project is your friend http://jakarta.apache.org/commons/httpclient/ Darryl

Re: Last Byte Detection

2006-04-26 Thread Darryl Miles
Nicolas Schwartz wrote: I'm trying to get the information of sending the last byte of a file through Tomcat. I've done many tests, I've looked in the archives and nothing came up. So I'm thinking that maybe I'm not posting where I should, if it is so, please tell me so and tell me where I