Brian Zuppardi 2 Years Ago - Edited Thank you, this is just what I needed! We've been having issues using JNDI in our local testing of 7.4.13-ga1. I was able to leverage my existing setup (context.xml) and fix this just by changing the location where I was copying the mysql jdbc jar into the container from TOMCAT_HOME/lib/ext to TOMCAT_HOME/lib. Please sign in to reply. Reply as... Cancel
Matthias Bläsing 2 Years Ago - Edited We are currently trying to migrate from 7.3.X to 7.4 and the first smoke test already showed serious problems, as the JNDI setup seems to be broken (a JNDI datasource for Liferay works, but not JNDI Datasources in portlets). We use hibernate and the tomcat connection pools and these don't work anymore. This seems to be a known issue: https://issues.liferay.com/browse/LPS-138890 We are willing to rework the shared connection pool integration, but I came up empty. Ideas welcome. Please sign in to reply. Reply as... Cancel Matthias Bläsing Matthias Bläsing 2 Years Ago - Edited Answering myself, we are experimenting with providing the connetion pools from a JNDI module. While the JNDI environment of tomcat is invisible to the portlets, a JNDI environment is still present. Our module expects HikariCP to be provided from the OSGI environment and uses an OSGI @Component(immediate=true). In the activator an InitialContext is created, the "java:/comp/env/jdbc" subcontext is created and based on a property file entries for DB connections are created using Hikari. These entries are then visible to other modules (including portlets) and can be queried by them via JNDI. Please sign in to reply. Reply as... Cancel
Matthias Bläsing Matthias Bläsing 2 Years Ago - Edited Answering myself, we are experimenting with providing the connetion pools from a JNDI module. While the JNDI environment of tomcat is invisible to the portlets, a JNDI environment is still present. Our module expects HikariCP to be provided from the OSGI environment and uses an OSGI @Component(immediate=true). In the activator an InitialContext is created, the "java:/comp/env/jdbc" subcontext is created and based on a property file entries for DB connections are created using Hikari. These entries are then visible to other modules (including portlets) and can be queried by them via JNDI. Please sign in to reply. Reply as... Cancel
Orin Fink 1 Year Ago - Edited David, thanks for sharing this detail on using JNDI for the connection pool in Liferay 7.4. That has been successful for us. However, when configuring the Mail connection, we've found that we would have to delete the mail.jar and activation.jar from the shielded-container-lib in order for it to work. Does that seem like something that would be expected? Please sign in to reply. Reply as... Cancel
Christopher Jazinski 10 Months Ago - Edited Thanks David!. We upgraded from 7.2 to 7.4 and your solution resovled our issue. Please sign in to reply. Reply as... Cancel