How do I implement a JNDI database connection on Liferay PaaS
Written By
Alfonso Crisci
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience
Could offerings to Liferay SaaS (formerly LXC) and
Liferay PaaS (formerly LXC-SM).
Issue
- Portal Administrators may require a connection to the database through a Java Naming and Directory Interface (following: JNDI) instead of the JDBC properties through the traditional portal-ext.properties file. How can this be configured in a dockerized environment like Liferay PaaS?
Resolution
- While Liferay PaaS does not have a standard out-of-the-box way to achieve JNDI connection, the best approach to resolve this technical requirement is through scripts (see also: V4 specific changes here).
- In order to edit or override the necessary Tomcat files, you may craft a script that performs the changes.
- Please note, this is considered to be a customization topic for which Liferay Support may only provide limited assistance.
Did this article resolve your issue ?