cancel
Showing results for 
Search instead for 
Did you mean: 

Running Sample - Persistence with JDBC Locally - Where does the DB reside?

bhavesh_kantilal
Active Contributor
0 Kudos
236

Hello All,

I have deployed the Samples Project - Persistence with JDBC and am running this locally on a Java WebServer on my Eclipse.

The scenario works like a charm. But - what I fail to understand is,

  • Code contains - DataSource as java:comp/env/jdbc/DefaultDB
  • When I run this locally on my eclipse, which DB does it connect to? How do i connect to this Database and navigate to the tables etc?

I am sorry if this sounds like a very basic question but have not been able to get around this as I need to debug my application and when doing so I am trying to figure out where the DB and the tables locally are? Any pointers?

Regards,

Bhavesh

Accepted Solutions (1)

Accepted Solutions (1)

xu_xiang
Advisor
Advisor
0 Kudos

Hi Bhavesh,

the DB in this case is a in-memory Derby in your Java runtime.

Regards

Xu

bhavesh_kantilal
Active Contributor
0 Kudos

Hello Xu Xiang,

Thanks for the input. Is there a way for me to access this DB? Any tutorial you recommend where when the local server is running I can access the DB using some client tools?

Regards,

Bhavesh

xu_xiang
Advisor
Advisor
0 Kudos

There is no tutorial for Derby from our side, if the user can already have a real cloud DB at https://account.hanatrial.ondemand.com

But if you really want to know, you may modify the sample code (where you look up for data source) a bit to get the connection properties. Once you have these info, you can also use a SQL client of your choice.

Answers (0)