(i can use one connection for all of functions but i do not know whether it is good or not
If you want to use
JDBC transactions you will have to perform all three DB operations in one Connection. There isn't a way using JDBC alone to wrap the operations of three seperate Connections into one transaction.
If you can't change your code, you could wrap the call to these methods in a JTA transaction, presuming you have a transaction service you can use. It might be easier however (since this is a
Servlet enviornment not an
EJB environment) to fix your three methods to use one Connection.