Database Access Wrapper In Java

Posted: July 1, 2012 by abhijeetgk in JAVA

Recently started doing some homework for java, I started with few simple concepts like JSP and servlets,

Having experience in PHP the web concepts are clear. Now its time to check whether the same concepts can work in JSP and Servlets or not

I started with simple JSP and Servlet Application for a common functionality forums.

(Github repo is created will commit on regular basis as i move ahead )

I first decided to do one db access class, that will hold the connection and some common functions so each time i dont need to write those repeat lines for open connection and close.

I did some R n D and come up with the following file

DBAccess.java

And sample implementation can be found here

CommonFunctions.java

 

I know I am somewhat fresher to this concept but trying to improve my knowledge in the concepts.

 

If you have any better ideas then please do share with me by putting comments or by dropping the email at abhijeetgk@gmail.com

 

About these ads

What you think ? Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s