IBM WebSphere - Create J2C alias

by
Jeremy Canfield |
Updated: April 12 2022
| IBM WebSphere articles
- In the WebSphere admin console, expand Resources > JDBC or Resoruces > JMS.
- Select any resource.
- Select JAAS - J2C authentication data.
- Select New.
- Give the J2C alias a name and define the username and password. Select OK.
- Select Save.
In this example, a J2C alias named mySQL is created.
On the WebSphere server, the J2C aliases you've created will be in the ${WAS_INSTALL_ROOT}/profiles/dmgr_profile/config/cells/your_cell/security.xml file. The security.xml file will contain something like this.
<authDataEntries
xmi:id="JAASAuthData_1478117720103"
alias="john.doe"
userId="john.doe"
password="{xor}OttvApas44jkrAa="
description="J2C alias for john.doe"
/>
IBM WebSphere - JDBC data source and J2C alias
Configure a Java app to use a JDBC
Connect to a SQL database via DataSource
Connect to a SQL database via DriverManager
At Monitoring and Tuning > Performance Viewer > Current activity > your application server > Summary Reports > JDBC Connection Pools > your JDBC provider > your JNDI, the connection count should be 1 for the single connection to the database.
Did you find this article helpful?
If so, consider buying me a coffee over at