title: Use of arquillian glassfish container
body: <p>I used to have the following maven dependencies to use arquillian glassfish container:</p>
  
  <pre><code> &lt;dependency&gt; 
       &lt;groupId&gt;org.jboss.arquillian&lt;/groupId&gt;
       &lt;artifactId&gt;arquillian-junit&lt;/artifactId&gt; 
   &lt;scope&gt;test&lt;/scope&gt;
       &lt;version&gt;1.0.0.Alpha5&lt;/version&gt;
   &lt;/dependency&gt;  
   &lt;dependency&gt; 
       &lt;groupId&gt;org.jboss.arquillian.container&lt;/groupId&gt; 
   &lt;artifactId&gt;arquillian-glassfish-embedded-3.1&lt;/artifactId&gt;
       &lt;version&gt;1.0.0.Alpha5&lt;/version&gt;
   &lt;/dependency&gt; 
  </code></pre>
  
  <p>I was able to run my tests successfully until I wanted to inject specific resources, that could not be looked up through JNDI. </p>
  
  <p>I improved my domain.xml to have the relevant resources I wanted. But for now, I am not sure arquillian load successfully all the domain.xml (look up failed on "jca/Neo4j/resource").</p>
  
  <p>My arquillian.xml (in src/test/resources):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;arquillian xmlns="http://jboss.com/arquillian"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:glassfish="urn:arq:org.jboss.arquillian.container.glassfish.embedded_3"&gt;
      &lt;glassfish:container&gt;
          &lt;glassfish:instanceRoot&gt;src/test/resources/glassfish&lt;/glassfish:instanceRoot&gt;
          &lt;glassfish:bindPort&gt;9090&lt;/glassfish:bindPort&gt;
          &lt;glassfish:autoDelete&gt;false&lt;/glassfish:autoDelete&gt;
      &lt;/glassfish:container&gt;
  </code></pre>
  
  <p></p>
  
  <p>My domain.xml (in src/test/resources/glassfish/config/):</p>
  
  <pre><code>&lt;domain log-root="${com.sun.aas.instanceRoot}/logs" applicationroot="${com.sun.aas.instanceRoot}/applications" version="10.0"&gt;
      &lt;resources&gt;
          &lt;connector-connection-pool name="jca/Neo4j/pool" resource-adapter-name="neo4j-connector-0.1-SNAPSHOT" connection-definition-name="com.netoprise.neo4j.connection.Neo4JConnectionFactory"&gt;
              &lt;property name="dir" value="${com.sun.aas.instanceRoot}/lib/databases/neo4j"&gt;&lt;/property&gt;
              &lt;property name="xa" value="true"&gt;&lt;/property&gt;
          &lt;/connector-connection-pool&gt;
          &lt;connector-resource pool-name="jca/Neo4j/pool" jndi-name="jca/Neo4j/resource"&gt;&lt;/connector-resource&gt;
      &lt;/resources&gt;
      &lt;servers&gt;
          &lt;server name="server" config-ref="server-config"&gt;
              &lt;application-ref ref="neo4j-connector-0.1-SNAPSHOT" virtual-servers="server"&gt;&lt;/application-ref&gt;
              &lt;resource-ref ref="jca/Neo4j/resource"&gt;&lt;/resource-ref&gt;
          &lt;/server&gt;
      &lt;/servers&gt;
  ...
  &lt;/domain&gt;
  </code></pre>
  
  <p>Thanks,
  Alex</p>