JMS Master/Slave index replication mechanism doesn't pass user/password to remote server

Description

JMS messaging is secured by default at jboss-as-7.1.1. So I configured SessionFactory with following props:

<prop key="hibernate.search.default.worker.jndi.java.naming.factory.initial">org.jboss.naming.remote.client.InitialContextFactory</prop>
<prop key="hibernate.search.default.worker.jndi.java.naming.provider.url">remote://master_host:4447</prop>
<prop key="hibernate.search.default.worker.jndi.java.naming.security.principal">guest</prop>
<prop key="hibernate.search.default.worker.jndi.java.naming.security.credentials">123123123</prop>

While jboss start everything went well – connection factory and queue were successfully found, but when I forced index change to check if replication was working I got following :

Failed to create session : HornetQException[errorCode=105 message=Unable to validate user: null]

After digging into some code I found that "JMSBackendQueueTask" class creates a "QueueConnection" without passing username/password to it :

cnn = processor.getJMSFactory().createQueueConnection();

So is there a way to pass there security credentials, if they were configured for that index worker?

So far I disabled JMS security at my standalone-full-ha.xml (added <security-enabled>false</security-enabled> to "messaging" subsystem), what is not good.

Environment

jboss-as-7.1.1.Final

Status

Assignee

Sanne Grinovero

Reporter

Anton Nazaruk

Labels

Suitable for new contributors

Yes, likely

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

4.1.0.Final

Priority

Major