Primeton EOS I want to configure the data source or replace the database __ dollars

Source: Internet
Author: User
Tags connection pooling jboss

Read the original

Users in the use of general products, sometimes according to business needs, to configure the data source or replace the database connection, divided into the development version of the replacement and operation of the environment replacement.

1. Overview of data Sources

The data sources mentioned in Primeton SOA products are divided into two types, c3p0 data sources and jndi data sources, which are distinguished by the following:

Data Source Type

Applicable application Server

How database connection pooling is managed

Specific configuration Instructions

C3p0

Tomcat, PAS

Implemented by the built-in C3P0 open source software
Database Connection Pool Management

1, create a new one or modify default data source by Governor.
2, the direct configuration database driver class name, connection URL, database name
Call, database user and password.

Jndi

JBoss, WebLogic, WebSphere, etc.

The application server manages the database
Connection pool

1, need to configure the data source on the application server, the data source corresponds to a
Jndi name, the Jndi name defaults to Defaulteosdatasource.
2. Create a new or modified default Jndi data source by Governor.
3. In the Jndi name of the data source, fill in the Jndi name of the application server data source.
Note: The Jndi data source is actually just a reference or association to an application server data source.


2. Studio Replacement Database

Open the Database connections view in studio, make sure that the database connection is broken, and then modify the database connection to directly modify the database connection, user name, and password. You need to update the database type, and you need to change to the database type, driver name, and so on. After the update, be careful to test whether the database can be connected.

Note: The database driver version as much as possible with the database version of the same, the lower version of the database driver may not be good for the high version of the database compatibility, resulting in some unknown problems.

3. Run the environment configure the data source or replace the database

To run the environment to replace the database, you can login to the governor application, select an application, or a cluster (or group), change the data source configuration (configuration-Data source menu).

Data Source Type

suitable for application server

Update mode

Change Content

C3p0

Tomcat, PAS

To modify a data source directly through governor

Directly modify the database connection, user name, and password. The database type needs to be updated.
You also need to change to the database type, driver name, and so on.

Jndi

JBoss, WebLogic, WebSphere, etc.

New Application Server Data source


Modify the original application Server data source

1. Create a new data source (with a corresponding Jndi name) on the application server. 2. Modify the Jndi data source in the governor data source configuration, and modify the Jndi name to be new.

1, view the data source Jndi name of the Jndi data source in the Governor data source.
2, according to this name to the application server to change the corresponding data source configuration, change the database
Connection, user name, and password. You need to update the database type, and you need to change to the database
Type, driver name, and so on.

After you change the data source, to test the connection of the data source, on the governor data source configuration, click the "Test database Connection" button to ensure that the database connection is successful.

4. Add primary key data source

In most cases, getting the primary key uses and applying access to the database using the same data source, however, for frequent business situations, getting the primary key will be more frequent, getting the primary key or periodically updating the database with the latest primary key number, so that the primary key Access database and business operations are in the same transaction, in some databases, especially DB2, Easy to produce table lock phenomenon. To solve this problem, the data source for the primary key and the data source of the business operation can be separated to improve the performance.

Add primary key data source, in the data source configuration function, click "Add primary Key Data source", fill in the data source parameter is OK. The primary key data source default name is Eos-unique and cannot be modified.

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.