0

My own Monitor class dosnt work

asked 2012-05-10 08:56:50 +0800

soulama gravatar image soulama
45

Hi,

i have to implement a Monitor class for my ZK app.
My imp for the Monitor interface is:
public class RPMonitor implements Monitor {

public void sessionCreated( Session sess ) {
System.out.println( " Session created." );
}

public void sessionDestroyed(Session sess) {
System.out.println( " Session destoyed." );
}

public void desktopCreated(Desktop desktop) {

}

public void desktopDestroyed(Desktop desktop) {

}

public void beforeUpdate(Desktop desktop, List requests) {

}

public void afterUpdate(Desktop desktop) {

}

}


i put also this info in the web.xml
<listener>
<description>Listener to monitor Session</description>
<listener-class>com.XXX.RPMonitor</listener-class>
</listener>

When i start my app, the RPMonitor class is not executed.
what is wrong in my code.
Please help
Thanks

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-05-11 02:50:13 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

have you tried to load a page first?

link publish delete flag offensive edit

answered 2012-05-11 06:53:44 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

Monitors are ZK-specific components that should be registered in zk.xml, not web.xml. Web.xml supports only Java Servlet API -specific listeners.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-05-10 08:56:50 +0800

Seen: 130 times

Last updated: May 11 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More