Re: Hy Users....
Hello Thomas, We will need more information to help you. The stack trace that is shown in the browser for a JSF exception is almost never useful information for debugging. Pull out the whole stack trace from the log file and send that. The log should show three stack traces; it is the third one (not shown here) that has the critical point at which JSF threw it root cause. Cheers, Bryan what a hell, i cant use JSF with my Tomcat 5.5.20 ??? Every JSF app i´ve try load on my deploy, happen this: what can i do ?? i´m desesperate!!! thanks. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Unknown Source) root cause java.lang.NullPointerException javax.faces.webapp.FacesServlet.init(FacesServlet.java:144) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Unknown Source) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deadlock in Tomcat 5.5.20
Hi all, This might not be the right forum for this. Let em know if I should post this to the tomcat-dev alias. THE PROBLEM The problem we are experience is that occasionally Tomcat (5.5.20) is deadlocking; see the attached output from a kill -3 on the tomcat process. Has anyone seen this happen? Did you discover why this is happening? And most importantly: How did you fix it? THE BACKGROUND I am working on a project in which our architecture requires pluggable modules. In the first two iterations, we avoided that requirement by building all modules into a single ROOT.war webapp. Now in this iteration we are teasing apart these into separately loaded moduleXYZ.war files. This has caused lots of headaches; especially around getting JSF to handle cross-context (cross-webapp) navigation and bean management. We have pretty much solved the JSF issues, some fixes required doing things like performing cross-context dispatching and merging of JSF's RuntimeConfig objects from each webapp ServletContext. However, I don't see how any of these changes would cause the deadlock. Sincere thanks, Bryan Java2D Disposer daemon prio=1 tid=0x08af2f10 nid=0xf1d in Object.wait() [0x9bda3000..0x9bda40d0] at java.lang.Object.wait(Native Method) - waiting on 0xa03bf8a8 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked 0xa03bf8a8 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) at sun.java2d.Disposer.run(Disposer.java:107) at java.lang.Thread.run(Thread.java:595) Timer-3 daemon prio=1 tid=0x083667f8 nid=0xe9c in Object.wait() [0x9be41000..0x9be42150] at java.lang.Object.wait(Native Method) - waiting on 0x9ff8d648 (a java.util.TaskQueue) at java.util.TimerThread.mainLoop(Timer.java:509) - locked 0x9ff8d648 (a java.util.TaskQueue) at java.util.TimerThread.run(Timer.java:462) TP-Monitor daemon prio=1 tid=0x0837ab30 nid=0xe9b in Object.wait() [0x9bec2000..0x9bec2ed0] at java.lang.Object.wait(Native Method) - waiting on 0x9ff8d688 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:559) - locked 0x9ff8d688 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at java.lang.Thread.run(Thread.java:595) TP-Processor4 daemon prio=1 tid=0x083615e8 nid=0xe9a runnable [0x9bf43000..0x9bf43e50] at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) - locked 0x9ff8d6b0 (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:450) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) TP-Processor3 daemon prio=1 tid=0x083603d0 nid=0xe99 in Object.wait() [0x9bfc4000..0x9bfc4fd0] at java.lang.Object.wait(Native Method) - waiting on 0x9ff8d8d8 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:474) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656) - locked 0x9ff8d8d8 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:595) TP-Processor2 daemon prio=1 tid=0x0835f288 nid=0xe98 in Object.wait() [0x9c045000..0x9c045f50] at java.lang.Object.wait(Native Method) - waiting on 0x9ff8d8f8 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:474) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:656) - locked 0x9ff8d8f8 (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:595) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deadlock in Tomcat 5.5.20
Upon reflection my team has decided that it is some strange interaction between Firefox and our VMware instance running Tomcat. If we kill Firefox, then Tomcat resumes processing requests. How bizarre. Sorry to waste the bandwidth. -Bryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring JSF in the TOMCAT/conf/web.xml for all webapps
Hello, I am developing a system in which every webapp deployed to Tomcat uses JSF. So, I decided to move the common JSF configuration from each webapp/WEB-INF/web.xml into the TOMCAT/conf/web.xml file. At startup time everything looks fine. Here's an example of the output I see for each webapp: - [02 Feb 2007 10:32:15,699] INFO [main] (HostConfig.java:788) - Deploying web application archive admin.war [02 Feb 2007 10:32:16,022] INFO [main] (FacesConfigurator.java:151) - Reading standard config org/apache/myfaces/resource/standard-faces-config.xml [02 Feb 2007 10:32:16,112] INFO [main] (FacesConfigurator.java:397) - Reading config /WEB-INF/module-faces-config.xml [02 Feb 2007 10:32:16,134] INFO [main] (FacesConfigurator.java:411) - Reading config /WEB-INF/faces-config.xml [02 Feb 2007 10:32:16,165] INFO [main] (NamedNavigationHandler.java:48) - The Cobia navigation handler has been instantiated. [02 Feb 2007 10:32:16,167] INFO [main] (CobiaVariableResolver.java:59) - The Cobia variable resolver has been instantiated. [02 Feb 2007 10:32:16,171] INFO [main] (CrossContextViewHandler.java:57) - The Cobia cross-context ViewHandler has been instantiated. [02 Feb 2007 10:32:16,230] INFO [main] (HtmlRenderKitImpl.java:104) - Overwriting renderer with family = javax.faces.SelectOne rendererType = javax.faces.Radi o renderer class = org.stillsecure.common.web.components.SelectOneRadioRenderer [02 Feb 2007 10:32:16,231] INFO [main] (HtmlRenderKitImpl.java:104) - Overwriting renderer with family = javax.faces.Form rendererType = javax.faces.Form renderer class = org.stillsecure.common.web.components.HtmlFormRenderer [02 Feb 2007 10:32:16,237] INFO [main] (StartupServletContextListener.java:99) - ServletContext '/usr/local/apache-tomcat/webapps/admin/' initialized. [02 Feb 2007 10:32:16,237] INFO [main] (StartupServletContextListener.java:140) - Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory [02 Feb 2007 10:32:16,238] INFO [main] (CobiaInitializer.java:66) - Initializing Cobia ServletContext - However, when the first URL to *.jsf occurs I get the following error message: - 02 Feb 2007 10:33:04,953] INFO [http-443-Processor25] (ApplicationContext.java:646) - No state saving method defined, assuming default server state saving [02 Feb 2007 10:33:04,971] WARN [http-443-Processor25] (JspViewHandlerImpl.java:394) - no faces servlet mappings found [02 Feb 2007 10:33:07,757] WARN [http-443-Processor25] (JspViewHandlerImpl.java:394) - no faces servlet mappings found [02 Feb 2007 10:33:07,813] INFO [http-443-Processor25] (MyfacesConfig.java:133) - No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true [02 Feb 2007 10:33:07,815] INFO [http-443-Processor25] (MyfacesConfig.java:133) - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true [02 Feb 2007 10:33:07,818] INFO [http-443-Processor25] (MyfacesConfig.java:119) - Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now. [02 Feb 2007 10:33:12,544] ERROR [http-443-Processor24] (UIComponentTag.java:926) - Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml. [02 Feb 2007 10:33:12,553] ERROR [http-443-Processor24] (StandardWrapperValve.java:253) - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310) at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70) at org.apache.jsp.login_jsp._jspx_meth_f_view_0(login_jsp.java:105) at org.apache.jsp.login_jsp._jspService(login_jsp.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.stillsecure.cobia.web.user.AuthenticationFilter.doFilter(AuthenticationFilter.java:101) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
Re: Configuring JSF in the TOMCAT/conf/web.xml for all webapps
Hello Tim, OK, but if the JSF jar files are *only* in TOMCAT/common/lib/ directory and *never* in the WEBAPP/WEB-INF/lib/ directory? Thanks, Bryan This is almost certainly caused by the involvement of two different classloaders. For example, if you place a driver jar such as Oracle's classes12.jar in both places, then you'll find you cannot cast from a com.oracle...BlobXXX to a com.oracle...BlobXXX, as the class you can see comes from the web-app class loader, but the blob you have came from Tomcat's common class loader, from whence the connection came. The class names are the same, and it can be quite confusing trying to figure it out, as the CastClassException doesn't indicate the loader, only the class name. Tim -Original Message- From: Bryan Basham [mailto:[EMAIL PROTECTED] Sent: Friday, February 02, 2007 1:10 PM To: Tomcat Users List Subject: Configuring JSF in the TOMCAT/conf/web.xml for all webapps Hello, I am developing a system in which every webapp deployed to Tomcat uses JSF. So, I decided to move the common JSF configuration from each webapp/WEB-INF/web.xml into the TOMCAT/conf/web.xml file. At startup time everything looks fine. Here's an example of the output I see for each webapp: - [02 Feb 2007 10:32:15,699] INFO [main] (HostConfig.java:788) - Deploying web application archive admin.war [02 Feb 2007 10:32:16,022] INFO [main] (FacesConfigurator.java:151) - Reading standard config org/apache/myfaces/resource/standard-faces-config.xml [02 Feb 2007 10:32:16,112] INFO [main] (FacesConfigurator.java:397) - Reading config /WEB-INF/module-faces-config.xml [02 Feb 2007 10:32:16,134] INFO [main] (FacesConfigurator.java:411) - Reading config /WEB-INF/faces-config.xml [02 Feb 2007 10:32:16,165] INFO [main] (NamedNavigationHandler.java:48) - The Cobia navigation handler has been instantiated. [02 Feb 2007 10:32:16,167] INFO [main] (CobiaVariableResolver.java:59) - The Cobia variable resolver has been instantiated. [02 Feb 2007 10:32:16,171] INFO [main] (CrossContextViewHandler.java:57) - The Cobia cross-context ViewHandler has been instantiated. [02 Feb 2007 10:32:16,230] INFO [main] (HtmlRenderKitImpl.java:104) - Overwriting renderer with family = javax.faces.SelectOne rendererType = javax.faces.Radi o renderer class = org.stillsecure.common.web.components.SelectOneRadioRenderer [02 Feb 2007 10:32:16,231] INFO [main] (HtmlRenderKitImpl.java:104) - Overwriting renderer with family = javax.faces.Form rendererType = javax.faces.Form renderer class = org.stillsecure.common.web.components.HtmlFormRenderer [02 Feb 2007 10:32:16,237] INFO [main] (StartupServletContextListener.java:99) - ServletContext '/usr/local/apache-tomcat/webapps/admin/' initialized. [02 Feb 2007 10:32:16,237] INFO [main] (StartupServletContextListener.java:140) - Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory [02 Feb 2007 10:32:16,238] INFO [main] (CobiaInitializer.java:66) - Initializing Cobia ServletContext - However, when the first URL to *.jsf occurs I get the following error message: - 02 Feb 2007 10:33:04,953] INFO [http-443-Processor25] (ApplicationContext.java:646) - No state saving method defined, assuming default server state saving [02 Feb 2007 10:33:04,971] WARN [http-443-Processor25] (JspViewHandlerImpl.java:394) - no faces servlet mappings found [02 Feb 2007 10:33:07,757] WARN [http-443-Processor25] (JspViewHandlerImpl.java:394) - no faces servlet mappings found [02 Feb 2007 10:33:07,813] INFO [http-443-Processor25] (MyfacesConfig.java:133) - No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true [02 Feb 2007 10:33:07,815] INFO [http-443-Processor25] (MyfacesConfig.java:133) - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true [02 Feb 2007 10:33:07,818] INFO [http-443-Processor25] (MyfacesConfig.java:119) - Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now. [02 Feb 2007 10:33:12,544] ERROR [http-443-Processor24] (UIComponentTag.java:926) - Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml. [02 Feb 2007 10:33:12,553] ERROR [http-443-Processor24] (StandardWrapperValve.java:253) - Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java: 929) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310) at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70) at org.apache.jsp.login_jsp._jspx_meth_f_view_0(login_jsp.java:105) at org.apache.jsp.login_jsp._jspService(login_jsp.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97
Re: Session timeout during method execution
Did you know that you have programmatic control over the session timeout. Simply call the setMaxInactiveInterval method on the HttpSession object with a value in seconds. So if you know that a given request will take 10 minutes you can say: session.setMaxInactiveInterval(600); at the beginning of the request. Caveats: You will need to reset the inactive interval back to five minutes when the request has completed processing or this value will be used for the rest of that user's session. BTW, this method only alters the inactive interval *for this user*. Second caveat: Have you verified that the browser or server will not timeout during this long request cycle? HTH, Bryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating a custom session manager -- SOLVED
the org.apache.catalina.Manager interface. It simply delegates all calls to an instance of StandardManager and prints a message to System.out. Attached is the Tomcat config file that I am trying to use to configure my custom session manager. I am trying to use the DefaultContext tag to setup the manager on all webapps. Unfortunately, when I run a simple webapp (after restarting Tomcat, of course) I am not seeing any output in any log file (nor to the console) from my test manager. Is my configuration invalid? What am I missing? Sincere thanks, Bryan -- *StillSecure* Bryan Basham Senior Software Engineer (UI Development) F 303.381.3881 C 303.917.4546 www.stillsecure.com http://www.stillsecure.com /The information transmitted is intended only for the person to whom it is addressed and may contain confidential material. Review or other use of this information by persons other than the intended recipient is prohibited. If you've received this in error, please contact the sender and delete from any computer. / TestSharedSession.tar.gz Description: GNU Zip compressed data Jan 10, 2007 11:01:44 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.5.0_09/jre/lib/i386/client:/usr/local/jdk1.5.0_09/jre/lib/i386:/usr/local/jdk1.5.0_09/jre/../lib/i386 Jan 10, 2007 11:01:44 AM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 10, 2007 11:01:44 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 973 ms Jan 10, 2007 11:01:44 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 10, 2007 11:01:44 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.20 Jan 10, 2007 11:01:44 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Jan 10, 2007 11:01:45 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive session1.war Jan 10, 2007 11:01:45 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive session2.war Jan 10, 2007 11:01:45 AM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 10, 2007 11:01:46 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 10, 2007 11:01:46 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/24 config=null Jan 10, 2007 11:01:46 AM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Jan 10, 2007 11:01:46 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1964 ms com.example.tomcat.SharedSessionRequestValve[/session1] invoke() JSESSIONID is Cookiename=JSESSIONID value=F0DB5A591DDB2827F1C99A37A4CD7A2D domain=null path=null maxAge=-1 comment=null GLOBALID is Cookiename=GLOBALID value=F0DB5A591DDB2827F1C99A37A4CD7A2D domain=null path=null maxAge=-1 comment=null Throwing out a bad global ID. [EMAIL PROTECTED] findSession( F0DB5A591DDB2827F1C99A37A4CD7A2D ) = null [EMAIL PROTECTED] createSession( null ) = StandardSession[37474D89951F5C03E6B83AABC8A0F91F] Setting the GLOBALID to Cookiename=GLOBALID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=/ maxAge=-1 comment=null Associating globalID with StandardSession[37474D89951F5C03E6B83AABC8A0F91F] com.example.tomcat.SharedSessionRequestValve[/session1] invoke() JSESSIONID is Cookiename=JSESSIONID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null GLOBALID is Cookiename=GLOBALID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null Passing global ID to session manager. [EMAIL PROTECTED] findSession( 37474D89951F5C03E6B83AABC8A0F91F ) = StandardSession[37474D89951F5C03E6B83AABC8A0F91F] com.example.tomcat.SharedSessionRequestValve[/session1] invoke() JSESSIONID is Cookiename=JSESSIONID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null GLOBALID is Cookiename=GLOBALID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null Passing global ID to session manager. [EMAIL PROTECTED] findSession( 37474D89951F5C03E6B83AABC8A0F91F ) = StandardSession[37474D89951F5C03E6B83AABC8A0F91F] com.example.tomcat.SharedSessionRequestValve[/session1] invoke() JSESSIONID is Cookiename=JSESSIONID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null GLOBALID is Cookiename=GLOBALID value=37474D89951F5C03E6B83AABC8A0F91F domain=null path=null maxAge=-1 comment=null Passing global ID to session manager. [EMAIL PROTECTED] findSession( 37474D89951F5C03E6B83AABC8A0F91F ) = StandardSession[37474D89951F5C03E6B83AABC8A0F91F] com.example.tomcat.SharedSessionRequestValve
Re: Creating a custom session manager -- SOLVED
Oops... I had some bugs in the code. Here's the latest source. -Bryan/ / TestSharedSession.tar.gz Description: GNU Zip compressed data - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creating a custom session manager
Hello Tomcat users, I have a need that I believe Tomcat's pluggable session manager facility can satisfy, but I am having trouble getting it configured. BTW, I have googled and searched the mail archives on this topic and have not found anything useful yet. My application requires a modular architecture in which pluggable modules can be added a removed. We would like to use the web container's ability to deploy, undeploy, and redeploy WAR files as a means to install, uninstall, and upgrade the modules within our system. However, there is also a need to share session state between these modules which is not allowed in the servlet specification. I have researched a few solutions (such as using a Singleton in a common/lib/ package), but these solutions appear to require a non- trivial amount of infrastructure (and configuration of filters and/or session listeners) for every webapp. I would like to avoid all of that explicit infrastructure and hide the complexity by using a custom session manager. Before I proceed with my question, does anyone have any other suggestions for solving the above problem? OK, here is the test case that I am trying. I have created a very simple decorator which implements the org.apache.catalina.Manager interface. It simply delegates all calls to an instance of StandardManager and prints a message to System.out. Attached is the Tomcat config file that I am trying to use to configure my custom session manager. I am trying to use the DefaultContext tag to setup the manager on all webapps. Unfortunately, when I run a simple webapp (after restarting Tomcat, of course) I am not seeing any output in any log file (nor to the console) from my test manager. Is my configuration invalid? What am I missing? Sincere thanks, Bryan -- *StillSecure* Bryan Basham Senior Software Engineer (UI Development) F 303.381.3881 C 303.917.4546 www.stillsecure.com http://www.stillsecure.com /The information transmitted is intended only for the person to whom it is addressed and may contain confidential material. Review or other use of this information by persons other than the intended recipient is prohibited. If you've received this in error, please contact the sender and delete from any computer. / Server port=8005 shutdown=SHUTDOWN GlobalNamingResources !-- Used by Manager webapp -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 / !-- This is here for compatibility only, not required -- Connector port=8009 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=localhost appBase=webapps DefaultContext Manager className=com.example.tomcat.TestSessionManager / /DefaultContext /Host /Engine /Service /Server - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]