[jboss-user] [JBoss jBPM] - static variable in actionhandler

AJanz do-not-reply at jboss.com
Tue Aug 26 05:14:08 EDT 2008

i got a simple actionhandler with  a static int var. this should be a counter, so every time the actionhandler is called the counter should be incremented.

but it remains zero. is the class completely unloaded after calling?

code is

  | public class MyHandler implements ActionHandler {
  | 	static int counter=0;
  | 	public void execute(ExecutionContext arg0) throws Exception {
  |                     counter++;
  |                   System.out.println("Counter:" + counter);
  | 	}
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172514#4172514

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172514

More information about the jboss-user mailing list