Fórum

How to i access the default DataSource from a portlet ?

Hugo Palma, modificado 13 Anos atrás.

How to i access the default DataSource from a portlet ?

New Member Postagens: 20 Data de Entrada: 13/09/07 Postagens Recentes
I would like to have programmatic access to the Liferay DataSource from a custom portlet so that i can execute some custom queries.

i tried injecting the liferayDataSource bean but i just get the "bean not defined error".
Any ideas ?
thumbnail
jelmer kuperus, modificado 13 Anos atrás.

RE: How to i access the default DataSource from a portlet ? (Resposta)

Liferay Legend Postagens: 1191 Data de Entrada: 10/03/10 Postagens Recentes
InfrastructureUtil.getDataSource()
Hugo Palma, modificado 13 Anos atrás.

RE: How to i access the default DataSource from a portlet ?

New Member Postagens: 20 Data de Entrada: 13/09/07 Postagens Recentes
Thanks, that worked great.