wood burning stoves*
The moose likes Tomcat and the fly likes Help using Hypersonic DB with Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help using Hypersonic DB with Tomcat" Watch "Help using Hypersonic DB with Tomcat" New topic
Author

Help using Hypersonic DB with Tomcat

Tim Kelley
Greenhorn

Joined: Jul 16, 2002
Posts: 8
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
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
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


Spritle Software Blogs
Tim Kelley
Greenhorn

Joined: Jul 16, 2002
Posts: 8
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

Joined: Jul 16, 2002
Posts: 8
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 ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help using Hypersonic DB with Tomcat
 
Similar Threads
Configuring Multiple Datasources w/ Jboss 3.2.x
JPA Editor configuration.
Hypersonic DB and Tomcat Question
Running SQL Server Script File in Hypersonic DB
configiring tomcat 4.03 to run my static web page on startup