Seitenhistorie
...
Codeblock | ||||
---|---|---|---|---|
| ||||
public class MyUpdateRule implements UpdateRule, StateChangeFinalRule { //definition of thread local variable public static final ThreadLocal<Boolean> ACTIVE = new ThreadLocal<Boolean>() { protected Boolean initialValue() {return Boolean.TRUE;}; }; public void update(UpdateContext context) throws BusinessException { //check if rule is active or not (in the running thread) if (ACTIVE.get()) { MyBusinessObject mbo = context.getBusinessObject(MyBusinessObject.class); ... } } } |
...
Überblick
Inhalte