users@glassfish.java.net

Re: Starting GF4+Derby from Apache Cargo

From: Reza Rahman <Reza.Rahman_at_oracle.com>
Date: Fri, 07 Jun 2013 20:58:23 -0400

Hate to be so obtuse about this, but how do I do that? Can I simply do
this:
http://cargo.codehaus.org/Starting+and+stopping+a+container#Startingandstoppingacontainer-datasources
and specify jdbc/__default to be the JNDI name? Wouldn't GF object to
changing the built-in settings?

On 6/7/2013 8:53 PM, Sahoo wrote:
> Configure jdbc/__default datasource to use embedded derby. Then you don't have to start derby explicitly.
>
> Sahoo
>
> Sent from my Android phone, please excuse me for its brevity.
>
> -----Original Message-----
> From: reza.rahman_at_oracle.com [reza.rahman_at_oracle.com]
> Received: Saturday, 08 Jun 2013, 5:46
> To: users_at_glassfish.java.net [users_at_glassfish.java.net]
> Subject: Starting GF4+Derby from Apache Cargo
>
> 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.