Model Context Protocol (MCP) finally gives AI models a way to access the business data needed to make them really useful at work. CData MCP Servers have the depth and performance to make sure AI has access to all of the answers.
Try them now for free →Connect to Workday Data from a Connection Pool in Jetty
The Workday JDBC Driver supports connection pooling: This article shows how to connect faster to Workday data from Web apps in Jetty.
The CData JDBC driver for Workday is easy to integrate with Java Web applications. This article shows how to efficiently connect to Workday data in Jetty by configuring the driver for connection pooling. You will configure a JNDI resource for Workday in Jetty.
About Workday Data Integration
CData provides the easiest way to access and integrate live data from Workday. Customers use CData connectivity to:
- Access the tables and datasets you create in Prism Analytics Data Catalog, working with the native Workday data hub without compromising the fidelity of your Workday system.
- Access Workday Reports-as-a-Service to surface data from departmental datasets not available from Prism and datasets larger than Prism allows.
- Access base data objects with WQL, REST, or SOAP, getting more granular, detailed access but with the potential need for Workday admins or IT to help craft queries.
Users frequently integrate Workday with analytics tools such as Tableau, Power BI, and Excel, and leverage our tools to replicate Workday data to databases or data warehouses. Access is secured at the user level, based on the authenticated user's identity and role.
For more information on configuring Workday to work with CData, refer to our Knowledge Base articles: Comprehensive Workday Connectivity through Workday WQL and Reports-as-a-Service & Workday + CData: Connection & Integration Best Practices.
Getting Started
Configure the JDBC Driver for Salesforce as a JNDI Data Source
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
- Add the CData and license file, located in the lib subfolder of the installation directory, into the lib subfolder of the context path.
-
Declare the resource and its scope. Enter the required connection properties in the resource declaration. This example declares the Workday data source at the level of the Web app, in WEB-INF\jetty-env.xml.
<Configure id='workdaydemo' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="workdaydemo" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg><Ref refid="workdaydemo"/></Arg> <Arg>jdbc/workdaydb</Arg> <Arg> <New class="cdata.jdbc.workday.WorkdayDriver"> <Set name="url">jdbc:workday:</Set> <Set name="User">myuser</Set> <Set name="Password">mypassword</Set> <Set name="Tenant">mycompany_gm1</Set> <Set name="BaseURL">https://wd3-impl-services1.workday.com</Set> <Set name="ConnectionType">WQL</Set> <Set name="InitiateOAuth">GETANDREFRESH</Set> </New> </Arg> </New> </Configure>
To connect to Workday, users need to find the Tenant and BaseURL and then select their API type.
Obtaining the BaseURL and Tenant
To obtain the BaseURL and Tenant properties, log into Workday and search for "View API Clients." On this screen, you'll find the Workday REST API Endpoint, a URL that includes both the BaseURL and Tenant.
The format of the REST API Endpoint is: https://domain.com/subdirectories/mycompany, where:
- https://domain.com/subdirectories/ is the BaseURL.
- mycompany (the portion of the url after the very last slash) is the Tenant.
Using ConnectionType to Select the API
The value you use for the ConnectionType property determines which Workday API you use. See our Community Article for more information on Workday connectivity options and best practices.
API ConnectionType Value WQL WQL Reports as a Service Reports REST REST SOAP SOAP
Authentication
Your method of authentication depends on which API you are using.
- WQL, Reports as a Service, REST: Use OAuth authentication.
- SOAP: Use Basic or OAuth authentication.
See the Help documentation for more information on configuring OAuth with Workday.
-
Configure the resource in the Web.xml:
jdbc/workdaydb javax.sql.DataSource Container -
You can then access Workday with a lookup to java:comp/env/jdbc/workdaydb:
InitialContext ctx = new InitialContext(); DataSource myworkday = (DataSource)ctx.lookup("java:comp/env/jdbc/workdaydb");
More Jetty Integration
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.