Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Using Database : efficiency matter?

database efficiency
0
Posted

Using Database : efficiency matter?

0

Author: Sandip Bhoi (http://www.jguru.com/guru/viewbio.jsp?EID=1342895), Jul 20, 2007Is it efficient to use same Connection object returned by a Singletone class. i.eimport java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Properties; import org.apache.log4j.Logger; /** * This is a utility class and follows the factory pattern. The class loads the * database driver specified in the property file viz. dbConf.properties. * The authentication related information is also present the property file. * @author 000711 */ public class DBFactory { private static Connection connection = null; private static String userName ; private static String password ; private static String connectionURL; private static String driverClassName; private static Properties dbProperties ; private static DBFactory _instance = null; private Logger log = Logger

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123