users@glassfish.java.net

why templating not working for sun_ejb_jar.xml descriptor files

From: <glassfish_at_javadesktop.org>
Date: Wed, 18 Feb 2009 02:48:43 PST

Hello,

A very nice feature, particullary in cluster deployement mode, is the templating : the fact that we can use ${var} substitution variable in JDBC resource declaration or in ejb-jar.xml
For instance, we use dynamic MDB selector with this :
 [i] <activation-config-property>
                <activation-config-property-name>
                  MessageSelector
                </activation-config-property-name>
                <activation-config-property-value>
                  provisioning_id like [b]'${PROVISIONING_TAG}${PROVISIONING_PREFIX}%'[/b]
                </activation-config-property-value>
              </activation-config-property>
              <activation-config-property>
[/i]

But there are some limitations, one of the most painfull one is :
No substitution in sun specifics DD xml files.

My use case is :
Being able to switch the JCA RAR name inside the sun-ejb_jar.xml DD file
 [i] <ejb>
      <ejb-name>CapabilitiesQueueReceiverBean</ejb-name>
      <pass-by-reference>false</pass-by-reference>
      <mdb-resource-adapter>
        [b]<resource-adapter-mid>${JMS_RA_NAME}</resource-adapter-mid>[/b]
      </mdb-resource-adapter>
    </ejb>
[/i]
with JMS_RA_NAME=swiftmq for one deployement
and JMS_RA_NAME==jmsra (IMQ) for another one

Any idea on this ?
Is it forecasted to enhance the templating in further version ? (We use V2UR1)

rgds,
Olivier
[Message sent by forum member 'omerlin' (omerlin)]

http://forums.java.net/jive/thread.jspa?messageID=332602