0

I'm implementing a message driven bean with an ActivationConfigProperty annotation. The annotation property values are coming from a Database Entity POJO. Is it possible to dynamically set the ActivationConfigProperty property value(s) with values retrieved from the database? If so, would you provide an example and/or reference?

Gustav Larsson
  • 8,199
  • 3
  • 31
  • 51
user1772523
  • 141
  • 1
  • 9

1 Answers1

0

Unfortunately, ActivationConfigProperies are defined as annotations only and you can't define them programatically because when deployed at your server, the server inspect the annotation to do the required binding with the target Queue or Topic. If you want things to be programatically and getting these info from an entity, then use the ConnectionFactory to create connections that poll the Queue, or Topic for incoming messages every few seconds

  • Is it possible to dynamically create a deployment descriptor in which the MDB ActivationConfigProperty would be able to reference the property values? – user1772523 Jan 30 '15 at 02:04
  • ejb-jar.xml is read once during deployment.So, No. it's not possible. –  Jan 31 '15 at 16:28