<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>DXP - Attempting to Use Multiple JNDI Connections to External DB</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111176815" />
  <subtitle>DXP - Attempting to Use Multiple JNDI Connections to External DB</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111176815</id>
  <updated>2026-04-06T03:44:50Z</updated>
  <dc:date>2026-04-06T03:44:50Z</dc:date>
  <entry>
    <title>RE: DXP - Attempting to Use Multiple JNDI Connections to External DB</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111294388" />
    <author>
      <name>John O'Flaherty</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111294388</id>
    <updated>2018-10-23T16:02:58Z</updated>
    <published>2018-10-23T16:02:58Z</published>
    <summary type="html">Hi all, &lt;br /&gt;&lt;br /&gt;having worked this offline, it appears that this feature is not support in DXP. in its place we created a number of service builder modules for each pool. From there we brought these in as dependancies in a war/wab project. This successfully resolved our issue. &lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;​​​​​​​John</summary>
    <dc:creator>John O'Flaherty</dc:creator>
    <dc:date>2018-10-23T16:02:58Z</dc:date>
  </entry>
  <entry>
    <title>DXP - Attempting to Use Multiple JNDI Connections to External DB</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111176814" />
    <author>
      <name>John O'Flaherty</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111176814</id>
    <updated>2018-10-09T11:34:10Z</updated>
    <published>2018-10-09T11:34:10Z</published>
    <summary type="html">&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;In 6.2 we successfully migrated our applications from JDBC
  connections to use the application server JNDI connection pool. Each
  application had its own resources defined within an xml file located
  within catalina/conf/localhost. This working perfectly and all
  applications were able to connect to the intended databases. Portlets
  with single connection pool resource links worked as did multiple
  resourcelink portlet.  As part of a migration to DXP i am attempting
  to replicate the same setup, we are successful for portlets with a
  single resource link and using the original ext-spring 6.2 settings
  setup or the setup outlined &lt;a href="http://www.javasavvy.com/liferay-jdbc-connection-pool/"&gt;here&lt;/a&gt; . &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My issue however is with portlets using multiple external jndi pools,
  in 6.2 this seemed to be straightforward with defining pool within
  tomcat, adding the resources and defining ext-spring and linking in
  via service xml. However for 7 its seems that this approach is
  problematic (at least for my scenario), when i use the DynamicQuery
  class to issue a basic listing query i do not get any errors  but
  merely an empty list is returned. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;A few points of note, when i do start the server i see that the
  external server dialect is detected (in this case MS SQL) as indicated
  in the attachment. I've included my ext-spring configuration and the
  service xml of the affected entities. Additionally this migration
  effort is concerned with migrating 6.2 code to 7 compliant war/wab. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In essence i am hoping to continue our 6.2 practice of using multiple
  external DB connections in a portlet and I'd greatly appreciate any
  assistance possible.  Please do let me know if I'm am missing any
  information or if any questions arise.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;John&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>John O'Flaherty</dc:creator>
    <dc:date>2018-10-09T11:34:10Z</dc:date>
  </entry>
</feed>
