From: Vance K. <va...@us...> - 2006-03-09 04:31:23
|
User: vancek Date: 06/03/08 20:31:23 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: moved class and method level interceptor definitions and default interceptor definition to ejb-jar descriptor Revision Changes Path 1.22 +19 -13 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.21 retrieving revision 1.22 diff -u -w -r1.21 -r1.22 --- SessionBean.vsl 7 Mar 2006 09:16:53 -0000 1.21 +++ SessionBean.vsl 9 Mar 2006 04:31:23 -0000 1.22 @@ -11,11 +11,11 @@ * $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} - */ + +// 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,18 +48,21 @@ #if ($service.viewTypeRemote) @javax.ejb.Remote({${service.fullyQualifiedServiceRemoteInterfaceName}.class}) #end -## -## Service listener - lifecycle callbacks is defined as an interceptor -## + #set ($interceptors = $service.interceptorReferences) #if ($collectionUtils.size($interceptors) >= 1 || $service.listenerEnabled) #**##if ($service.listenerEnabled) #* *##set ($lifecycleCallback = "${service.fullyQualifiedServiceListenerName}.class") #**##else -#* *##set ($lifecycleCallback = "null") +#* *##set ($lifecycleCallback = "") #**##end -...@ja...erceptors({$transform.getInterceptorsAsList(${interceptors}, ${lifecycleCallback})}) +// Lifecycle callback listeners and interceptors are defined in ejb-jar.xml +// @javax.ejb.Interceptors({$transform.getInterceptorsAsList(${interceptors}, ${lifecycleCallback})}) #end +#if ($service.excludeDefaultInterceptors) +// @javax.ejb.ExcludeDefaultInterceptors +#end + public abstract class ${service.serviceName} #if($service.generalization) extends ${service.generalization.fullyQualifiedName}BeanImpl @@ -306,13 +309,16 @@ #* *##end #* *##set ($interceptors = $operation.interceptorReferences) #* *##if ($collectionUtils.size($interceptors) >= 1) - @javax.ejb.Interceptors({$transform.getInterceptorsAsList(${interceptors}, null)}) + // Interceptors are defined in ejb-jar.xml + // @javax.ejb.Interceptors({$transform.getInterceptorsAsList(${interceptors}, "")}) #* *##end #* *##if ($operation.excludeDefaultInterceptors) - @javax.ejb.ExcludeDefaultInterceptors + // Interceptor default exclusions are defined in ejb-jar.xml + // @javax.ejb.ExcludeDefaultInterceptors #* *##end #* *##if ($operation.excludeClassInterceptors) - @javax.ejb.ExcludeClassInterceptors + // Interceptor class exclusions are defined in ejb-jar.xm + // @javax.ejb.ExcludeClassInterceptors #* *##end $operation.visibility $operation.returnType.fullyQualifiedName $operation.signature #* *##if ($operation.exceptionsPresent) |