my dog learned polymorphism
The moose likes EJB and other Java EE Technologies and the fly likes MDB Annotation properties Configuration File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDB Annotation properties Configuration File" Watch "MDB Annotation properties Configuration File" New topic

MDB Annotation properties Configuration File

Csk Kumar

Joined: Mar 07, 2011
Posts: 13
In our project we are are using an MDB that listens for a message from a specific queue. It is defined as an annotation.

But how to make the annotation property values ( such as maxSession value for an MDB) user-configurable through configuration file ?


@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "20").

In order to change the value of the maxSession, the code has to be compiled everytime.

Is there a way to make it user configurable so that the recompilation of code is not required and by just changing the maxSession value to "30" and restarting the jboss it should be working.

Kindly help.

Reference Code:

Currently SDPconstants class file is used for defining the constants.

The annotation looks like below.

Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Maybe this will help you.

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
I agree. Here's the link:
subject: MDB Annotation properties Configuration File
It's not a secret anymore!