Tomcat _ configure jdbc (small example) and tomcat configure jdbc

Source: Internet
Author: User

Tomcat _ configure jdbc (small example) and tomcat configure jdbc

 Original works, from "Deep Blue blog" blog, deep blue blog: http://blog.csdn.net/huangyanlong/article/details/47043975

 

Example of jdbc configuration under tomcat

When you use tomcat to manually configure jdbc, The jdbc. properties file is generally found in the "Application name \ WEB-INF \ classes" folder under the application webapps.

Configure jdbc as follows:

Jdbc. driverClassName = oracle. jdbc. driver. OracleDriver
Jdbc. url = jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = yes) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.60) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.61) (PORT = 1521) (CONNECT_DATA = (FAILOVER_MODE = (TYPE = select) (METHOD = basic )) (SERVICE_NAME = hyldb )))
# Jdbc. url = jdbc \: oracle \: thin \: @ localhost \: 1521 \: orcl

Jdbc. username = hyl_old_user
Jdbc. password = hyl_old_1


Hylnowdb. driverClassName = oracle. jdbc. driver. OracleDriver
Hylnowdb. url = jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = yes) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.60) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.61) (PORT = 1521) (CONNECT_DATA = (FAILOVER_MODE = (TYPE = select) (METHOD = basic )) (SERVICE_NAME = hyldb )))
Hylnowdb. username = hyl_now_user
Hylnowdb. password = hyl_now_1

Hylnewdb. driverClassName = oracle. jdbc. driver. OracleDriver
Hylnewdb. url = jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = yes) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.60) (PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.61) (PORT = 1521) (CONNECT_DATA = (FAILOVER_MODE = (TYPE = select) (METHOD = basic )) (SERVICE_NAME = hyldb )))
Hylnewdb. username = hyl_new_user
Hylnewdb. password = hyl_new_1

 

DeployCode = 23
Title = \ u9ED1 \ u9F99 \ u6C5F \ u5211 \ u4FA6 \ u4FE1 \ u606F \ u4E13 \ u4E1A \ u5E94 \ u7528 \ u7CFB \ u7EDF
Area = \ u9ED1 \ u9F99 \ u6C5F

UploadPlace = C:/fileUpload/

UploadUrl = C \:/uploadImg/UploadAccountImg/


A brief explanation of the meaning of this part is as follows:
1. The program's JNDI names are jdbc, hylnowdb, and hylnewdb;
2. jdbc. url indicates the database address;
3. jdbc. username indicates the username used to access the database;
4. jdbc. password indicates the password used to access the database;
5. jdbc. the url represents the part after the database ADDRESS "jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = yes) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.60) (PORT = 1521) (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.61) (PORT = 1521) (CONNECT_DATA = (FAILOVER_MODE = (TYPE = select) (METHOD = basic) (SERVICE_NAME = hyldb) ", which is the connected rac cluster database and uses the manual configuration of the client to implement Load Balancing Fault Tolerance configuration;

 

**************************************** * ** Blue growth series ********************************* *******************

Original works, from the blog of "Deep Blue". You are welcome to reprint them. Please indicate the source (Http://blog.csdn.net/huangyanlong).

Blue growth note-chasing DBA (1): traveling on the road to Shandong

Blue growth notes-Chase DBA (2): Install! Install! Long-lost memories have aroused my new awareness of DBAs.

Blue growth note-chasing DBA (3): importing and exporting data on antiques becomes a problem

Blue growth note-chasing DBA (4): recalling the sorrow of teenagers, and exploring oracle Installation (10g and 11g in Linux)

Blue growth note-chasing DBA (5): Not talking about technology or business, annoying Application Systems

Blue growth note-chasing DBA (6): doing things and being human: Small technology, great human

Blue growth note-Chase DBA (7): Basic commands, foundation stone

Blue growth notes-chasing DBA (8): repicking SP reports and recalling oracle's STATSPACK Experiment

Blue growth note-chasing DBA (9): Chasing DBA, new planning, new departure

Blue growth note-chasing DBA (10): Flying knife defense, familiarity rather than expertise: Playing with middleware Websphere

Blue growth note-chasing DBA (11): It's easy to go home and wake up.

Blue growth notes-Chase DBA (12): seven days and seven gains of SQL

Blue growth note-chasing DBA (13): Coordinating hardware manufacturers, six stories: what you see as "servers, storage, switches ......"

Blue growth note-chasing DBA (14): An unforgettable "Cloud" end, started hadoop deployment

Blue growth note-chasing DBA (15): Who thinks FTP is "simple" and thinks it is a trigger

Blue growth note-chasing DBA (16): DBA also drank alcohol and was rejected

Blue growth note-Chase DBA (17): whether to share or consume, learn to grow in the Post-IOE Era

**************************************** **************************************** **********************************

 

**************************************** ******************************** *****************

Original works, from the blog of "Deep Blue". You are welcome to reprint them. Please indicate the source (Http://blog.csdn.net/huangyanlong).

Football and oracle series (1): 32-way zhoudianbing, overall view of group A Brazil smon process of oracle32 process Alliance

Football and oracle series (2)

Football and oracle series (3): oracle process rankings, the World Cup round is about to fight!

Football and oracle series (4): from Brazil to Germany, think of the different RAC topology comparison! 

Football and oracle series (5): The directX library missing in the voda14 game is similar to the oracle rpm package!

Football and oracle series (6): Asian Cup with database creation-come on, Chinese Team

**************************************** **************************************** **********************************

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

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.