Bug 1090012 - Document: Enable property substitution in MDB and EJB via @Resource and @ActivationConfigProperty annotation
Summary: Document: Enable property substitution in MDB and EJB via @Resource and @Acti...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER4
: EAP 6.3.0
Assignee: sgilda
QA Contact: Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks: eap63-beta-blockers
TreeView+ depends on / blocked
 
Reported: 2014-04-22 11:32 UTC by Miroslav Novak
Modified: 2015-04-28 15:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:39:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EAP6-146 0 Major Closed [RFE] Enable property substitution in MDB and EJB via @Resource annotation 2016-01-11 20:42:11 UTC
Red Hat Issue Tracker EAP6-38 0 Major Closed [RFE] Enable property substitution in MDB via ActivationConfigProperty Annotation (PRODMGT-404) 2016-01-11 20:42:11 UTC

Description Miroslav Novak 2014-04-22 11:32:57 UTC
Document new feature which enables to set @Resource and values for in ActivationConfigProperty in MDB by a system property.

Like:
...
@ActivationConfigProperty(propertyName = "destination", propertyValue = "${jms.queue.InQueue}")})
...
@Resource(mappedname="${resource.name}")

can be set by specifying system properties -Djms.queue.InQueue=jms/queue/InQueue" and -Dresource.name=CF during start of EAP server or in CLI:
[standalone@localhost:9999 /] /system-property=jms.queue.InQueue:add(value=jms/queue/InQueue)
[standalone@localhost:9999 /] /system-property=resource.name:add(value=CF)

For this to work this functionality must be enabled in ee subsystem by setting attribute "annotation-property-replacement" to true. (Description: Flag indicating whether EJB annotations will have property replacements applied)

Comment 1 sgilda 2014-04-29 19:46:24 UTC
I'll take this one.

Shouldn't this go in the Developer Guide?

Comment 2 sgilda 2014-04-29 19:46:54 UTC
Ignore the above comment. :-)

Comment 3 sgilda 2014-04-29 21:08:34 UTC
On second thought, does this topic belong in the Development Guide under '7.4. Message-Driven Beans'?

Comment 6 sgilda 2014-05-05 23:17:58 UTC
I've been looking at the helloworld-mdb quickstart to create a version that uses property substitution. How do you replace the values in the hornet-queue.xml file?

That quickstart is located here: https://github.com/jboss-developer/jboss-eap-quickstarts/tree/6.3.x-develop/helloworld-mdb

Comment 7 Miroslav Novak 2014-05-06 11:23:16 UTC
AFAIK replacing value for queue name in hornet-queue.xml is out of scope of this RFE. This is just about replacing values in @Resource and @ActivationConfigProperty in MDB/EJB by system properties.

Comment 8 sgilda 2014-05-06 15:56:16 UTC
Created blank topic: Enable Property Substitution in MDB [30840]

Comment 11 Miroslav Novak 2014-05-09 08:02:31 UTC
Good to know that property substitution is working also in hornetq-jms.xml. :-)
Great work!

Comment 12 JBoss JIRA Server 2015-04-28 15:10:05 UTC
John Doyle <jdoyle> updated the status of jira EAP6-38 to Closed

Comment 13 JBoss JIRA Server 2015-04-28 15:10:07 UTC
John Doyle <jdoyle> updated the status of jira EAP6-146 to Closed


Note You need to log in before you can comment on or make changes to this bug.