Bootstrap FreeKB - IBM WebSphere - Create J2C alias
IBM WebSphere - Create J2C alias

Updated:   |  IBM WebSphere articles

  1. In the WebSphere admin console, expand Resources > JDBC or Resoruces > JMS.
  2. Select any resource.
  3. Select JAAS - J2C authentication data.
  4. Select New.
  5. Give the J2C alias a name and define the username and password. Select OK.
  6. 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 Buy Me A Coffee



Comments


Add a Comment


Please enter 57db72 in the box below so that we can be sure you are a human.