You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2022/04/13 13:39:56 UTC

TOMEE-3902 placeholders in ActivationConfig properties

Hi,

I've pushed what I hope is a relatively straightforward, but also hopefully
useful piece of functionality.

If you consider an application that has a MDB that listens on a Topic, by
default, TomEE will use the MDB name as the Client ID that it uses to
connect to ActiveMQ. You can override this by specifying a specific
clientId activation property, or by
setting openejb.activemq.deploymentId-as-clientId = false, which will use a
randomly created unique ID.

I thought it would be useful to allow placeholders in activation
properties, such as:

{appId}
{ejbJarId}
{ejbName}
{hostName}
{uniqueId}

So, for the example I mention, you could set:

mdb.activation.clientId={ejbName}-{uniqueId}

in conf/system.properties, and the Client ID for the MDB would be set to
whatever the bean name is, with "-" and a unique ID added on the end.

The defaults remain unchanged, and this would only apply for activation
properties you explicitly set, using the placeholders above.

Let me know if you have any questions or feedback.

Thanks

Jon