Back to project page DKO.
The source code is released under:
GNU Lesser General Public License
If you think the Android project DKO listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package sakila; import javax.sql.DataSource; /* w w w. j a v a 2 s . c o m*/ import com.mysql.jdbc.jdbc2.optional.MysqlDataSource; public class Util { private static DataSource ds; public synchronized static DataSource getDS() { if (ds==null) { MysqlDataSource tmpDS = new MysqlDataSource(); tmpDS.setURL("jdbc:mysql://localhost/sakila"); tmpDS.setUser("root"); tmpDS.setPassword(""); ds = tmpDS; } return ds; } }