0 Replies Latest reply on Mar 12, 2014 12:06 PM by Timo Zimmermann

    Multiple Deployments on mixed glassfish container types (local, managed, remote)

    Timo Zimmermann Newbie

      Hey there,

      my setup is like described in this question:

      Multiple Deployments on multiple remote glassfish <group> leads to "Invalid user name or password"

       

      My environment is the following:

      Glassfishv4 1 (managed) running on localhost.

      Eclipse IDE running on localhost containing source / test code.

      Glassfishv4 2, running on a virtual machine (remote). Reachable over the network.

       

      I have the following arquillian.xml:

      <?xml version="1.0"?>
      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns="http://jboss.org/schema/arquillian"
          xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
      
      <group qualifier="glassfish_cluster" default="true">
      <container qualifier="managed" default="true">
              <configuration>
                  <property name="domain">mydomain</property>
                  <property name="adminPort">4848</property>
                  <property name="adminHost">localhost</property>
                  <property name="adminUser">myadmin</property>
                  <property name="adminPassword">myadminpwd</property>
                  <property name="allowConnectingToRunningServer">true</property>
              </configuration>
          </container>
      
          <container qualifier="local" >
              <configuration>
                  <property name="adminPort">4848</property>
                  <property name="adminHost">localhost</property>
                  <property name="adminHttps">false</property>
                  <property name="adminUser">myadmin</property>
                  <property name="adminPassword">myadminpwd</property>
                  <property name="target">server</property>
              </configuration>
          </container>
      
          <container qualifier="remote">
              <configuration>
                  <property name="adminPort">4848</property>
                  <property name="adminHost">myvm015</property>
                  <property name="adminHttps">true</property>
                  <property name="adminUser">myadmin</property>
                  <property name="adminPassword">myadminpwd</property>
                  <property name="target">server</property>
              </configuration>
          </container>
      </group>
      </arquillian>
      
      
      

       

      I want to use the managed glassfish container:

      When the on localhost running server is already started I get this error:

      The server is already running! ... To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration

      But the option is already set.

       

      When I uncomment the </group> tag from the arquillian.xml everything is working fine.

      Arquillian uses the already started server or starts a stopped glassfish server and stops it after the tests.

       

      Can anyone explain me this behaviour?

      I would need multiple deployments with a mixture of remote and managed glassfish containers.

       

      Thanks in advance!

       

      Timo