<div dir="ltr">Problem with a built-in JMS event listener provider is that it should send messages to an external JMS server. Keycloak itself should not act as a JMS server. Further, there's no standard way to connect to JMS providers, so best we could do is one that connects to WildFly/EAP and make it easy for users to extend it to connect to different providers (maybe an getDestination() method).<div><br></div><div>At the moment I've got no spare time to help out in detail with Arquillian part, although I can answer questions over email if that's enough. For the Arquillian part I'd suggest starting an embedded Archimedes server in the test.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 April 2016 at 13:44, Thomas Raehalme <span dir="ltr"><<a href="mailto:thomas.raehalme@aitiofinland.com" target="_blank">thomas.raehalme@aitiofinland.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It would probably be a good idea although I think this JMS publishing is such a basic feature that it should be part of the core package.<div><br></div><div>If you have a chance to help me get started with the Arquillian part, I'm happy to send the PR. I should have time to work on this again within the next week or so.</div><div><br></div><div>Best regards,</div><div>Thomas</div><div><div class="h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 4, 2016 at 12:26 PM, Stian Thorgersen <span dir="ltr"><<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I wonder if we should have a Keycloak extensions repository where we could place things like this rather than adding directly to master.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On 31 March 2016 at 20:18, Thomas Raehalme <span dir="ltr"><<a href="mailto:thomas.raehalme@aitiofinland.com" target="_blank">thomas.raehalme@aitiofinland.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Mar 31, 2016 at 4:38 PM, Thomas Darimont <span dir="ltr"><<a href="mailto:thomas.darimont@googlemail.com" target="_blank">thomas.darimont@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>would you mind sharing your keycloak configuration with a JMS resource-adapter?</div></div></blockquote><div><br></div></span><div>Here are the changes I made to standalone/configuration/standalone.xml:</div><div><br></div><div>1. Added the following extension under /server/extensions:<br><br></div><div><extension module="org.wildfly.extension.messaging-activemq"/></div><div><br></div><div>2. Added the following subsystem under /server/profile:</div><div><br></div><div><subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"></div><div> <server name="default"></div><div><div> <security enabled="false" /> <!-- I didn't need to use security as everything was localhost --></div><div> <remote-acceptor name="netty" socket-binding="messaging"/></div><div> <remote-connector name="netty" socket-binding="messaging"/></div><div> <in-vm-acceptor name="in-vm" server-id="0"/></div><div> <in-vm-connector name="in-vm" server-id="0"/></div><div> <pooled-connection-factory name="activemq-ra"</div><div> transaction="xa" connectors="in-vm"</div><div> entries="java:/ConnectionFactory java:/JmsXA java:jboss/DefaultJMSConnectionFactory"/></div><div> <jms-topic name="KeycloakEvents" entries="jms/KeycloakEvents java:jboss/exported/jms/KeycloakEvents" /></div></div><div> </server></div><div></subsystem></div><div><br></div><div>3. Added the following socket-binding under /server/socket-binding-group:</div><div><br></div><div><div><socket-binding name="messaging" port="61616"/></div><div><br></div></div><div>This enabled my external process to listen to the JMS topic. </div><div><br></div><div>I attached a full example to this message. The changes have been marked with <!-- keycloak-events-jms -->.</div><span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Did you manage to configure a new resource-adapter via jboss-cli?</div></div></blockquote><div><br></div></span><div>No, I haven't used jboss-cli but modified the configuration file directly.</div><div><br></div><div>My implementation of KEYCLOAK-2302 can be found at Github: <a href="https://github.com/raehalme/keycloak/tree/KEYCLOAK-2302" target="_blank">https://github.com/raehalme/keycloak/tree/KEYCLOAK-2302</a>.</div><div><br></div><div>I have not sent a PR as I have yet to complete the Arquillian integration tests requested by Stian. Other work has kept me busy and I haven't had a chance to even rebase against 1.9.x.</div><div><br></div><div>Best regards,</div><div>Thomas </div></div><br>
</div></div>
<br></div></div><span>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></span></blockquote></div><br></div>
</blockquote></div><br><br>
</div></div></div></div>
</blockquote></div><br></div>