Martin Simka created JBJCA-1332:
-----------------------------------
Summary: not possible to set all-upper-case ActivationConfigProperty
Key: JBJCA-1332
URL:
https://issues.jboss.org/browse/JBJCA-1332
Project: IronJacamar
Issue Type: Bug
Components: Core
Affects Versions: WildFly/IronJacamar 1.3.4.Final
Reporter: Martin Simka
{code:java|title=MDB}
@MessageDriven(name = "LocalResendingMdbFromQueueToQueue",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "jms/queue/InQueue"),
@ActivationConfigProperty(propertyName = "HA", propertyValue
= "false")
})
@TransactionManagement(value = TransactionManagementType.CONTAINER)
@TransactionAttribute(value = TransactionAttributeType.REQUIRED)
public class LocalResendingMdbFromQueueToQueue implements MessageListener {
{code}
{{HA}} property is ignored because IJ can't find setter
{noformat}
14:39:18,434 WARN [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0006:
ActivationConfigProperty HA will be ignored since it is not allowed by resource adapter:
activemq-ra
{noformat}
ActivationSpec class is
https://github.com/apache/activemq-artemis/blob/master/artemis-ra/src/mai...
Setter for property {{HA}} is in parent class
https://github.com/apache/activemq-artemis/blob/master/artemis-ra/src/mai...
It happens because
[
SimpleResourceAdapterRepository.java#L501|https://github.com/ironjacamar/...]
converts the first character after "set" to lower case. But that is not
sufficient.
According to JCA 1.7 specification ActivationSpec is JavaBean (spec. section 5.3.3) and
JavaBean specification (spec. section 8.8) says
{quote}
Thus when we extract a property or event name from the middle of an existing Java name, we
normally convert the first character to lower case. However to support the occasional use
of all upper-case names, we check if the first two characters of the name are both upper
case and if so leave it alone.
So for example,
"FooBah" becomes "fooBah"
"Z" becomes "z"
"URL" becomes "URL"
We provide a method Introspector.decapitalize which implements this conversion rule.
{quote}
Maybe IJ could leverage
[
Introspector|https://docs.oracle.com/javase/7/docs/api/java/beans/Introsp...]
class
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)