RE: HttpSession Replication in Tomcat Cluster not working with EJ B's!
Filip, You were right. It's works with the handle. Thanx for all the co-operation. cheers Suraj -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, March 27, 2004 5:51 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! I think you need to store the EJBHandle, not the actual bean that you are referencing. is that what you are doing? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 4:20 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Andy, I agree with your point about a SFSB being an extension of a client. But then, if I store the 'state' alone in the httpsession and update the state by using a new SFSB everytime, the whole concept of SFSB's are lost. I would rather use a stateless session bean and use httpsession for persisting my conversational state. (I know this line of thinking against use of SFSB has been advocated many a times and is a different discussion altogether) I beleive what ur suggesting to be a workaround and is not an acceptable solution. My design requirement requires a SFSB and I need servlets to invoke my SFSB. I will also need to cluster the TC5 servers. Passing the reference within the servlet and between method calls is the only way to hold a handle and interact with a single instance of a SFSB. If I use a JBOSS 3.2.3 server which comes bundled with TC then JBOSS takes care of my httpSession sharing between the various JBOSS servers in the cluster. (JBOSS has a different mechanism for httpSession sharing). But I would like to have a multitier cluster with seperate TC clusters and seperate JBOSS clusters. So the end question would be if TC 5.0.18 has the capability to handle such a scenario or not. cheers Suraj -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 4:42 PM To: '[EMAIL PROTECTED]' Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your "Client extension" across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error "ClassNotFoundException while loading persisted sessions". I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache
RE: HttpSession Replication in Tomcat Cluster not working with EJ B's!
I think you need to store the EJBHandle, not the actual bean that you are referencing. is that what you are doing? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 4:20 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Andy, I agree with your point about a SFSB being an extension of a client. But then, if I store the 'state' alone in the httpsession and update the state by using a new SFSB everytime, the whole concept of SFSB's are lost. I would rather use a stateless session bean and use httpsession for persisting my conversational state. (I know this line of thinking against use of SFSB has been advocated many a times and is a different discussion altogether) I beleive what ur suggesting to be a workaround and is not an acceptable solution. My design requirement requires a SFSB and I need servlets to invoke my SFSB. I will also need to cluster the TC5 servers. Passing the reference within the servlet and between method calls is the only way to hold a handle and interact with a single instance of a SFSB. If I use a JBOSS 3.2.3 server which comes bundled with TC then JBOSS takes care of my httpSession sharing between the various JBOSS servers in the cluster. (JBOSS has a different mechanism for httpSession sharing). But I would like to have a multitier cluster with seperate TC clusters and seperate JBOSS clusters. So the end question would be if TC 5.0.18 has the capability to handle such a scenario or not. cheers Suraj -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 4:42 PM To: '[EMAIL PROTECTED]' Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your "Client extension" across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error "ClassNotFoundException while loading persisted sessions". I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.c
RE: HttpSession Replication in Tomcat Cluster not working with EJ B's!
Andy, I agree with your point about a SFSB being an extension of a client. But then, if I store the 'state' alone in the httpsession and update the state by using a new SFSB everytime, the whole concept of SFSB's are lost. I would rather use a stateless session bean and use httpsession for persisting my conversational state. (I know this line of thinking against use of SFSB has been advocated many a times and is a different discussion altogether) I beleive what ur suggesting to be a workaround and is not an acceptable solution. My design requirement requires a SFSB and I need servlets to invoke my SFSB. I will also need to cluster the TC5 servers. Passing the reference within the servlet and between method calls is the only way to hold a handle and interact with a single instance of a SFSB. If I use a JBOSS 3.2.3 server which comes bundled with TC then JBOSS takes care of my httpSession sharing between the various JBOSS servers in the cluster. (JBOSS has a different mechanism for httpSession sharing). But I would like to have a multitier cluster with seperate TC clusters and seperate JBOSS clusters. So the end question would be if TC 5.0.18 has the capability to handle such a scenario or not. cheers Suraj -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 4:42 PM To: '[EMAIL PROTECTED]' Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your "Client extension" across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error "ClassNotFoundException while loading persisted sessions". I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:400 1,10.5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configurati
RE: HttpSession Replication in Tomcat Cluster not working with EJ B's!
Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your "Client extension" across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error "ClassNotFoundException while loading persisted sessions". I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:400 1,10.5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\admin.xml Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\balancer.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\manager.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /TestWeb from URL file:C:/Tomcat5/webapps/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager doLoad SEVERE: ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLo ader.java: