From: Vance K. <va...@us...> - 2006-01-20 17:15:43
|
User: vancek Date: 06/01/20 09:15:29 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: Resource annotation now uses mappedName parameter for ConnectionFactory, Queue and Topics Revision Changes Path 1.7 +5 -7 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.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- SessionBean.vsl 18 Jan 2006 09:38:04 -0000 1.6 +++ SessionBean.vsl 20 Jan 2006 17:15:27 -0000 1.7 @@ -124,16 +124,14 @@ #* *##set ($reference = $dependency.targetElement) #* *##if ($reference.destinationTypeQueue) #* *##if (!$queueConnectionFactoryDefined) -## NOTE: CHANGE TO USE mappedName - @javax.annotation.Resource(name = "ConnectionFactory", type = javax.jms.QueueConnectionFactory.class) + @javax.annotation.Resource(mappedName = "ConnectionFactory") protected javax.jms.QueueConnectionFactory queueFactory; #* *##set ($queueConnectionFactoryDefined = true) #* *##end #* *##elseif ($reference.destinationTypeTopic) #* *##if (!$topicConnectionFactoryDefined) -## NOTE: CHANGE TO USE mappedName - @javax.annotation.Resource(name = "ConnectionFactory", type = javax.jms.TopicConnectionFactory.class) + @javax.annotation.Resource(mappedName = "ConnectionFactory") protected javax.jms.TopicConnectionFactory topicFactory; #* *##set ($topicConnectionFactoryDefined = true) @@ -142,9 +140,9 @@ /** * Inject ${reference.destinationType} */ - @javax.annotation.Resource(name = "${reference.destination}", type = #if ($reference.destinationTypeQueue)javax.jms.Queue.class#elseif ($reference.destinationTypeTopic)javax.jms.Topic.class#end) + @javax.annotation.Resource(mappedName = "${reference.destination}") ## NOTE: CHANGE TO USE mappedName - protected #if ($reference.destinationTypeQueue)javax.jms.Queue#elseif ($reference.destinationTypeTopic)javax.jms.Topic#end $stringUtils.uncapitalize(${reference.name}); + protected javax.jms.Destination $stringUtils.uncapitalize(${reference.name}); #**##end #end #set ($constants = $service.getConstants(true)) |