RE: DXP - Attempting to Use Multiple JNDI Connections to External DB

John O'Flaherty, modified 6 Years ago. New Member Posts: 14 Join Date: 1/25/14 Recent Posts

Hi all,

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 here . 

 

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. 

 

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. 

 

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.

Regards,

 

John

 

 

Amos Fong, modified 6 Years ago. New Member Posts: 14 Join Date: 1/25/14 Recent Posts
Hi all, 

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. 

Regards,

​​​​​​​John