![]() |
VOOZH | about |
The CData JDBC driver for Adobe Experience Manager is easy to integrate with Java Web applications. This article shows how to efficiently connect to Adobe Experience Manager data in Jetty by configuring the driver for connection pooling. You will configure a JNDI resource for Adobe Experience Manager in Jetty.
Follow the steps below to connect to Salesforce from Jetty.
Enable the JNDI module for your Jetty base. The following command enables JNDI from the command-line:
java -jar ../start.jar --add-to-startd=jndi
Declare the resource and its scope. Enter the required connection properties in the resource declaration. This example declares the Adobe Experience Manager data source at the level of the Web app, in WEB-INF\jetty-env.xml.
<Configure id='adobeexperiencemanagerdemo' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="adobeexperiencemanagerdemo" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg><Ref refid="adobeexperiencemanagerdemo"/></Arg> <Arg>jdbc/adobeexperiencemanagerdb</Arg> <Arg> <New class="cdata.jdbc.adobeexperiencemanager.AdobeExperienceManagerDriver"> <Set name="url">jdbc:adobeexperiencemanager:</Set> <Set name="URL">https://author-p12345-e67890.adobeaemcloud.com/crx/server</Set> <Set name="User">admin</Set> <Set name="Password">admin</Set> </New> </Arg> </New> </Configure>
The driver connects to Adobe Experience Manager (AEM) instances that expose the JCR repository over WebDAV. It supports both on-premises AEM and AEM as a Cloud Service deployments.
To establish a connection, set the following properties:
Note: Tables are dynamically generated based on the JCR repository structure. Ensure that the configured user has sufficient permissions to access the required content paths in the AEM repository.
Configure the resource in the Web.xml:
jdbc/adobeexperiencemanagerdb javax.sql.DataSource Container
You can then access Adobe Experience Manager with a lookup to java:comp/env/jdbc/adobeexperiencemanagerdb:
InitialContext ctx = new InitialContext();
DataSource myadobeexperiencemanager = (DataSource)ctx.lookup("java:comp/env/jdbc/adobeexperiencemanagerdb");
The steps above show how to configure the driver in a simple connection pooling scenario. For more use cases and information, see the Working with Jetty JNDI chapter in the Jetty documentation.
Download a free trial of the Adobe Experience Manager Driver to get started:
Download NowLearn more:
👁 Adobe Experience Manager IconRapidly create and deploy powerful Java applications that integrate with Adobe Experience Manager.