WebSphere Application Deployment with JDBC connectivity

Steps involved in this are:

  • Create a JDBC source
  • Create a J2C alias
  • Create a Data source
  • Deploy Application
Creating a JDBC Provider

The JDBC provider object provides the actual JDBC driver implementation class for access to a specific database type, that is, Oracle, SQL Server, DB/2 etc. We associate a data source with a JDBC provider and data source provides the connection to the database.

  • In the administration console

            Resources -> JDBC -> JDBC Provider

  • Here we need to select the scope, at which the jdbc provider will be available like CELL/NODE etc. Scope specifies the level at which the resource definition is visible
  • Then click new
  • select database type, Provider, Implementation type and Name
  • Click Next to go to the database classpath screen
  • Click next, shows the summery of your respones. then click finish to create your new jdbc provider
Creating J2C Alias

If a database has security enabled, we need to provide the username and password for the connection. By creating a J2C alias, we can create an authentication resource independent from the provider and data source

  • In the administration console

            security -> global security -> Authentication ->Java Authentication and Authorization Service ->J2C authentication data

  • on the next screen provide, Alias name, DB user name and password
  • and then apply->Save
Creating Data Source
  • In the administration console

            Resources -> JDBC -> DataSource

  • Select the scope
  • On the next page, be asked to fill out the data source information
  • Enter the value for Data source name field and JNDI name field. and proceed to next page
  • Select the JDBC provider that we created, using the above steps
  • Click Next, and in the next screen…enter the database URL field and click next
  • here, you have option to select the authentication for resource type
  •     Component-managed Use when the resource configured in the EJB’s deployment descriptor res-auth property is set to Application.
  •     Container-managed Use when the resource configured in the EJB’s deployment descriptor res-auth property is set to Container.
  • Select the appropriate value and click next to see the summery of your responses.
  • Once they are confirmed, click finish to create the data source.
  • Goto Applications ->install new application
  • select enterprise application and browse the archive (EAR) file
  • Select the install method
  • Map the modules to servers
  • choose the deployment options (detailed was chosen here to show all the options)
  • Map shared libraries, if required
  • Map resource references to resources
  • Mapping virtual hosts for web modules (by default, default_host will be there)
  • Map the context root for the application
  • Review all the steps and options you provided
  • and finish the application deployment
  • start the application and test it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s