Re: Need Consulting
Peter Lin wrote: as someone else mentioned, these types of seg fault errors have been the result of database drivers in the past. Specifically, using native drivers. I am not using any native drivers. I am aware of this type of behavior occuring with other drivers like JMS that wrap native code. Make sure your database driver isn't the cause. Try using a third party pure java jdbc driver and see if the same behavior occurs. As the error messages states, something outside the VM caused the seg fault. Not exactly, the segfault occurs in a routine outside the VM but it is hard to know what causes the memory corruption. good luck. peter jean-frederic clere [EMAIL PROTECTED] wrote: Clere, Jean-Frederic wrote: Jeff Rogers wrote: Hello, I hate to post this to the dev list, but we need consulting help. I have no idea where to look for reputable Tomcat consulting. We are at our wits end and ready to make the jump to commercial software due to a signal 11 crashing problem with our Tomcat servers. signal 11 are normaly problems in the JVM's. Which java version are you using? BTW: I have tried to overload TC and I have got: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40098aa6 Function name=malloc Library=/lib/libc.so.6 Current Java thread: at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:85) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.ja va:767) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalIn putBuffer.java:428) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:56 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java +++ That is with JVM 1.3.1_03... and 4.1.24. - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24380] - Tomcat cannot support file download with non-ISO characters filename
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24380. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24380 Tomcat cannot support file download with non-ISO characters filename --- Additional Comments From [EMAIL PROTECTED] 2003-11-14 09:18 --- After searching the sources, I found that in around line 333 of JkCoyoteHandler.java specifies the use of UTF8. Is it the problem area which always encode the headers in UTF8? private void appendHead(org.apache.coyote.Response res) throws IOException { C2BConverter c2b=(C2BConverter)res.getNote( utfC2bNote ); if( c2b==null ) { c2b=new C2BConverter( UTF8 ); == the problem line? res.setNote( utfC2bNote, c2b ); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util CatalinaDigester.java
remm2003/11/14 02:00:39 Added: catalina/src/share/org/apache/catalina/util CatalinaDigester.java Log: - Extend digester to be able to do property replacement. Eventually, the digester will also support this. - Submitted in part by Simon Kitching. Revision ChangesPath 1.1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CatalinaDigester.java Index: CatalinaDigester.java === /* * $Header: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CatalinaDigester.java,v 1.1 2003/11/14 10:00:39 remm Exp $ * $Revision: 1.1 $ * $Date: 2003/11/14 10:00:39 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.util; import org.apache.commons.digester.Digester; import org.xml.sax.Attributes; import org.xml.sax.helpers.AttributesImpl; import org.xml.sax.SAXException; import org.apache.tomcat.util.IntrospectionUtils; /** * This extended digester filters out ${...} tokens to replace them with * matching system properties. * * @author Simon Kitching * @author Remy Maucherat */ public class CatalinaDigester extends Digester { // -- Static Fields private static class SystemPropertySource implements IntrospectionUtils.PropertySource { public String getProperty( String key ) { return System.getProperty(key); } } protected static IntrospectionUtils.PropertySource source[] = new IntrospectionUtils.PropertySource[] { new SystemPropertySource() }; // Methods /** * Invoke inherited implementation after applying variable * substitution to any attribute values containing variable * references. */ public void startElement(String namespaceURI, String localName, String qName, Attributes list) throws SAXException {
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Catalina.java SetAllPropertiesRule.java
remm2003/11/14 02:02:10 Modified:catalina/src/share/org/apache/catalina/startup Catalina.java SetAllPropertiesRule.java Log: - Use the extended digester for system property replacement. - Note: Although the code is not very optimized, this does not have any impact on startup time, at least on my computer. Revision ChangesPath 1.22 +6 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java Index: Catalina.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Catalina.java 25 Sep 2003 03:08:56 - 1.21 +++ Catalina.java 14 Nov 2003 10:02:10 - 1.22 @@ -76,6 +76,7 @@ import org.apache.catalina.LifecycleException; import org.apache.catalina.Server; import org.apache.catalina.core.StandardServer; +import org.apache.catalina.util.CatalinaDigester; import org.apache.commons.digester.Digester; import org.apache.commons.digester.Rule; import org.apache.tomcat.util.log.SystemLogHandler; @@ -290,7 +291,7 @@ protected Digester createStartDigester() { long t1=System.currentTimeMillis(); // Initialize the digester -Digester digester = new Digester(); +Digester digester = new CatalinaDigester(); if (debug0) digester.setDebug(debug); digester.setValidating(false); 1.3 +3 -16 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java Index: SetAllPropertiesRule.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SetAllPropertiesRule.java 17 Oct 2003 14:42:51 - 1.2 +++ SetAllPropertiesRule.java 14 Nov 2003 10:02:10 - 1.3 @@ -99,22 +99,9 @@ name = attributes.getQName(i); } String value = attributes.getValue(i); -value = IntrospectionUtils.replaceProperties -(value, new SystemPropertyPropertyResource()); IntrospectionUtils.setProperty(digester.peek(), name, value); } -} - - -// - SystemPropertyPropertyResource Inner Class - - -protected class SystemPropertyPropertyResource -implements IntrospectionUtils.PropertySource { -public String getProperty(String key) { -return System.getProperty(key); -} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
remm2003/11/14 02:02:23 Modified:catalina/src/share/org/apache/catalina/core StandardHostDeployer.java Log: - Use the extended digester for system property replacement. - Note: Although the code is not very optimized, this does not have any impact on startup time, at least on my computer. Revision ChangesPath 1.16 +3 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java Index: StandardHostDeployer.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- StandardHostDeployer.java 2 Sep 2003 21:22:04 - 1.15 +++ StandardHostDeployer.java 14 Nov 2003 10:02:23 - 1.16 @@ -79,6 +79,7 @@ import org.apache.catalina.startup.ContextRuleSet; import org.apache.catalina.startup.ExpandWar; import org.apache.catalina.startup.NamingRuleSet; +import org.apache.catalina.util.CatalinaDigester; import org.apache.catalina.util.StringManager; import org.apache.commons.digester.Digester; @@ -853,7 +854,7 @@ */ protected Digester createDigester() { if (digester == null) { -digester = new Digester(); +digester = new CatalinaDigester(); if (host.getDebug() 0) digester.setDebug(3); digester.setValidating(false); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets WebdavServlet.java
remm2003/11/14 02:16:22 Modified:catalina/src/share/org/apache/catalina/servlets WebdavServlet.java Log: - Allow header handling. - Bug 24006, submitted by Mark Thomas. Revision ChangesPath 1.6 +64 -31 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java Index: WebdavServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- WebdavServlet.java6 Oct 2003 08:05:46 - 1.5 +++ WebdavServlet.java14 Nov 2003 10:16:22 - 1.6 @@ -338,11 +338,8 @@ protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -String path = getRelativePath(req); - resp.addHeader(DAV, 1,2); -String methodsAllowed = null; - + // Retrieve the resources DirContext resources = getResources(); @@ -351,28 +348,10 @@ return; } -boolean exists = true; -Object object = null; -try { -object = resources.lookup(path); -} catch (NamingException e) { -exists = false; -} - -if (!exists) { -methodsAllowed = OPTIONS, MKCOL, PUT, LOCK; -resp.addHeader(Allow, methodsAllowed); -return; -} - -methodsAllowed = OPTIONS, GET, HEAD, POST, DELETE, TRACE, -+ PROPFIND, PROPPATCH, COPY, MOVE, LOCK, UNLOCK; -if (!(object instanceof DirContext)) { -methodsAllowed += , PUT; -} - -resp.addHeader(Allow, methodsAllowed); +StringBuffer methodsAllowed = determineMethodsAllowed(resources, + req); +resp.addHeader(Allow, methodsAllowed.toString()); resp.addHeader(MS-Author-Via, DAV); } @@ -385,6 +364,19 @@ throws ServletException, IOException { if (!listings) { +// Retrieve the resources +DirContext resources = getResources(); + +if (resources == null) { +resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); +return; +} + +// Get allowed methods +StringBuffer methodsAllowed = determineMethodsAllowed(resources, + req); + +resp.addHeader(Allow, methodsAllowed.toString()); resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED); return; } @@ -649,7 +641,7 @@ return; } -resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); +resp.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED); } @@ -697,6 +689,12 @@ // Can't create a collection if a resource already exists at the given // path if (exists) { +// Get allowed methods +StringBuffer methodsAllowed = determineMethodsAllowed(resources, + req); + +resp.addHeader(Allow, methodsAllowed.toString()); + resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED); return; } @@ -2566,6 +2564,42 @@ return creationDateValue.toString(); } +/** + * Determines the methods normally allowed for the resource. + * + */ +private StringBuffer determineMethodsAllowed(DirContext resources, + HttpServletRequest req) { + +StringBuffer methodsAllowed = new StringBuffer(); +boolean exists = true; +Object object = null; +try { +String path = getRelativePath(req); + +object = resources.lookup(path); +} catch (NamingException e) { +exists = false; +} + +if (!exists) { +methodsAllowed.append(OPTIONS, MKCOL, PUT, LOCK); +return methodsAllowed; +} + +methodsAllowed.append(OPTIONS, GET, HEAD, POST, DELETE, TRACE, ); +methodsAllowed.append(PROPPATCH, COPY, MOVE, LOCK, UNLOCK); + +if (listings) { +methodsAllowed.append(PROPFIND, ); +} + +if (!(object instanceof DirContext)) { +methodsAllowed.append(, PUT); +} + +return methodsAllowed; +} //
DO NOT REPLY [Bug 24006] - PROPPATCH vs Allow header
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24006. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24006 PROPPATCH vs Allow header [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-11-14 10:16 --- I've applied your patch, thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session PersistentManagerBase.java
remm2003/11/14 02:26:47 Modified:catalina/src/share/org/apache/catalina/session PersistentManagerBase.java Log: - Fix unhandled exception (bug 24368). - Patch submitted by Mark Thomas. Revision ChangesPath 1.14 +9 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java Index: PersistentManagerBase.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- PersistentManagerBase.java11 Feb 2003 11:54:12 - 1.13 +++ PersistentManagerBase.java14 Nov 2003 10:26:47 - 1.14 @@ -897,7 +897,11 @@ StandardSession session = (StandardSession) sessions[i]; if (!session.isValid()) continue; -session.expire(); +try { +session.expire(); +} catch (Throwable t) { +; +} } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session PersistentManagerBase.java
remm2003/11/14 02:30:29 Modified:catalina/src/share/org/apache/catalina/session PersistentManagerBase.java Log: - Fix unhandled exception (bug 24368). - Patch submitted by Mark Thomas. Revision ChangesPath 1.13 +9 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java Index: PersistentManagerBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PersistentManagerBase.java13 Nov 2003 22:56:27 - 1.12 +++ PersistentManagerBase.java14 Nov 2003 10:30:29 - 1.13 @@ -574,7 +574,11 @@ for (int i = 0; i sessions.length; i++) { StandardSession session = (StandardSession) sessions[i]; if (!session.isValid()) { -session.expire(); +try { +session.expire(); +} catch (Throwable t) { +; +} } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24708] New: - Tomcat documentation is incorrect with regards to Tyrex and has broken links to Tyrex's web site.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24708. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24708 Tomcat documentation is incorrect with regards to Tyrex and has broken links to Tyrex's web site. Summary: Tomcat documentation is incorrect with regards to Tyrex and has broken links to Tyrex's web site. Product: Tomcat 5 Version: 5.0.0 Platform: All URL: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi- datasource-examples-howto.html#Tyrex%20Connection%20Pool OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Webapps:Documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi there ! My name is Rost Vashevnik and I am Tyrex project admin. It has been brought to my attention that links from Tomcat's documentation to Tyrex site are broken (I believe this is the case for all versions of Tomcat). Tyrex has moved from http://tyrex.exolab.org to http://tyrex.sourceforge.net some time ago. More importantly (and embarassingly for us all) http://tyrex.exolab.org does not respond properly any more. So your (and potentially our) user is at a loss what to do. I hope you coud fix it quikly to our common benefit. Also we have just released another version of Tyrex, which uses latest third party libraries. Please let me know if you would like me to review Tomcat's How to counfigure Tyrex documentation and submit updated instructions. Thank you for your time Kind regards Rost Vashevnik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/dsapi INSTALL.txt BUILD.txt jk_dsapi_plugin.c dsapi_redirector2.reg dsapi.dsp config.h
andya 2003/11/14 05:08:05 Modified:jk/native2/server/dsapi jk_dsapi_plugin.c dsapi_redirector2.reg dsapi.dsp config.h Added: jk/native2/server/dsapi INSTALL.txt BUILD.txt Log: Various changes, mainly cosmetic and some documentation now. Revision ChangesPath 1.2 +229 -274 jakarta-tomcat-connectors/jk/native2/server/dsapi/jk_dsapi_plugin.c Index: jk_dsapi_plugin.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/dsapi/jk_dsapi_plugin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_dsapi_plugin.c 13 Nov 2003 17:10:56 - 1.1 +++ jk_dsapi_plugin.c 14 Nov 2003 13:08:05 - 1.2 @@ -102,27 +102,6 @@ /* Domino DSAPI filter definitions */ #include dsapifilter.h -#if !defined(DLLEXPORT) -#if defined(WIN32) !defined(TESTING) -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#endif -#endif - -/* Configuration tags */ -#define SERVER_ROOT_TAG (serverRoot) -#define WORKER_FILE_TAG (workersFile) -#define TOMCAT_START_TAG (tomcatStart) -#define TOMCAT_STOP_TAG (tomcatStop) - -#define VERSION 2.0.0 -#define VERSION_STRING Jakarta/DSAPI/ VERSION - -#define FILTERDESC Apache Tomcat Interceptor ( VERSION_STRING ) - -#define SERVERDFLT Lotus Domino - #ifdef TESTING #define LOGGER logger.printf int JK_METHOD jk2_logger_printf_factory(jk_env_t *env, jk_pool_t *pool, jk_bean_t *result, const char *type, const char *name); @@ -130,27 +109,22 @@ #define LOGGER logger.win32 #endif -#define REGISTRY_LOCATIONSoftware\\Apache Software Foundation\\Jakarta Dsapi Redirector\\2.0 - -#define TOMCAT_STARTSTOP_TO 3 /* 30 seconds */ - -#define CONTENT_LENGTH Content-length/* Name of CL header */ - static char libFileName[MAX_PATH]; static char iniFileName[MAX_PATH]; -static int iniFileUsed = JK_FALSE; -static int isInited = JK_FALSE; +static int iniFileUsed = JK_FALSE; +static int isInited= JK_FALSE; static const char *tomcatStart = NULL; static const char *tomcatStop= NULL; static const char *workersFile = NULL; static const char *serverRoot= NULL; +static int tomcatTimeout = TOMCAT_STARTSTOP_TO; + +static const char *crlf = \r\n; static jk_workerEnv_t *workerEnv; static apr_pool_t *jk_globalPool; -static const char *crlf = \r\n; - /* Per request private data */ typedef struct private_ws { /* These get passed in by Domino and are used to access various @@ -174,9 +148,9 @@ /* Case insentive memcmp() clone */ #ifdef HAVE_MEMICMP -#define NoCaseMemCmp(ci, cj, l) _memicmp((void *) (ci), (void *) (cj), (l)) +#define noCaseMemCmp(ci, cj, l) _memicmp((void *) (ci), (void *) (cj), (l)) #else -static int NoCaseMemCmp(const char *ci, const char *cj, int len) { +static int noCaseMemCmp(const char *ci, const char *cj, int len) { if (0 == memcmp(ci, cj, len)) { return 0; } @@ -197,9 +171,9 @@ /* Case insentive strcmp() clone */ #ifdef HAVE_STRICMP -#define NoCaseStrCmp(si, sj) _stricmp((void *) (si), (void *) (sj)) +#define noCaseStrCmp(si, sj) _stricmp((void *) (si), (void *) (sj)) #else -static int NoCaseStrCmp(const char *si, const char *sj) { +static int noCaseStrCmp(const char *si, const char *sj) { if (0 == strcmp(si, sj)) { return 0; } @@ -220,7 +194,7 @@ * plen length of pattern * returns 1 if there's a match otherwise 0 */ -static int FindPathElem(const char *str, int slen, const char *ptn, int plen) { +static int scanPath(const char *str, int slen, const char *ptn, int plen) { const char *sp = str; while (slen = plen) { @@ -230,7 +204,7 @@ * suspicion that a Windows hosted server might accept URIs * containing \. */ - if (NoCaseMemCmp(sp, ptn, plen) == 0 + if (noCaseMemCmp(sp, ptn, plen) == 0 (sp == str || sp[-1] == '\\' || sp[-1] == '/') (slen == plen || sp[plen] == '\\' || sp[plen] == '/')) { return 1; @@ -258,6 +232,7 @@ } #endif +#ifdef _DEBUG static void _printf(const char *msg, ...) { char buf[512]; /* dangerous fixed size buffer */ va_list ap; @@ -266,11 +241,12 @@ va_end(ap); AddInLogMessageText(Debug: %s, NOERROR,
cvs commit: jakarta-tomcat-connectors/jk/native2/server/dsapi/test test.dsp test.c printf_logger.c
andya 2003/11/14 05:08:23 Modified:jk/native2/server/dsapi/test test.dsp test.c printf_logger.c Log: Various changes, mainly cosmetic and some documentation now. Revision ChangesPath 1.2 +2 -2 jakarta-tomcat-connectors/jk/native2/server/dsapi/test/test.dsp Index: test.dsp === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/dsapi/test/test.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test.dsp 13 Nov 2003 17:11:36 - 1.1 +++ test.dsp 14 Nov 2003 13:08:23 - 1.2 @@ -51,7 +51,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libapr.lib libaprutil.lib ws2_32.lib wsock32.lib pcre.lib pcreposix.lib notes.lib /nologo /subsystem:console /machine:I386 /libpath:..\..\..\..\..\..\apr\Release /libpath:..\..\..\..\..\..\pcre\lib /libpath:..\..\..\..\..\..\apr-util\Release /libpath:$(NOTESAPI)\lib\mswin32 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib wsock32.lib pcre.lib pcreposix.lib notes.lib libapr.lib libaprutil.lib /nologo /subsystem:console /machine:I386 /libpath:..\..\..\..\..\..\pcre\lib /libpath:..\..\..\..\..\..\apr\Release /libpath:..\..\..\..\..\..\apr-util\Release /libpath:$(NOTESAPI)\lib\mswin32 !ELSEIF $(CFG) == test - Win32 Debug @@ -76,7 +76,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libapr.lib libaprutil.lib ws2_32.lib wsock32.lib pcre.lib pcreposix.lib notes.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:..\..\..\..\..\..\apr\Release /libpath:..\..\..\..\..\..\pcre\lib /libpath:..\..\..\..\..\..\apr-util\Release /libpath:$(NOTESAPI)\lib\mswin32 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib wsock32.lib pcre.lib pcreposix.lib notes.lib libapr.lib libaprutil.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:..\..\..\..\..\..\pcre\lib /libpath:..\..\..\..\..\..\apr\Release /libpath:..\..\..\..\..\..\apr-util\Release /libpath:$(NOTESAPI)\lib\mswin32 !ENDIF 1.2 +70 -11jakarta-tomcat-connectors/jk/native2/server/dsapi/test/test.c Index: test.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/dsapi/test/test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test.c13 Nov 2003 17:11:36 - 1.1 +++ test.c14 Nov 2003 13:08:23 - 1.2 @@ -1,4 +1,65 @@ -/* test.c */ +/* = * + * * + * The Apache Software License, Version 1.1 * + * * + * Copyright (c) 1999-2001 The Apache Software Foundation. * + * All rights reserved.* + * * + * = * + * * + * Redistribution and use in source and binary forms, with or without modi- * + * fication, are permitted provided that the following conditions are met: * + * * + * 1. Redistributions of source code must retain the above copyright notice * + *notice, this list of conditions and the following disclaimer. * + *
Re: Need Consulting
hmm, very interesting. What other processes are running outside the VM? do you have process monitors, intrusion detection or other memory/IO intensive processes running on the same box? you can rule out native drivers as a possible cause. the VM still could be causing it. tomcat is most likely not the cause. that still leaves a lot of variables you have to track down. what are the exact system specs again? peter jean-frederic clere [EMAIL PROTECTED] wrote: Peter Lin wrote: as someone else mentioned, these types of seg fault errors have been the result of database drivers in the past. Specifically, using native drivers. I am not using any native drivers. I am aware of this type of behavior occuring with other drivers like JMS that wrap native code. Make sure your database driver isn't the cause. Try using a third party pure java jdbc driver and see if the same behavior occurs. As the error messages states, something outside the VM caused the seg fault. Not exactly, the segfault occurs in a routine outside the VM but it is hard to know what causes the memory corruption. good luck. peter - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
DO NOT REPLY [Bug 24690] - jk 1.2.5 doesn't even compile on linux
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24690. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24690 jk 1.2.5 doesn't even compile on linux --- Additional Comments From [EMAIL PROTECTED] 2003-11-14 18:03 --- I can't reproduce this problem with the following setup: RedHat 8.0 Apache 2.0.40 (installed by rpm) j2sdk1.4.2_02 ./configure --with-apxs=/usr/sbin/apxs --enable-jni --with-java- home=${JAVA_HOME} --with-java-platform=2 Builds find. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Secure Cookie Problem
Hi All, I'm new to the list -- I hope this is not a topic that's been beaten to death - I searched the Archives but could not find the answer to my question. The problem I'm having on Tomcat 4.1.29 is that the first page a user visits is secure -- the session cookie gets set with the 'secure' flag value set to true. After login, the user gets sent to a non-secure page, the 'secure' cookie does not get sent back to the server, and the user gets a new session which is not logged in. After visiting the non-secure page, the user can go back to the secure page and log in without any problems. Is there a config setting to tell Tomcat never to use secure cookies, or any other solution to fix this problem (other than forcing a non-secure page visit first)? Thanks much, -- Andrew Mottaz Site 9 :: Internet Business Solutions 116 W. Illinois, Ste 6E Chicago, Illinois 60610 312.670.8469 www.site9.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk sends an empty ajb13 body packet while switching between cluster nodes
Hi, I have a very strange behaviour. I have 2 different configurations. 1) I have 3 pc apache2.0.47 and mod_jk1.2.5 on Red Hat Linux (pc0) tomcat4.1.x on Red Hat Linux (pc1) tomcat4.1.x on Red Hat Linux (pc2) 2) I have 3 pc apache2.0.47 and mod_jk1.2.5 on Red Hat Linux (pc0) tomcat4.1.x on windows2000 (pc1) tomcat4.1.x on windows2000 (pc2) I have configured mod jk to work with sticky session (jvmRoute in server.xml). It works fine. I have configured session replication correctly. It works fine. But I have a problem. In configuration 1) after a failover of a tomcat (i.e. pc1) the ajp13 body packet that arrives over tomcat pc2 is empty while the relative ajp13 header packet defines a lenght0. It means that my request loses the http post content. Hence I have the session correctly replicated while the content of a html form, for example, definitively loose. But if I reply the same configuration (case 2) with Tomcat on Windows all work fine. It looks very strange. Some helps. Thanks Luca __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24368] - Unhandled Exception in PersistentManagerBase.processExpires() kills PersistentManager thread
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24368. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24368 Unhandled Exception in PersistentManagerBase.processExpires() kills PersistentManager thread [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-11-14 19:33 --- Remy has applied the patch. Thanks ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24368] - Unhandled Exception in PersistentManagerBase.processExpires() kills PersistentManager thread
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24368. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24368 Unhandled Exception in PersistentManagerBase.processExpires() kills PersistentManager thread [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2003-11-14 20:42 --- From your recent comments, and in viewing the updated source, I take it you do not agree that a log statement is necessary inside your try catch? If that's the case, might I implore you to reconsider? While the cause of the exception may not be Tomcat related, it is frequently extremely helpful to have explicit log statements as an alert to a problem that may exist elsewhere, but might not otherwise be noticed. As further testimony, in StandardManager, which serves a similar purpose, a simple log statement IS provided in the catch. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.14 and JK loadbalancing
Didn't get a reply on this. Does anyone have an idea? Dave Oxley wrote: I have 4 load balanced JK (1.2.5) workers. When I select to stop Tomcat (5.0.14), which takes a while to shut down (because of some daemon threads in our app) a 400 bad request is returned to the browser even though there are other JK workers that could be used. A couple of causes spring to mind, but I don't know which one is true. Does it take a while for mod_jk to learn about the stopped status of the JK worker? Is it a bug with JK or Tomcat 5? JK load balancing was not designed for fault tolerance? I would appreciate some advice/explanation as this is about to become our standard setup. Cheers. Dave. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- * Dave Oxley * * +44 (0)7966 249 344 * * * * [EMAIL PROTECTED] * * mailto:[EMAIL PROTECTED] * * * * http://www.daveoxley.co.uk * * http://www.daveoxley.co.uk * * Linux: Because reboots are for hardware upgrades! * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session ReplicatedSession.java
fhanik 2003/11/14 13:32:23 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session ReplicatedSession.java Log: if null is passed into the value of setAttribute, then remove it Revision ChangesPath 1.8 +8 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java Index: ReplicatedSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ReplicatedSession.java9 Sep 2003 22:21:18 - 1.7 +++ ReplicatedSession.java14 Nov 2003 21:32:23 - 1.8 @@ -123,7 +123,7 @@ public void setLastAccessWasDistributed(long time) { lastAccessWasDistributed = time; } - + public long getLastAccessWasDistributed() { return lastAccessWasDistributed; } @@ -149,6 +149,10 @@ */ public void setAttribute(String name, Object value) { +if ( value == null ) { + removeAttribute(name); + return; +} if (!(value instanceof java.io.Serializable)) throw new java.lang.IllegalArgumentException(Value for attribute +name+ is not serializable.); setIsDirty(true); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Consulting
You should first check if your OS is updated properly. Are you running on (Redhat) linux by any chance? If you do then you have to be carefull that your linux kernel, libc and JVM version are compatible (pre or post redhat 9) This is because the new thread library, Native POSIX Thread Library (NPTL). http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/release-notes/ws-amd64/ http://developer.java.sun.com/developer/technicalArticles/JavaTechandLinux/RedHat/ Another option is to try green threads -green option and/or disable hotspot. If you have a core dump you could analyse it using gdb. -- Dirk jean-frederic clere wrote: Clere, Jean-Frederic wrote: Jeff Rogers wrote: Hello, I hate to post this to the dev list, but we need consulting help. I have no idea where to look for reputable Tomcat consulting. We are at our wits end and ready to make the jump to commercial software due to a signal 11 crashing problem with our Tomcat servers. signal 11 are normaly problems in the JVM's. Which java version are you using? BTW: I have tried to overload TC and I have got: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40098aa6 Function name=malloc Library=/lib/libc.so.6 Current Java thread: at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:85) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:767) at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:428) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:569) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java +++ That is with JVM 1.3.1_03... and 4.1.24. We have found about a zillion similar issues on the lists, but no solutions. We are in the Northeastern part of the US. Please reply offline to keep this off the dev list. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Feedback: JNDI Datasource HOW-TO
Hi all, I have been following the JNDI Datasource HOW-TO published at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html, to try and create a postgresql database pool, and a basic authentication realm associated with it. The docs say the config is untested - and having tested it, I can report that the config does not work. The config I tried was this: Context path=/patricia reloadable=true docBase=/home/gatekeeper/minfrin/src/fma/patricia/target/patricia workDir=/home/gatekeeper/minfrin/src/fma/patricia/work/org/apache/jsp Logger className=org.apache.catalina.logger.SystemOutLogger verbosity=4 timestamp=true/ Resource name=jdbc/patricia auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/patricia parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql://127.0.0.1:5432/patricia/value /parameter parameter nameusername/name valueuser_name/value /parameter parameter namepassword/name valuepassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/patricia userTable=person userNameCol=uid userCredCol=user_password userRoleTable=company_person roleNameCol=role_name/ /Context The error I got was this: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:811) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:467) The error message is not very descriptive, being new to this, I wouldn't have the first clue where to look for a solution. Anyone have any clues as to what is going on? Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24721] New: - HttpServletRequest.setCharacterEncoding doesn't work.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24721. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24721 HttpServletRequest.setCharacterEncoding doesn't work. Summary: HttpServletRequest.setCharacterEncoding doesn't work. Product: Tomcat 4 Version: 4.1.29 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Connector:Coyote HTTP/1.1 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Servlets using method HttpServletRequest.setCharacterEncoding(iso-8859-2); can't decode Polish characters. I'm using FORMS and POST method. The same seevlets works on Tomcat 4.1.27 I've opened bug 24557 few days ago, then Remy Maucherat set status to RESOLVED/INVALID. I've understood that my report is wrong, so I reopend bug and put new comment. Because nobody changed status of bug 24557 since 10/NOV I'm filling this report now... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24723] New: - JNDI Datasource HOWTO instructions incorrect - Name jdbc is not bound in this Context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24723. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24723 JNDI Datasource HOWTO instructions incorrect - Name jdbc is not bound in this Context Summary: JNDI Datasource HOWTO instructions incorrect - Name jdbc is not bound in this Context Product: Tomcat 4 Version: 4.1.27 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If the instructions are followed to configure a JNDI DataSource pointing at a postgresql database that are posted at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html, the result is the following exception: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:811) at org.apache.naming.NamingContext.lookup(NamingContext.java:194) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:467) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:315) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:161) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session ClusterManager.java ClusterSession.java DeltaSession.java
fhanik 2003/11/14 16:49:43 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java Added: modules/cluster/src/share/org/apache/catalina/cluster/session ClusterManager.java ClusterSession.java Log: adding interfaces to make clustering more configurable. Also, realized that only a primary session can expire by inactive time, the other nodes (slave sessions) will expire when the primary does Revision ChangesPath 1.2 +32 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java Index: DeltaSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DeltaSession.java 14 Nov 2003 20:07:52 - 1.1 +++ DeltaSession.java 15 Nov 2003 00:49:43 - 1.2 @@ -125,7 +125,8 @@ */ public class DeltaSession -implements HttpSession, Session, Serializable { +implements HttpSession, Session, Serializable, + ClusterSession { // --- Constructors @@ -245,7 +246,7 @@ /** * The Manager with which this Session is associated. */ -private Manager manager = null; +private transient Manager manager = null; /** @@ -311,8 +312,33 @@ private long thisAccessedTime = creationTime; +/** + * only the primary session will expire, or be able to + * expire due to inactivity. This is set to false + * as soon as I receive this session over the wire in + * a session message. That means that someone else has + * made a request on another server. + */ +private transient boolean isPrimarySession = true; + // - Session Properties +/** + * returns true if this session is the primary session, if that is the + * case, the manager can expire it upon timeout. + * @return + */ +public boolean isPrimarySession() { + return isPrimarySession; +} + +/** + * Sets whether this is the primary session or not. + * @param primarySession + */ +public void setPrimarySession(boolean primarySession) { + this.isPrimarySession=primarySession; +} /** * Return the authentication type used to authenticate our cached 1.1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ClusterManager.java Index: ClusterManager.java === /* * $Header: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ClusterManager.java,v 1.1 2003/11/15 00:49:43 fhanik Exp $ * $Revision: 1.1 $ * $Date: 2003/11/15 00:49:43 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationValve.java SimpleTcpCluster.java
fhanik 2003/11/14 16:58:20 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java SimpleTcpReplicationManager.java modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationValve.java SimpleTcpCluster.java Added: modules/cluster/src/share/org/apache/catalina/cluster ClusterManager.java ClusterSession.java SessionMessage.java Removed: modules/cluster/src/share/org/apache/catalina/cluster/session ClusterManager.java ClusterSession.java SessionMessage.java Log: refactored files to be used in a better way, more intuitive to extend,implement and configure Revision ChangesPath 1.1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java Index: ClusterManager.java === /* * $Header: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java,v 1.1 2003/11/15 00:58:20 fhanik Exp $ * $Revision: 1.1 $ * $Date: 2003/11/15 00:58:20 $ * * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.catalina.cluster; /** * The common interface used by all cluster manager. * This is so that we can have a more pluggable way * of swapping session managers for different algorithms. * * @author Filip Hanik */ import org.apache.catalina.Manager; public interface ClusterManager extends Manager { /** * A message was received from another node, this * is the callback method to implement if you are interested in * receiving replication messages. * @param msg - the message received. */ public void messageDataReceived(SessionMessage msg); /** * When the request has been completed, the replication valve * will notify the manager, and the manager will decide whether * any replication is needed or not. * If there is a need for replication, the manager will *
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java
fhanik 2003/11/14 17:07:23 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session SimpleTcpReplicationManager.java modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java Log: a little more refactoring Revision ChangesPath 1.16 +4 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java Index: SimpleTcpReplicationManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- SimpleTcpReplicationManager.java 15 Nov 2003 00:58:20 - 1.15 +++ SimpleTcpReplicationManager.java 15 Nov 2003 01:07:23 - 1.16 @@ -110,6 +110,7 @@ * a byte array using the StandardSession.readObjectData, StandardSession.writeObjectData methods. */ public class SimpleTcpReplicationManager extends org.apache.catalina.session.StandardManager +implements org.apache.catalina.cluster.ClusterManager { //the channel configuration 1.18 +7 -7 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- SimpleTcpCluster.java 15 Nov 2003 00:58:20 - 1.17 +++ SimpleTcpCluster.java 15 Nov 2003 01:07:23 - 1.18 @@ -96,6 +96,7 @@ import org.apache.catalina.cluster.SessionMessage; import org.apache.catalina.cluster.session.ReplicationStream; +import org.apache.catalina.cluster.ClusterManager; import org.apache.catalina.cluster.session.SimpleTcpReplicationManager; import org.apache.catalina.cluster.Constants; @@ -670,15 +671,14 @@ java.util.Iterator i = managers.keySet().iterator(); while ( i.hasNext() ) { String key = (String)i.next(); -SimpleTcpReplicationManager mgr = (SimpleTcpReplicationManager) managers.get(key); +ClusterManager mgr = (ClusterManager) managers.get(key); if (mgr != null) mgr.messageDataReceived(msg); else log.warn(Context manager doesn't exist: + key); }//while } else { -SimpleTcpReplicationManager mgr = ( -SimpleTcpReplicationManager) managers.get(name); +ClusterManager mgr = (ClusterManager) managers.get(name); if (mgr != null) mgr.messageDataReceived(msg); else - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]