You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "L.J.W (JIRA)" <ji...@apache.org> on 2012/09/04 08:21:07 UTC
[jira] [Created] (ZOOKEEPER-1545) very odd issue about zookeeper
when deploy two web application in one tomcat
L.J.W created ZOOKEEPER-1545:
--------------------------------
Summary: very odd issue about zookeeper when deploy two web application in one tomcat
Key: ZOOKEEPER-1545
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1545
Project: ZooKeeper
Issue Type: Bug
Components: java client
Affects Versions: 3.4.3
Environment: OS:windows 7 32
zookeeper 3.4.3
tomcat 7.0.29
Reporter: L.J.W
if I deploy two application(both use zookeeper) to same tomcat,zookeeper in one app will inexplicable disconnect when tomcat startup.
following is my code,it is very simple:
public class ZKTester implements InitializingBean, Watcher {
private ZooKeeper hZooKeeper;
public void afterPropertiesSet() throws Exception {
hZooKeeper = new ZooKeeper("localhost:2181", 300000, this);
}
public void process(WatchedEvent event) {
System.out.println("**************" + event);
}
and the spring config file:
<bean id="zooTester" class="com.abc.framework.cluster.ZKTester"/>
And following is tomcat's startup log:
...
**************WatchedEvent state:Disconnected type:None path:null
**************WatchedEvent state:Expired type:None path:null
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira