-
1. Re: WildFly MDB consumer with remote queue
aditya.kumar Jan 12, 2015 12:55 PM (in response to woykan)Were you able to resolve this problem? Any update?
-
2. Re: WildFly MDB consumer with remote queue
urr4 Feb 26, 2015 3:00 AM (in response to woykan)1 of 1 people found this helpfulI'm working on the same problem atm, however i can't get it to work, but maybe my experiences help you.
As far as i understood, you need a user on the server, that holds the Queue, who is used in the connection.
So on the server with the queue, you use add-user.bat to create a Application User, lets say with name <<NAME>>.
When the CLI asks you, if the user should be used in a remote connection (the last step of the user creation), say yes and save the Base64 encodes secret identity (lets call it <<IDENT>>) it gives you.On the server holding the MBD, you need a new security realm, so put the following into the server2.xml
<security-realms>
..
<security-realm name="queue-security-realm">
<server-identities>
<secret value="<<IDENT>>"/>
</server-identities>
</security-realm>
...
</security-realms>
You now need an outbound-socket-binding to the host:port, server1 is running on, like localhost:8080. Put this also into the server2.xml
<socket-binding-group ....>
...
<outbound-socket-binding name="remote-queue">
<remote-destination host="localhost" port="8080"/>
</outbound-socket-binding>
...
</socket-binding-group>
At last, you can define the connection from server2 to server1, by putting this into the server2.xml
<subsystem xmlns="urn:jboss:domain:remoting:2.0">
...
<outbound-connections>
<remote-outbound-connection name="remote-queue-connection" outbound-socket-binding-ref="remote-queue" username="<<NAME>>" security-realm="queue-security-realm" protocol="http-remoting">
<properties>
<property name="SASL_POLICY_NOANONYMOUS" value="false"/>
<property name="SSL_ENABLED" value="false"/>
</properties>
</remote-outbound-connection>
</outbound-connections>
...
</subsystem>
Note, how the remote outbound connection depends on the outbound socket binding and the security realm.
Now as far as i understand, this is used, to establish a connection from server2 to server1 to use the objects, that are mapped in the JNDI of server1.
Maybe this works for you.
If it does, i would be more than happy, if you could push your project into GitHub and send me the link, since im working on the same issue.
Best wishes
Urr4