users@glassfish.java.net

Starting GF4+Derby from Apache Cargo

From: <reza.rahman_at_oracle.com>
Date: Sat, 8 Jun 2013 00:16:15 +0000 (UTC)

I am trying to create a self-contained Java EE 7+GlassFish 4 demo using
Maven and Apache Cargo. The issue is that my application uses the new
Java EE 7 default data source feature which seems to only work if
GlassFish 4 and Derby are both running, similar to what would happen if
I did this via asadmin:

asadmin start-domain
asadmin start-database

I am not sure how to accomplish this in Cargo though. The issue is that
when I am starting GlassFish through Cargo, only GlassFish is starting
and not Derby, causing the default data source to fail. Below is my
Cargo configuration:

            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.4.2</version>
                <configuration>
                    <container>
                        <containerId>glassfish4x</containerId>
                        <zipUrlInstaller>
                           
<url>http://download.java.net/glassfish/4.0/promoted/latest-glassfish.z
ip</url>
                        </zipUrlInstaller>
                    </container>
                    <properties>
                        <context>cargo-tracker</context>
                    </properties>
                </configuration>
            </plugin>

Does anyone know how to solve this? We used Cargo for the GlassFish
examples, didn't we? Did we solve this problem there?

Thanks in advance.