Davis' Weblog

       
 
How to Connect Glassfish Derby from Eclipse IDE

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

Posted by davisn @ 10:24 AM PDT [ Comments [1] ]
 
 
 
 
Trackback URL: http://blogs.sun.com/davisn/entry/how_to_connect_to_glassfish
Comments:

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 #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
 
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

[RSS Newsfeed]

Valid XHTML or CSS?

[This is a Roller site]
Theme by Rowell Sotto.
 
© Davis' Weblog