From: Vance K. <va...@us...> - 2006-03-02 10:26:11
|
User: vancek Date: 06/03/02 02:26:10 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: the postActivate and prePassivate callback operations are only specified on stateful session beans. lifecycle callback operations invoke context.proceed() to continue the chain of interceptors. Revision Changes Path 1.4 +58 -23 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionListener.vsl Index: SessionListener.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionListener.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- SessionListener.vsl 6 Feb 2006 03:24:19 -0000 1.3 +++ SessionListener.vsl 2 Mar 2006 10:26:09 -0000 1.4 @@ -16,29 +16,64 @@ */ public ${service.serviceListenerName}() { + // empty constructor } @javax.ejb.PostConstruct public void postConstruct(javax.ejb.InvocationContext ctx) { + try + { // post construct implementation + ctx.proceed(); + } + catch (Exception ex) + { + throw new RuntimeException(e); + } + } + + @javax.ejb.PreDestroy + public void preDestroy(javax.ejb.InvocationContext ctx) + { + try + { + // pre destroy implementation + ctx.proceed(); + } + catch (Exception ex) + { + throw new RuntimeException(e); + } } +#if ($service.stateful) @javax.ejb.PostActivate public void postActivate(javax.ejb.InvocationContext ctx) { + try + { // post construct implementation + ctx.proceed(); + } + catch (Exception ex) + { + throw new RuntimeException(e); + } } @javax.ejb.PrePassivate public void prePassivate(javax.ejb.InvocationContext ctx) { + try + { // pre passivate implementation + ctx.proceed(); } - - @javax.ejb.PreDestroy - public void preDestroy(javax.ejb.InvocationContext ctx) + catch (Exception ex) { - // pre destroy implementation + throw new RuntimeException(e); + } } +#end } |