From: Vance K. <va...@us...> - 2006-03-09 04:29:26
|
User: vancek Date: 06/03/08 20:29:25 Modified: andromda-ejb3/src/main/resources/templates/ejb3 MessageDrivenBean.vsl Log: interceptor definition and default interceptor exclusion moved to ejb-jar descriptor Revision Changes Path 1.11 +31 -22 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/MessageDrivenBean.vsl Index: MessageDrivenBean.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/MessageDrivenBean.vsl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- MessageDrivenBean.vsl 2 Mar 2006 10:15:42 -0000 1.10 +++ MessageDrivenBean.vsl 9 Mar 2006 04:29:25 -0000 1.11 @@ -11,34 +11,43 @@ $mdb.getDocumentation(" * ") */ -/** - * The MessageDriven annotation is now fully configured in ejb-jar.xml - * This allows to set the class name to the MDB implementation class - * The annotation is commented to avoid multiple registration with the - * container. - * - * javax.ejb.MessageDriven(activationConfig = - *{ - * @javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="${mdb.destinationType}"), - * @javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="${mdb.destination}")#if ($mdb.acknowledgeMode || $mdb.messageSelector || $mdb.subscriptionDurability),#end - * +// The MessageDriven annotation is now fully configured in ejb-jar.xml +// This allows to set the class name to the MDB implementation class +// The annotation is commented to avoid multiple registration with the +// container. +// @javax.ejb.MessageDriven(activationConfig = +// { +// @javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="${mdb.destinationType}"), +// @javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="${mdb.destination}")#if ($mdb.acknowledgeMode || $mdb.messageSelector || $mdb.subscriptionDurability),#end +// #if ($mdb.acknowledgeMode) - * @javax.ejb.ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="${mdb.acknowledgeMode}")#if ($mdb.messageSelector || $mdb.subscriptionDurability),#end - * +// @javax.ejb.ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="${mdb.acknowledgeMode}")#if ($mdb.messageSelector || $mdb.subscriptionDurability),#end +// #end #if ($mdb.messageSelector) - * @javax.ejb.ActivationConfigProperty(propertyName="messageSelector", propertyValue="${mdb.messageSelector}")#if ($mdb.subscriptionDurability),#end - * +// @javax.ejb.ActivationConfigProperty(propertyName="messageSelector", propertyValue="${mdb.messageSelector}")#if ($mdb.subscriptionDurability),#end +// #end #if ($mdb.subscriptionDurability) - * @javax.ejb.ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="${mdb.subscriptionDurability}") +// @javax.ejb.ActivationConfigProperty(propertyName="subscriptionDurability", propertyValue="${mdb.subscriptionDurability}") #end - *} - *) - */ -#if ($mdb.listenerEnabled) -...@ja...llbackListener(${mdb.fullyQualifiedMessageDrivenListenerName}.class) +//} +//) + +#set ($interceptors = $mdb.interceptorReferences) +#if ($collectionUtils.size($interceptors) >= 1 || $mdb.listenerEnabled) +#**##if ($mdb.listenerEnabled) +#* *##set ($lifecycleCallback = "${mdb.fullyQualifiedMessageDrivenListenerName}.class") +#**##else +#* *##set ($lifecycleCallback = "") +#**##end +// 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 + #if ($mdb.transactionManagement) @javax.ejb.TransactionManagement(javax.ejb.TransactionManagementType.${mdb.transactionManagement}) #end |