Application Development Based on Weblogic 7.0

Source: Internet
Author: User

1. Database Connection
This document uses the SQL Server database as an example to describe how to access the database through ConnectionPool And DataSource.
1. Install the driver provided by Microsoft
Install JDBC For SQL Server Driver from Microsoft website http://www.microsoft.com/downloads/details.aspx? Install the driver. Modify the Classpath of WebLogic 7 and add
% SQLServer_JDBC % libmsbase. jar;
% SQLServer_JDBC % libmssqlserver. jar;
% SQLServer_JDBC % libmsutil. jar
, Restart WebLogic
2. Configure WebLogic.
Procedure:
To use ConnectionPool with DataSource, follow these steps:
1) create a connection pool (ConnectionPool ).
A. Select Services/JDBC/Connection Pools from the Console menu.
B. Click Configure a new JDBC Connection Pool...
C. Fill in the Configuration/General tab (the parameters vary depending on the JDBC driver)
Method 1: Use the Microsoft JDBC For SQL Server Driver:
Name: SQLServerPool
URL: jdbc: microsoft: sqlserver: // localhost: 1433; DatabaseName = master
Driver Classname: com. microsoft. jdbc. sqlserver. SQLServerDriver
Properties (key = value): user = sa
Password = sa
Method 1: Use the bea jdbc For SQL Server Driver (Chinese problems exist)
Name: SQLServerPool
URL: jdbc: microsoft: sqlserver: // localhost: 1433; DatabaseName = master
Driver Classname: com. microsoft. jdbc. sqlserver. SQLServerDriver
Properties (key = value): user = sa
Password = sa
D. Click Create.
E. Configuration/Connections Tab:
Initial Capacity: 1
Maximum Capacity: 5
Other Default values
F. Click Apply.
G. Targets/Servers Tab:
Select myserver and click Apply! If no error is reported, the connection pool is successfully created!
2) map the connection pool to a 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.