Was learning notes configuration MySQL data source

Source: Internet
Author: User

Recently started to learn about was, which configures MySQL's DataSource in WebSphere today. I downloaded the is for developers version, we recommend that you download this version. Http://www.ibm.com/developerworks/downloads/ws/wasdevelopers/index.html

Run the was console and click the resource->jdbc->jdbc provider in the left navigation menu.

The developer version offers very few JDBC drivers, and we need to install the MySQL JDBC driver ourselves. Set the MySQL JDBC Drive storage path in the system to the WebSphere system variable before creating a new JDBC driver. Click ' Environment ', ' WebSphere variable ', create a new variable Mysql_jdbc_lib

Then go back to the JDBC Driver page and create a new JDBC driver named MySQL jdbc Provider

Notice here that the implementation class name is not the com.mysql.jdbc.Driver we usually use. A closer look at tip will find it necessary to fill in the implementation of Javax.sql.XADatasource or Javax.sql.ConnectionPoolDataSource, so here is the MySQL driver implementation Com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource. So far, MySQL's JDBC driver configuration is complete.

Then configure a DataSource to use for the app. Click on ' Resources ', ' jdbc ', ' data source ', create a new data source on the right panel, follow the wizard, and select the MySQL JDBC driver you just created when choosing the JDBC driver.

It is important to note that the helper class should be filled in com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper

Then on the far right there is a ' custom attribute ' link, Click to set this DataSource access to the database address, user name and password.


Finally, remember to test whether the link was successful. There are also some data pool configurations, such as maximum links, timeouts, and so on, which are nothing to be specific about.

Was learning notes configuration MySQL data source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.