From: Vance K. <va...@us...> - 2006-01-03 01:06:19
|
User: vancek Date: 06/01/02 17:06:00 Added: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: initial revision Revision Changes Path 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionListener.vsl Index: SessionListener.vsl =================================================================== // license-header java merge-point #if ($stringUtils.isNotBlank($service.packageName)) package $service.packageName; #end /** * Callback Listener for Session bean ${service.fullyQualifiedName} * * @see ${service.fullyQualifiedName} */ public class ${service.serviceListenerName} { /** * Default public no-args constructor */ public ${service.serviceListenerName}() { } @javax.ejb.PostConstruct public void postConstruct(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { // post construct implementation } @javax.ejb.PostActivate public void postActivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { // post construct implementation } @javax.ejb.PrePassivate public void prePassivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { // pre passivate implementation } @javax.ejb.PreDestroy public void preDestroy(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { // pre destroy implementation } @javax.ejb.Remove public void remove(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { // remove implementation } } |
From: Vance K. <va...@us...> - 2006-02-06 03:24:27
|
User: vancek Date: 06/02/05 19:24:19 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: changed lifecycle callback method arg to InvocationContext moved 'remove' method with @Remove annotation to entity Revision Changes Path 1.3 +4 -9 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.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- SessionListener.vsl 17 Jan 2006 03:14:41 -0000 1.2 +++ SessionListener.vsl 6 Feb 2006 03:24:19 -0000 1.3 @@ -19,31 +19,26 @@ } @javax.ejb.PostConstruct - public void postConstruct(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void postConstruct(javax.ejb.InvocationContext ctx) { // post construct implementation } @javax.ejb.PostActivate - public void postActivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void postActivate(javax.ejb.InvocationContext ctx) { // post construct implementation } @javax.ejb.PrePassivate - public void prePassivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void prePassivate(javax.ejb.InvocationContext ctx) { // pre passivate implementation } @javax.ejb.PreDestroy - public void preDestroy(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void preDestroy(javax.ejb.InvocationContext ctx) { // pre destroy implementation } - - @javax.ejb.Remove - public void remove(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { - // remove implementation - } } |
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 } |
From: Vance K. <va...@us...> - 2006-03-09 04:32:06
|
User: vancek Date: 06/03/08 20:32:04 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: fixed exception Revision Changes Path 1.5 +4 -4 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.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- SessionListener.vsl 2 Mar 2006 10:26:09 -0000 1.4 +++ SessionListener.vsl 9 Mar 2006 04:32:03 -0000 1.5 @@ -29,7 +29,7 @@ } catch (Exception ex) { - throw new RuntimeException(e); + throw new RuntimeException(ex); } } @@ -43,7 +43,7 @@ } catch (Exception ex) { - throw new RuntimeException(e); + throw new RuntimeException(ex); } } #if ($service.stateful) @@ -58,7 +58,7 @@ } catch (Exception ex) { - throw new RuntimeException(e); + throw new RuntimeException(ex); } } @@ -72,7 +72,7 @@ } catch (Exception ex) { - throw new RuntimeException(e); + throw new RuntimeException(ex); } } #end |
From: Vance K. <va...@us...> - 2006-04-11 15:44:25
|
User: vancek Date: 06/04/11 08:44:24 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: changed package locations for PostConstruct and PreDestroy to javax.annotation Revision Changes Path 1.6 +2 -2 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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- SessionListener.vsl 9 Mar 2006 04:32:03 -0000 1.5 +++ SessionListener.vsl 11 Apr 2006 15:44:24 -0000 1.6 @@ -19,7 +19,7 @@ // empty constructor } - @javax.ejb.PostConstruct + @javax.annotation.PostConstruct public void postConstruct(javax.ejb.InvocationContext ctx) { try @@ -33,7 +33,7 @@ } } - @javax.ejb.PreDestroy + @javax.annotation.PreDestroy public void preDestroy(javax.ejb.InvocationContext ctx) { try |