0

Fire event when session is created

asked 2012-02-24 10:36:02 +0800

dagarwal82 gravatar image dagarwal82
246 4

Hi All,

I am using ofbiz + zk. I want to be able to fire an event through EventQueue when a session is crated.

I tried by extending HttpSessionListener but that doesn't work as Executions.getCurrent() is null at that time.

Any other way ???

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest
link publish delete flag offensive edit

answered 2012-02-26 10:56:09 +0800

afxgroup gravatar image afxgroup
126 2

You should try something like:


ServletContext servletContext = ((HttpSession)session.getNativeSession()).getServletContext();
WebApp webApp = WebManager.getWebApp(servletContext );
EventQueue que = EventQueues.lookup("channel", webApp, true);

where "session" is the first argument of init()

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-02-24 10:36:02 +0800

Seen: 120 times

Last updated: Feb 26 '12

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