I don't know Cargo, but I don't understand what's the need for
additional dependency to be set. Embedded derby drivers are already part
of glassfish classpath, so all that's required actually is to
reconfigure the existing DerbyPool to use embedded driver instead of
network driver.
If Cargo supports you to provide additional glassfish commands to be
run, then I you can achieve this using asadmin commands. GlassFish
allows default resources to be reconfigured to fit user's need.
Having said that, I have always felt that GlassFish should either start
Derby as part of start-domain (just like WLS) or use embedded Derby to
make life of developers easier.
Thanks,
Sahoo
On Saturday 08 June 2013 06:28 AM, Martin Gainty wrote:
> you need a series of properties to define the datasource attributes
> for derby
> also you would need to add derby as a dependency specifically:
>
> <plugin>
> <groupId>org.codehaus.cargo</groupId>
> <artifactId>cargo-maven2-plugin</artifactId>
> <configuration>
> [...]
> <properties>
> <cargo.datasource.datasource.derby>
> cargo.datasource.driver=org.apache.derby.jdbc.EmbeddedDriver|
> cargo.datasource.url=jdbc:derby:derbyDB;create=true|
> cargo.datasource.jndi=jdbc/CargoDS|
> cargo.datasource.username=APP|
> cargo.datasource.password=nonemptypassword
> </cargo.datasource.datasource.derby>
> </properties>
> [...]
> <container>
> [...]
> <dependencies>
> <dependency>
> <groupId>org.apache.derby</groupId>
> <artifactId>derby</artifactId>
> </dependency>
> </dependencies>
> </container>
> </configuration>
> </plugin>
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
> Diese Nachricht dient lediglich dem Austausch von Informationen und
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den
> Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
> > To: users_at_glassfish.java.net
> > From: reza.rahman_at_oracle.com
> > Subject: Starting GF4+Derby from Apache Cargo
> > Date: Sat, 8 Jun 2013 00:16:15 +0000
> >
> > 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.