I am not quite sure, this is the type of response you are looking for, but like Byron stated above, some code would help, but I will take a guess.
My suggestion would be is that you create a Data Access Object which handles all of the access to the database internally, i.e. connection, statement. This particular bean would reside in session scope or maybe application scope.
I would expose certain service methods such as for example query(
String str), update(Object obj)
add, delete, you get the idea. Something similar to, I guess a stateless bean. The methods acquire and release resources during a method call.
The key point is that the methods acquire and release resources during a method call.
Like a said, I am not sure if this will help or not. Maybe some code will shed more light.
Craig.