luke
luke

Reputation: 4155

How to prevent JBoss EAP 6.4.X from resolving expression in property value?

I have Jboss server (EAP 6.4.X) working in domain mode.

In domain.xml I have custom-handler defined. Class specified in custom-handler definition is enclosed in Jboss module.

The definition is as follows:

<custom-handler name="SomeCustomHandlerName" class="com.abc.def.SomeCustomHandler" module="com.abc.def">
   <level name="ALL"/>
   <properties>
      ...
      <property name="somePropertyKey" value="${some.property.value}"/>
      ...
   </properties>
</custom-handler>

When I start the Jboss I get this error:

2018-12-04 18:33:30,564 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([
    ("subsystem" => "logging"),
    ("custom-handler" => "SomeCustomHandlerName")
]) - failure description: "JBAS014802: Cannot resolve expression '${some.property.value}'"

As I see Jboss tries to resolve ${some.property.value} expression using system-properties. However this value should be resolved internally by com.abc.def.SomeCustomHandler class.

The question is how to tell Jboss not to interpret this value and pass it as raw property value to SomeCustomHandler class? Maybe there is a simple way to escape ${} like \$\{\} or something like that?

Upvotes: 1

Views: 733

Answers (0)

Related Questions