Hello,
 
I need to have XDoclet generate multiple instances of the same MDB in the ejb-jar descriptor.
Below is the hand-coded version (2 of 6 shown).

 <message-driven>
   <ejb-name>TopicHandlerRegion1Mdb</ejb-name>
   <ejb-class>com.mycompany.common.ejb.mdb.generic.topichandler.TopicHandlerBean</ejb-class>
   <transaction-type>Container</transaction-type>
   <message-selector>MESSAGE_REGION=1</message-selector>
   <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>Durable</subscription-durability>
   </message-driven-destination>
  </message-driven>
 
  <message-driven>
   <ejb-name>TopicHandlerRegion2Mdb</ejb-name>
   <ejb-class>com.mycompany.common.ejb.mdb.generic.topichandler.TopicHandlerBean</ejb-class>
   <transaction-type>Container</transaction-type>
   <message-selector>MESSAGE_REGION=2</message-selector>
   <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>Durable</subscription-durability>
   </message-driven-destination>    
  </message-driven>
 
Notice the same ejb-class is used in each. This class is generically written so that separate classes are not needed. The message-selector is used to make the MDBs receive specifically identified messages. To make a long story short, this is to overcome message ordering issues that happen in a clustered Weblogic environment.
 
Since the MDBs are just multiple instances of the same class, I need to code the XDoclet tags in that
class so that the multiple instances are generated in the descriptor as shown above. I've tried things
like coding the tags twice, coding just the ejb-name and message-selector tags twice, etc but I can't get the multiple instances to appear in the descriptor.
 
Can anyone tell me if XDoclet supports generating multiple instances of an MDB in one descriptor ? If so, what
do I need to do to make this work ?
 
I looked thru the archives and saw entries on August 26, 2004 where a similar need was expressed by Sean Radford. At that time, it sounded like XDoclet did not support this and that inheritence or "merge-files" were alternatives. Before persuing those alternatives I decided to post another message on the forum in case anything has changed or anyone has solved similar problems since then.
 
Thanks for any help you can provide,
 
Tom Vicker

Reply via email to