Obtaining DB Connection


We can get the DB Connection by using the DATA ACCESS class.

If we look into this class . It Contains many methods.

1. getConnection()
2. getConnection(String location)

1.cleanUp(Connection connection)
2.cleanUp(Connection connection, Statement statement)

By Using these methods we can get Connection and we can cleanup connection.


Connection Con = DataAccess.getConnection();
---------
---------
DataAccess.cleanUp(con);

Comments

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate