[Bug 56339] New: session listener invalidate session
https://issues.apache.org/bugzilla/show_bug.cgi?id=56339 Bug ID: 56339 Summary: session listener invalidate session Product: Tomcat 7 Version: 7.0.47 Hardware: PC OS: Linux Status: NEW Severity: blocker Priority: P2 Component: Servlet & JSP API Assignee: dev@tomcat.apache.org Reporter: sivriso...@yahoo.com we have sessionlistener in sessionDestroyed method we call session.invalidate() in version 7.0.42 its ok but newer versions loops code public void sessionDestroyed(HttpSessionEvent arg0) { if(arg0 !=null && arg0.getSession() !=null) { HttpSession session = arg0.getSession(); String sessionId = session.getId(); if(sessionId != null) { UserPrincipal userPrincipal = (UserPrincipal)session.getAttribute(ContextVar.USERPRINCIPLE); if (userPrincipal != null) { UserOpBLO userOpBLO = new UserOpBLO(new ResourcePool()); userOpBLO.processLogoutActivity(sessionId, userPrincipal.getUserId()); CurrentSessions.SESSIONS.remove(sessionId); session.invalidate(); } } } } -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1583950 - in /tomcat/trunk: java/org/apache/coyote/http11/ java/org/apache/coyote/http11/upgrade/ test/org/apache/tomcat/websocket/ webapps/docs/
Author: remm Date: Wed Apr 2 09:59:14 2014 New Revision: 1583950 URL: http://svn.apache.org/r1583950 Log: - Handle incomplete writes as it is very easy to do, just in case (it never happens for me though). - Try again that SSL test. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java?rev=1583950&r1=1583949&r2=1583950&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java Wed Apr 2 09:59:14 2014 @@ -76,7 +76,7 @@ public class InternalNio2OutputBuffer ex /** * The completion handler used for asynchronous write operations */ -protected CompletionHandler> completionHandler; +protected CompletionHandler completionHandler; /** * The completion handler used for asynchronous write operations @@ -111,18 +111,20 @@ public class InternalNio2OutputBuffer ex this.socket = socketWrapper; this.endpoint = associatedEndpoint; -this.completionHandler = new CompletionHandler>() { +this.completionHandler = new CompletionHandler() { @Override -public void completed(Integer nBytes, SocketWrapper attachment) { +public void completed(Integer nBytes, ByteBuffer attachment) { boolean notify = false; synchronized (completionHandler) { if (nBytes.intValue() < 0) { failed(new EOFException(sm.getString("iob.failedwrite")), attachment); return; -} -if (bufferedWrites.size() > 0) { -// Continue writing data +} else if (bufferedWrites.size() > 0) { +// Continue writing data using a gathering write ArrayList arrayList = new ArrayList<>(); +if (attachment.hasRemaining()) { +arrayList.add(attachment); +} for (ByteBuffer buffer : bufferedWrites) { buffer.flip(); arrayList.add(buffer); @@ -130,9 +132,14 @@ public class InternalNio2OutputBuffer ex bufferedWrites.clear(); ByteBuffer[] array = arrayList.toArray(EMPTY_BUF_ARRAY); socket.getSocket().write(array, 0, array.length, -attachment.getTimeout(), TimeUnit.MILLISECONDS, +socket.getTimeout(), TimeUnit.MILLISECONDS, array, gatherCompletionHandler); +} else if (attachment.hasRemaining()) { +// Regular write +socket.getSocket().write(attachment, socket.getTimeout(), +TimeUnit.MILLISECONDS, attachment, completionHandler); } else { +// All data has been written if (interest && !Nio2Endpoint.isInline()) { interest = false; notify = true; @@ -141,13 +148,13 @@ public class InternalNio2OutputBuffer ex } } if (notify) { -endpoint.processSocket(attachment, SocketStatus.OPEN_WRITE, true); +endpoint.processSocket(socket, SocketStatus.OPEN_WRITE, true); } } @Override -public void failed(Throwable exc, SocketWrapper attachment) { -attachment.setError(true); +public void failed(Throwable exc, ByteBuffer attachment) { +socket.setError(true); if (exc instanceof IOException) { e = (IOException) exc; } else { @@ -155,7 +162,7 @@ public class InternalNio2OutputBuffer ex } response.getRequest().setAttribute(RequestDispatcher.ERROR_EXCEPTION, e); writePending.release(); -endpoint.processSocket(attachment, SocketStatus.OPEN_WRITE, true); +endpoint.processSocket(socket, SocketStatus.OPEN_WRITE, true); } }; this.gatherCompletionHandler = new CompletionHandler() { @@ -166,8 +173,7 @@ public class InternalNio2OutputBuffer ex
[Bug 56310] PooledConnection and XAConnection not handled correctly
https://issues.apache.org/bugzilla/show_bug.cgi?id=56310 --- Comment #2 from Jonathan Pierce --- Filip, Sorry for my delayed response. I believe you are correct that the tomcat-jdbc library need not directly expose the PooledConnection interface, as the interface is designed to only be used by connection pooling containers/libraries. However, my particular use case is with XADataSource and XAConnection. The XAConnection interface extends the PooledConnection interface, so I ran into the problem there. The expectation is that only special XA handling logic will use the XAConnection and when it is complete it will call XAConnection.getConnection() to acquire a Connection object, which gets passed to the standard JDBC logic. I do think it makes sense for the tomcat-jdbc library to expose the XA interfaces. So I think a fix may be in order, so that XAConnection.getConnection() returns a proxy on the physical connection (Connection interface) which when closed will return the the Connection to the pool. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5652 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1583950 Blamelist: remm BUILD FAILED: failed compile_1 sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1584002 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
Author: remm Date: Wed Apr 2 12:37:19 2014 New Revision: 1584002 URL: http://svn.apache.org/r1584002 Log: Still failed. Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1584002&r1=1584001&r2=1584002&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java Wed Apr 2 12:37:19 2014 @@ -46,6 +46,10 @@ public class TestWebSocketFrameClientSSL @Test public void testConnectToServerEndpoint() throws Exception { +Assume.assumeFalse( +"Skip this test on NIO2. FIXME: NIO2 SSL only issue.", +getTomcatInstance().getConnector().getProtocol() +.equals("org.apache.coyote.http11.Http11Nio2Protocol")); Tomcat tomcat = getTomcatInstance(); // Must have a real docBase - just use temp - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5653 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1584002 Blamelist: remm Build succeeded! sincerely, -The Buildbot
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #9 from Danila Galimov --- Created attachment 31467 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31467&action=edit StatementFinalizer patch -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #10 from Danila Galimov --- I've created an patch for StatementFinalizer class. It allows to print the creation stack, if configured in a way like jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer(logCreationStack=true)". Otherwise, it works almost the same way as original version. I think it may be useful to detect unclosed statements in the code. Please integrate it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56339] session listener invalidate session
https://issues.apache.org/bugzilla/show_bug.cgi?id=56339 --- Comment #1 from Christopher Schultz --- Why would you call session.invalidate() from SessionListener.sessionDestroyed? It's already in the process of being invalidated. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #11 from Christopher Schultz --- (In reply to Danila Galimov from comment #10) > I've created an patch for StatementFinalizer class. It allows to print the > creation stack, if configured in a way like > jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor. > StatementFinalizer(logCreationStack=true)". Otherwise, it works almost the > same way as original version. > I think it may be useful to detect unclosed statements in the code. Please > integrate it. How is this different than setting logAbandoned="true"? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56339] session listener invalidate session
https://issues.apache.org/bugzilla/show_bug.cgi?id=56339 Soner Sivri changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #2 from Soner Sivri --- The code is old code My Friend who wrote the code said there was A problem why he put it. He did not remember the problem. I understood that you said remove session.invalidate() -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #12 from Danila Galimov --- When logAbandoned is set to true, when connection is closed, but any statements are left unclosed, you'll get this message in the catalina.log and/or console (depends on the logger configuration): WARNING: Statement created, but was not closed java.lang.Throwable at org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer$StatementEntry.(StatementFinalizer.java:98) at org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer.createStatement(StatementFinalizer.java:46) at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:69) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41) at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109) at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80) at com.sun.proxy.$Proxy14.prepareCall(Unknown Source) at com.exigen.cm.database.ConnectionProviderImpl.findDialect(ConnectionProviderImpl.java:258) at com.exigen.cm.database.ConnectionProviderImpl.configure(ConnectionProviderImpl.java:191) at com.exigen.cm.impl.RepositoryConfiguration.checkFillConfiguration(RepositoryConfiguration.java:375) at com.exigen.cm.impl.RepositoryConfiguration.getRepositoryConfiguration(RepositoryConfiguration.java:238) at com.exigen.cm.impl.RepositoryProviderImpl.getRepository(RepositoryProviderImpl.java:42) at com.exigen.cm.impl.spring.LocalExigenJcrRepositoryBean.getObject(LocalExigenJcrRepositoryBean.java:74) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:305) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFact
[Bug 56318] Oracle DB cursors are leaking when using org.apache.tomcat.jdbc.pool.DataSourceFactory
https://issues.apache.org/bugzilla/show_bug.cgi?id=56318 --- Comment #13 from Christopher Schultz --- (In reply to Danila Galimov from comment #12) > When logAbandoned is set to true, when connection is closed, but any > statements are left unclosed, you'll get this message in the catalina.log > and/or console (depends on the logger configuration): > > WARNING: Statement created, but was not closed That's the general ideal, right? How does your patch do anything differently? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1584267 - in /tomcat/trunk: java/org/apache/catalina/ha/session/ClusterManagerBase.java java/org/apache/catalina/ha/session/DeltaManager.java webapps/docs/changelog.xml
Author: kfujino Date: Thu Apr 3 06:36:37 2014 New Revision: 1584267 URL: http://svn.apache.org/r1584267 Log: Remove cluster and replicationValve from cluster manager template. These instance are not necessary to template. Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=1584267&r1=1584266&r2=1584267&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java Thu Apr 3 06:36:37 2014 @@ -178,7 +178,6 @@ public abstract class ClusterManagerBase protected void clone(ClusterManagerBase copy) { copy.setName("Clone-from-" + getName()); -copy.setCluster(getCluster()); copy.setMaxActiveSessions(getMaxActiveSessions()); copy.setMaxInactiveInterval(getMaxInactiveInterval()); copy.setSessionIdLength(getSessionIdLength()); Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1584267&r1=1584266&r2=1584267&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu Apr 3 06:36:37 2014 @@ -1560,7 +1560,6 @@ public class DeltaManager extends Cluste public ClusterManager cloneFromTemplate() { DeltaManager result = new DeltaManager(); clone(result); -result.replicationValve = replicationValve; result.expireSessionsOnShutdown = expireSessionsOnShutdown; result.notifySessionListenersOnReplication = notifySessionListenersOnReplication; result.notifyContainerListenersOnReplication = notifyContainerListenersOnReplication; Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584267&r1=1584266&r2=1584267&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 3 06:36:37 2014 @@ -95,6 +95,10 @@ LifecycleListener, it works as nested components of Host or Engine. (kfujino) + +Remove cluster and replicationValve from cluster manager template. These +instance are not necessary to template. (kfujino) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1584268 - in /tomcat/trunk: java/org/apache/catalina/ha/session/ClusterManagerBase.java java/org/apache/catalina/ha/session/DeltaManager.java java/org/apache/catalina/ha/session/DeltaSess
Author: kfujino Date: Thu Apr 3 06:53:51 2014 New Revision: 1584268 URL: http://svn.apache.org/r1584268 Log: Add support for cross context session replication to BackupManager. Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=1584268&r1=1584267&r2=1584268&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java Thu Apr 3 06:53:51 2014 @@ -21,14 +21,22 @@ import java.io.IOException; import java.util.regex.Pattern; import org.apache.catalina.Context; +import org.apache.catalina.LifecycleException; import org.apache.catalina.Loader; +import org.apache.catalina.Valve; +import org.apache.catalina.core.StandardContext; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterManager; +import org.apache.catalina.ha.tcp.ReplicationValve; import org.apache.catalina.session.ManagerBase; import org.apache.catalina.tribes.io.ReplicationStream; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; public abstract class ClusterManagerBase extends ManagerBase implements ClusterManager { +private final Log log = LogFactory.getLog(ClusterManagerBase.class); + /** * A reference to the cluster */ @@ -53,6 +61,11 @@ public abstract class ClusterManagerBase */ private Pattern sessionAttributePattern = null; +/** + * cached replication valve cluster container! + */ +private volatile ReplicationValve replicationValve = null ; + /* * @see org.apache.catalina.ha.ClusterManager#getCluster() */ @@ -189,4 +202,39 @@ public abstract class ClusterManagerBase copy.setSecureRandomAlgorithm(getSecureRandomAlgorithm()); } +/** + * Register cross context session at replication valve thread local + * @param session cross context session + */ +protected void registerSessionAtReplicationValve(DeltaSession session) { +if(replicationValve == null) { +Context context = getContext(); +if(context instanceof StandardContext && +((StandardContext)context).getCrossContext()) { +CatalinaCluster cluster = getCluster() ; +if(cluster != null) { +Valve[] valves = cluster.getValves(); +if(valves != null && valves.length > 0) { +for(int i=0; replicationValve == null && i < valves.length ; i++ ){ +if(valves[i] instanceof ReplicationValve) replicationValve = +(ReplicationValve)valves[i] ; +}//for + +if(replicationValve == null && log.isDebugEnabled()) { +log.debug("no ReplicationValve found for CrossContext Support"); +}//endif +}//end if +}//endif +}//end if +}//end if +if(replicationValve != null) { +replicationValve.registerReplicationSession(session); +} +} + +@Override +protected void stopInternal() throws LifecycleException { +replicationValve = null; +super.stopInternal(); +} } Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1584268&r1=1584267&r2=1584268&view=diff == --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu Apr 3 06:53:51 2014 @@ -33,12 +33,9 @@ import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.catalina.Session; -import org.apache.catalina.Valve; -import org.apache.catalina.core.StandardContext; import org.apache.catalina.ha.CatalinaCluster; import org.apache.catalina.ha.ClusterManager; import org.apache.catalina.ha.ClusterMessage; -import org.apache.catalina.ha.tcp.ReplicationValve; import org.apache.catalina.session.ManagerBase; import org.apache.catalina.tribes.Member; import org.apache.catalina.tribes.io.ReplicationStream; @@ -79,11 +76,6 @@ public class DeltaManager extends Cluste protected static final String manage