5 Replies Latest reply on May 22, 2013 12:56 PM by Bartosz Majsak

    How do I setup a DataSource in Embedded Tomee when using Arquillian?

    yashar bizhanzadeh Newbie

      I already setup my arquillian with embeded glassfish and derby and is working fine.  with the following arquillian.xml and glassfish-resource.xml

       

      arquillian.xml

         <container qualifier="glassfish-embedded" > 
           <configuration>
                <property name="resourcesXml">
                src/test/resources-glassfish-embedded/glassfish-resources.xml
                </property>
           </configuration>
      </container>

       

      glassfish-resources.xml

      <resources> 
           <jdbc-resource pool-name="ArquillianEmbeddedDerbyPool" jndi-name="jdbc/arquillian"/>
           <jdbc-connection-pool name="ArquillianEmbeddedDerbyPool" res-type="javax.sql.DataSource" datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource" is-isolation-level-guaranteed="false">
                <property name="databaseName" value="target/databases/derby"/>
                <property name="createDatabase" value="create"/>
           </jdbc-connection-pool>
      </resources>

      Now I am trying to use tomee and I couldn't connect to my database, because I cannot point out to my resource.xml in the same way which I used with glassfish.

      I want to know the alternative setting for specifying resources in tomee with arquillian.I will appreciate any help in this regards.