Below is the steps to connect Glassfish V2 "sun-appserv-samples" Derby database from Eclipse JEE 3.3 version: (Please, use Eclipse IDE for Java EE Developer version and the instruction from this document to have GF server setup)
From IDE Window menu, select Open Perspective > Other > choose Database Development
On the Database Development panel (figure below), righ-click Databases > select New from the menu
to create a New Connection Profile and choose 'Generic JDBC Conenction' from the list.
Click Next to enter a name for the
connection profile, name it as 'TestDerbyPool' > click Next and click ...

From Driver Definition panel, select Derby > 10.2 > click Add to add a new driver
From the New Driver Definition panel, select Derby > 10.2 > Derby Client JDBC Driver > click OK
From Edit Driver Denifition panel, remove the default derbyclient.jar file > click Add Jar/Zip to add the derbyclient.jar file from Glassfish directory > edit the properties as described in the following figure:
Connection URL: jdbc:derby://localhost:1527/sample;create=true
Database Name: sun-appserv-samples
Driver Class: org.apache.derby.jdbc.ClientDriver
Password: APP
User ID: APP
Click OK > OK button to go back to the New JDBC Connection Profile panel. Now you should have all the fields values configured
Start the Derby database and click Test Connection button. You should receive the Success and tables dialogs below:
For information to connect to Derby by using DTP please, click here

Thanks Davis for sharing. I like your blog which gives screen shots, so it is easy to follow.
Posted by Judy Tang on June 12, 2008 at 10:38 AM PDT #