Patches item #626646, was opened at 2002-10-22 01:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=626646&group_id=22866

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rakesh Krishnan (raksk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for Failover with Sticky Sessions

Initial Comment:
This patch is for JBoss-3.0.3_Tomcat-4.0.5 (should work 
with Tomcat4.1.12 as well) .

Servers S1 & S2 use sticky sessions + session 
replication & have distributed apps deployed on them.
Kill S1, try to continue in the same session -> 
loadbalancer redirects to S2, S2 gives 
NullPointerException  (see below )

When using sticky sessions (with jvmRoute appended 
to JSESSIONID) , failover was not happening because 
responseThreadLocal.get() was returning null -> since 
the server on which the thread existed had died. Added 
code which checks whether a response object exists 
and addCookie() only if it exists.Also works for condition 
where the 'dead' server is back 'live' and has re-joined 
the cluster.
Iam basically ignoring the pass where 
responseThreadLocal.get() returns null, if there was a 
way to 'revive' a new response in the same pass that 
would have been better.

Here's the exception : 

2002-10-14 14:40:21,642 DEBUG 
[org.jboss.web.catalina.EmbeddedCatalinaServiceSX] 
Looking for sessions that have expired
2002-10-14 14:40:57,093 DEBUG 
[org.jboss.web.catalina.EmbeddedCatalinaServiceSX] 
Looking for session with 
id=NsLuDM0DMSL+MeuDgdt3Vg**.tomcat1
2002-10-14 14:40:57,103 DEBUG 
[org.jboss.ha.httpsession.server.ClusteredHTTPSession
Service] getHttpSession called for session: 
NsLuDM0DMSL+MeuDgdt3Vg**.tomcat1
2002-10-14 14:40:58,014 DEBUG 
[org.jboss.ha.httpsession.server.ClusteredHTTPSession
Service] removeHttpSession called for session: 
NsLuDM0DMSL+MeuDgdt3Vg**.tomcat1
2002-10-14 14:40:58,024 DEBUG 
[org.javagroups.DefaultPartition] [Mon Oct 14 14:40:58 
PDT 2002] [INFO] NAKACK.send(): sending msg #1
2002-10-14 14:40:58,024 DEBUG 
[org.javagroups.DefaultPartition] [Mon Oct 14 14:40:58 
PDT 2002] [INFO] STABLE.startStableTask(): stable 
task started; num_gossip_runs=3, max_gossip_runs=3
2002-10-14 14:40:58,024 DEBUG 
[org.jboss.ha.httpsession.server.ClusteredHTTPSession
Service] removeHttpSession called for session: 
NsLuDM0DMSL+MeuDgdt3Vg**.tomcat1
2002-10-14 14:40:58,024 ERROR 
[org.jboss.ejb.plugins.LogInterceptor] EJBException, 
causedBy:
java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(Unknown Source)
at 
org.jboss.ejb.plugins.CMPClusteredInMemoryPersistenc
eManager.loadEntity
(CMPClusteredInMemoryPersistenceManager.java:352)
at 
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntit
y(CMPPersistenceManager.java:410)
at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.inv
oke(EntitySynchronizationInterceptor.java:262)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke
(EntityInstanceInterceptor.java:152)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke
(EntityLockInterceptor.java:107)
at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:203)
at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:493)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:1058)
at org.jboss.mx.server.MBeanServerImpl.invoke
(MBeanServerImpl.java:517)
at org.jboss.invocation.local.LocalInvoker.invoke
(LocalInvoker.java:98)
at org.jboss.invocation.InvokerInterceptor.invoke
(InvokerInterceptor.java:102)
at org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:77)
at org.jboss.proxy.ejb.HomeInterceptor.invoke
(HomeInterceptor.java:189)
at org.jboss.proxy.ClientContainer.invoke
(ClientContainer.java:76)
at $Proxy15.remove(Unknown Source)
at 
org.jboss.ha.httpsession.server.ClusteredHTTPSessionS
ervice.removeHttpSession
(ClusteredHTTPSessionService.java:153)
at java.lang.reflect.Method.invoke(Native Method)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invok
e(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke
(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke
(MBeanProxy.java:174)
at $Proxy232.removeHttpSession(Unknown Source)
at 
org.jboss.web.catalina.session.ClusterManager.removeS
ession(ClusterManager.java:496)
at 
org.jboss.web.catalina.session.ClusterManager.remove
(ClusterManager.java:277)
at 
org.jboss.web.catalina.session.ClusteredSession.setId
(ClusteredSession.java:348)
at 
org.jboss.web.catalina.session.ClusterManager.findSessi
on(ClusterManager.java:209)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:173)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke
(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process
(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run
(Ajp13Processor.java:551)
at java.lang.Thread.run(Unknown Source)


  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=626646&group_id=22866


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of  Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4699841;7576298;k?http://www.sun.com/javavote
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to