Skip to main content

starting right derby DB server/instance in glassfish

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
GeertsP
Offline
Joined: 2012-03-09

Hi,

I'm a newby using glassfish and i'm a bit puzzled on how to get my database access properly configured.
I have configured and deployed a spring application in glassfish that uses the shipped derby DB for storing records. The easiest way (being new to derby) was to use a preconfigured link to a database that exists in netbeans (6.9.1)IDE (under services) and looks something like this:

jdbc:derby://localhost:1527/sample [app on APP].

I have my products table in there with a number of records. Netbeans allows me to connect to it and in case it is unavailable it starts a server that listens on port 1527 (telnet tells me this) .
After I have done that my application deployed in glassfish works fine. However I want to start my DB server in a way similar to the " > asadmin start-database " command.
This also seems to start a server on 1527 but doesn't bring access to my database since the application falls over complaining that database access is impossible.
I have tried to figure out what this command line actually starts but encounter a forest a command files in which I got lost easily .
Question is - in what way can I start the right database/schema combination from outside netbeans that gives me the same DB service so that my spring application will work correctly? .

Thanks
Peter