Search code examples
database-connectionliferayliferay-6

How to get database connection object


I would like to get database connection object in portlet environment. So, what is java class name which provide the connection object ?

(i don't use servicebuilder because of my own reasons).

Thank for all suggestions !


Solution

  • Use this class in com.liferay.portal.kernel.dao.jdbc package:

    DataAccess.getConnection()