• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Help using Hypersonic DB with Tomcat

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an existing database created with the Hypersonic database. I need to be able to put it online.
What is the best way to put this in tomcat where a servlet can access it.
Where do I put the hypersonic driver?
Where do I put the database? On Tomcat or anywhere on the computer?
Do I need to include something about the database in an xml file?
Can anyone help me with the basics on what goes where with this type of database?
thanks
Tim
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of the answer for ur question can be found at \hsqldb_v.1.61\doc\servlet.html directroy of ur hard disk.
Regards
Balaji
 
Tim Kelley
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
I'm using version 1.43 of Hypersonic.
It's a little different.
I tried connecting to the DB with the version mentioned but it didn't work.
Thanks
Tim
 
Tim Kelley
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay here is where I'm stuck.
String dbURL = "jdbc:HypersonicSQL:C:\\Documents and Settings" + "\\Administrator\\jbproject\\Hypersonic" + "\\computerbooks.rwd";

try
{
// Load the HSQL Database Engine JDBC Driver
Class.forName("org.hsql.jdbcDriver").newInstance();
System.out.println(dbURL);
Connection conn = DriverManager.getConnection(dbURL,"sa","");
********************************************
This works great but I need for it run on Tomcat via an http connection
My connection should look like this
"jdbc:HypersonicSQL:http://db.psol.com"
But how do I map that?
thanks
Tim
[ July 26, 2002: Message edited by: Tim Kelley ]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first, I thought you had something very confused, but I knew (know) nothing about Hypersonic, so I thought I'd check it with google first.

And Hypersonic seems to have it's own webserver, so indeed, you should be able to connect to it and run sql over http.

Maybe this link will help?
http://www.google.ca/search?q=cache:K7L9ZZQAmf8C:www.mycgiserver.com/~buman/tutorial.html+hypersonic+dbURL&hl=en&ie=UTF-8

In particular, step 4 describes the local and remote jdbc urls to use, and the second code listing shows you the java code.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic