I
I
Igor Alexandrovich2014-09-23 17:46:27
Java
Igor Alexandrovich, 2014-09-23 17:46:27

Liferay portal and Hibernate, how to work with DB through datasource?

Hello.
I am creating a Liferay Portlet using Hibernate. How to work with the database through datasource?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antiso, 2014-09-27
@tyanigor

Specify the JNDI datasource in persistence.xml by first configuring it on the server (for Tomcat this is done in context.xml) and writing the resource-env-ref section in web.xml.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question