File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlets and JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and JDBC" Watch "Servlets and JDBC" New topic
Author

Servlets and JDBC

krishna penumaka
Greenhorn

Joined: Apr 20, 2001
Posts: 5
Hi,
I am facing a funny problem here. I wrote a servlet that used JDBC and creates a table and according to the need I need to drop the table once the servlet is done with its work. I wrote the code for the same and then closed the connection. What I noticed is that the servlet does close the connection, but w/out dropping the table.
I appreciate any help in this.
thanks
krishna
David Freels
Ranch Hand

Joined: Feb 01, 2001
Posts: 102
Could you post an example of your code?
David
Sun Certified Programmer for the Java2 Platform
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
From your description, it sounds as though you want the table to be dropped when you close the connection, why not drop the table just before closing the connection (i.e., in a finally block).
Or you could create your table in a temporary tablespace and then the DMBS would reclaim the space when you closed the connection.
 
wood burning stoves
 
subject: Servlets and JDBC
 
Similar Threads
JDBC pool monitor, bean monitor and others
How to config Jboss3.x
problem with Connection object in a servlet
Table Locking and Unlocking
Problem in database connectivity in JSP