2 Replies Latest reply on Feb 4, 2015 10:13 AM by Aslak Knutsen

    Different port used by embedded GlassFish via arquillian

    Patrick Hynes Newbie

      I am current trying to run two builds in parrallel through Jenkins. The issue is I need it to use two different ports.

       

      I am trying to acomplish this via the maven-resources-plugin that overwrites arquillian.xml. The plugin is activation by giving a port number in the maven call and ultimately I want to overwrite the arquillian.xml file with

       

      <?xml version="1.0" encoding="UTF-8"?>

      <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">

                <glassfish:container>

                          <glassfish:bindPort>10081</glassfish:bindPort>

                </glassfish:container>

      </arquillian>

       

      However, when I run the two jobs, ultimately one crashes and outputs the following error.

       

      SEVERE: Shutting down v3 due to startup exception : No free port within range: 8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@e3fd79

       

      From my understanding of this, the default port of the embedded glassfish is in use. What I would like to know, is am I providing enough details when overwriting and givining a new port via arquillian.xml?