Description
We registred a listener which implement ExecutionCleanup and ExecutionInit. Our implementation is similar to OpenEntityManagerInViewListener, but it start and stop UnitOfWork instance from Guice library.
Next we had 2 zul scripts:
a.zul
<?forward uri="/b.zul"?>
<zk></zk>
b.zul
<zk>...</zk>
When a.zul was executed, ExecutionInit.init was called twice but ExecutionCleanup.cleanup only once for eg:
init: exec=[Exec3676128: [Desktop z_8p2:/a.zul]], parent=null init: exec=[Exec4338603: [Desktop z_8p2:/a.zul]], parent=[Exec3676128: [Desktop z_8p2:/a.zul]] cleanup: exec=[Exec4338603: [Desktop z_8p2:/a.zul]], parent=[Exec3676128: [Desktop z_8p2:/a.zul]], errs=[]
My problem is similar to OpenEntityManagerInViewListener https://github.com/zkoss/zk/blob/master/zkplus/src/org/zkoss/zkplus/jpa/OpenEntityManagerInViewListener.java#L46, where EntityManager is closed only if parent is null.