From: Vance K. <va...@us...> - 2006-03-14 06:10:53
|
User: vancek Date: 06/03/13 22:10:48 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: added @org.jboss.annotation.ejb.Clustered annotation if bean is marked as such. if stateful session bean, then implements Serializable. if stateful session bean, then add method with @Remove annotation. Revision Changes Path 1.23 +23 -17 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl Index: SessionBean.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -r1.22 -r1.23 --- SessionBean.vsl 9 Mar 2006 04:31:23 -0000 1.22 +++ SessionBean.vsl 14 Mar 2006 06:10:47 -0000 1.23 @@ -8,14 +8,17 @@ /** * Autogenerated EJB session bean class ${service.serviceName}. +#if ($service.stateful) + * + * ${service.serviceName} is a stateful session bean and implements Serializable to maintain + * state when bean instance not in use. +#end * $service.getDocumentation(" * ") */ - // Do not specify the javax.ejb.${service.type} annotation // Instead, define the session bean in the ejb-jar.xml descriptor // @javax.ejb.${service.type} - #if ($service.transactionManagement) @javax.ejb.TransactionManagement(javax.ejb.TransactionManagementType.${service.transactionManagement}) #end @@ -48,7 +51,9 @@ #if ($service.viewTypeRemote) @javax.ejb.Remote({${service.fullyQualifiedServiceRemoteInterfaceName}.class}) #end - +#if ($service.clusteringEnabled) +...@or...ustered +#end #set ($interceptors = $service.interceptorReferences) #if ($collectionUtils.size($interceptors) >= 1 || $service.listenerEnabled) #**##if ($service.listenerEnabled) @@ -62,12 +67,11 @@ #if ($service.excludeDefaultInterceptors) // @javax.ejb.ExcludeDefaultInterceptors #end - public abstract class ${service.serviceName} #if($service.generalization) extends ${service.generalization.fullyQualifiedName}BeanImpl #end - implements#if ($service.viewTypeLocal) ${service.fullyQualifiedServiceLocalInterfaceName}#if ($service.viewTypeRemote),#end#end#if ($service.viewTypeRemote) ${service.fullyQualifiedServiceRemoteInterfaceName}#end + implements#if ($service.viewTypeLocal) ${service.fullyQualifiedServiceLocalInterfaceName}#if ($service.viewTypeRemote),#end#end#if ($service.viewTypeRemote) ${service.fullyQualifiedServiceRemoteInterfaceName}#end#if ($service.stateful), java.io.Serializable#end { // ------ Session Context Injection ------ @@ -417,11 +421,12 @@ #* *##end #**##end #end +#if ($service.stateful) - // ------------ Generic Methods ------------ + // ------------ Remove Method ------------ /** - * Generic remove method + * Remove lifecycle method */ @javax.ejb.Remove public void remove() { @@ -432,4 +437,5 @@ * Performs the core logic for {@link #remove()) */ protected abstract void handleRemove(); +#end } \ No newline at end of file |