In the name of the bean use ant variable
substitution: @ejb.bean name=”Strategy_Mdb_${strategy.num}” @jboss.destination-jndi-name
name="queue/StrategyQ_${strategy.num}”
And just call XDoclet 10 times with
different values for the variables.
--bill
-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Eramo
Sent: Friday, December 02, 2005
2:08 PM
To:
xdoclet-user@lists.sourceforge.net
Subject: [Xdoclet-user] Trying to
define multiple ejb names in 1 xdoclet tag
Hi,
I have a question, one of our developers has a need to create multiple
EJB's for message queues, 10 in all.
The
easiest way to do this would be to have 10 class files with a different ejb
name defined in each but logistically, that is impractical because any code
change needs to be made in all 10 class files.
We
thought that we might be able to define multiple ejb names in the xdoclet tag
in the java class however when we try this and run the build, it only builds
the first ejb.
Is
there a way to do this in the xdoclet tag so as we can define 10 ejb names and
have the Ant build produce 10 different MDB's?
Here
is what we tried, but only got the first ejb.
/**
*
The Strategy Message Drive Bean.
*
*
@ejb.bean name="Strategy_Mdb_0"
*
acknowledge-mode="Auto-acknowledge"
*
destination-type="javax.jms.Queue"
*
subscription-durability="NonDurable"
*
transaction-type="Container"
*
@jboss.destination-jndi-name name="queue/StrategyQ_0"
*
@ejb.transaction type="NotSupported"
*
*
@ejb.bean name="Strategy_Mdb_1"
*
acknowledge-mode="Auto-acknowledge"
*
destination-type="javax.jms.Queue"
*
subscription-durability="NonDurable"
*
transaction-type="Container"
*
@jboss.destination-jndi-name name="queue/StrategyQ_1"
*
@ejb.transaction type="NotSupported"
*
*
*/
Regards,
Mark