Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application using the CData JDBC Driver for JD Edwards.Follow these steps:
- Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.jdedwards.JDEdwardsDriver
- Provide the JDBC URL. For example:
jdbc:jdedwards:URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;
Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:
jdbc:cdata:jdedwards:URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;
Ensure that the URL starts with either jdbc:jdedwards: or jdbc:cdata:jdedwards:. The URL can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to JD Edwards
The driver connects to JD Edwards through your JD Edwards Application Interface Services (AIS) Server.
Set the following connection properties to connect:
- URL: The base HTTPS URL of your AIS Server. For example: https://jde-ais.example.com:8300
- User: Your JD Edwards username.
- Password: Your JD Edwards password.
- Environment (optional): The JD Edwards environment to use (for example, PD920 for production or DV920 for development). The environment determines which database and configuration settings the provider uses during the session. If not specified, the AIS Server's default environment is used.
- Role (optional): The JD Edwards role for the session. Roles in JD Edwards determine the permissions and data access for the session. If not specified, the AIS Server's default role is used.
- DeviceName (optional): An identifier for the connecting device or application, used for auditing and logging on the AIS Server. If not specified, the IP address of the device the driver is running on is used as the identifier.
- Jasserver (optional): The specific JAS (Java Application Server) instance to route requests through. This connection property is useful for associating requests with a particular node in a clustered environment. If not specified, the driver uses the default HTML Server configured for the AIS Server.
To control what exact JD Edwards data is exposed, set these properties:
- DataModel: A module (or a comma-separated list of modules) whose system codes you want to expose as schemas in the driver. Supported values include All, FinancialManagement, HumanCapitalManagement, Logistics, Manufacturing, OrderManagement, RealEstateManagement, and others. Defaults to FinancialManagement.
- SystemCodes: A comma-separated list of additional JD Edwards system codes to expose as schemas alongside those of the selected DataModel(s). For example, SystemCodes=42,43.
Token Caching
The driver uses your credentials to obtain a session token, which is necessary to request your JD Edwards data from the API, from the AIS Server and caches it for subsequent requests.On the first connection, the driver sends your credentials to the AIS Server to obtain a session token. You can use the CredentialsLocation property to change the token storage location.
When the session token approaches expiry — after approximately 90% of the AIS Server's configured session timeout — the driver automatically requests a new token using the stored credentials.