Is it possible to inject the Cluster Partition Name dependency when XDoclet and middlegen are used to generate ejbs deployment descriptors?

Solution Unverified - Updated -

Issue

We generate deployment descriptors and jboss.xml using XDoclet and middlegen to create ejb2 from these doc tags

/**
 * Session Bean for ClientMessageServiceSessionBean
 *  @ejb.bean name="ClientMessageServiceSessionBean"
 *  type="Stateless"
 *  view-type="remote"
 *  jndi-name="ClientMessageServiceSessionBean"
 *  local-jndi-name="ejb/ClientMessageServiceSessionBeanLocal"
 *  transaction-type="Container"
 *  @jboss.clustered
 *  @jboss.cluster-config
 *  partition-name="TestPartition"
 *  home-policy="org.jboss.ha.framework.interfaces.RoundRobin"
 *  bean-policy="org.jboss.ha.framework.interfaces.RoundRobin"
 *
 */

We currently hard code this bean to partition-name="TestPartition". If they remove that it will pick up the default partition.
Now, if I injected the cluster partition name ("TestPartition") on my bean, and I want to deploy the same bean to some other jboss server having different partition name, I cannot deploy my application.
I will have to change the partition name on my bean according to server and have to recompile my application.
How can we inject partition name dependency externally ?

Environment

JBoss Enterprise Application Platform (EAP) 5.1.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.