title: Hazelcast 3.8 module and configuration possibility for wildfly 10.1?
body: <p>I like to prototype a JEE environment with Wildfly 10.1 and Hazelcast 3.8. Until now I only have experience with ancient JBoss 4.2.3.GA.</p>
  
  <p>I already found existing <strong>resource adapter</strong> implementation based on older hazelcast 3.6 under <a href="https://github.com/hazelcast/hazelcast-ra" rel="nofollow noreferrer">https://github.com/hazelcast/hazelcast-ra</a>. Unfortunately I couldn't deploy it <strong>as-is</strong> on Wildfly 10.1 since IronJacamar complained about missing equals/hashCode methods (<em>which isn't true since they are explictly overwritten in the source code. deploying a self-built snapshot of git master had the same issue</em>). </p>
  
  <p>I ended up with migrating the ra.xml configuration code to proper javax.resource.spi annotations (@Connector, @ConfigProperty, @ConnectionDefinition) and adding javax.resource.Referenceable interface implementation (don't know whether this is necessary). The step to hazelcast 3.8 was much easier - just adding missing interface methods to HazelcastConnectionImpl.</p>
  
  <p>I still struggle with deployment/configuration, so here are my questions:</p>
  
  <ol>
  <li><p><strong>How should the deployment structure for an JCA adapter look like?</strong> I tested the following approaches:</p>
  
  <ul>
  <li><p><strong>All-in-one:</strong> RAR file containing all of <code>cache-api-1.0.0.jar</code>, <code>hazelcast-3.8.jar</code>, <code>hazelcast-client-3.8.jar</code>, <code>my-hazelcast-ra-impl.jar</code> and deployment descriptors.</p></li>
  <li><p><strong>By-Library:</strong> Added new modules <code>javax.cache.api</code> (<code>cache-api-1.0.0.jar</code>) and <code>com.hazelcast.hazelcast</code> (<code>hazelcast-3.8.jar</code>, <code>hazelcast-client-3.8.jar</code>) to <code>${WILDFLY_HOME}/modules/</code> and declared appropriate module dependencies in <code>jboss-deployment-structure.xml</code>. RAR file contains <code>my-hazelcast-ra-impl.jar</code>, <code>hazelcast.xml</code> and deployment descriptors.</p></li>
  <li><p><strong>By-Adapter:</strong> Added a new module <code>my.hazelcast.ra</code> (<code>cache-api-1.0.0.jar</code>, <code>my-hazelcast-ra-impl.jar</code>) to <code>${WILDFLY_HOME}/modules/</code> and declared appropriate module dependency in <code>jboss-deployment-structure.xml</code>. RAR file contains <code>hazelcast-3.8.jar</code>, <code>hazelcast-client-3.8.jar</code>, <code>hazelcast.xml</code> and deployment descriptors.</p></li>
  </ul></li>
  <li><p><strong>Where is the proper place to deploy a hazelcast.xml configuration file into Wildfly 10.1?</strong> It seems that I <strong>need to pack it next to ResourceAdapterImpl class</strong> (<code>my-hazelcast-ra-impl.jar</code>) so that the <strong>class loader finds it</strong> and prefers it over hazelcast-default.xml. It contains only global configuration options like group/network. No cache definitions since caches should be configured/created on-demand via CDI.</p>
  
  <ul>
  <li>Is there something like a <code>conf</code> folder where I can deploy <code>hazelcast.xml</code> file separate from binary RAR contents? It would be nice if it could be hot-deployed (for prototyping) but that is not mandatory.</li>
  <li>Should it be placed somehow inside subsystem configurations within standalone.xml? I found similar cache-container configurations for infinispan subsystem but don't know how to adapt this to hazelcast (since it's not an own subsystem). </li>
  </ul></li>
  <li><p>In Wildfly Management webinterface I can find the deployed RAR under Depoyments and in the JNDI view, but it is not listed under Configuration -> Subsystems -> Resource Adapters. I can create a new entry there but don't find any advantage. <strong>What is the meaning of this configuration option?</strong></p></li>
  </ol>
  
  <p>Thank you in advance</p>