In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, test the connection mode of java DB.
As far as I know, there are two kinds of things:
ConnectionPoolDataSource
PooledConnection getPooledConnection () attempts to establish a physical database connection that can be used as a pooled connection
PooledConnection getPooledConnection (String usr,String password) attempts to establish a physical database connection that can be used as a pooled connection
Interface DataSource
Basic implementation-generate standard Connection objects
Connection pooling implementation-generates Connection objects that automatically reference jade connection pooling, which is used with the middle-tier connection pooling manager
Distributed transaction implementation-generates a Connection object that can be used for distributed transactions and always participates in connection pooling in most cases. This implementation is used with the middle-tier transaction manager and, in most cases, with the connection pool manager.
The properties of the DataSource object can be modified if necessary. For example, if you move the data source to another server, you can change server-related properties. The advantage is that because you can change the properties of the data source, any code that accesses the data source does not need to change
The driver accessed through the DataSource object itself does not register with DriverManager to get the DataSource object through the lookup operation, and then uses this object to create the Connection object using the basic implementation, and the connection obtained through the DataSource object is the same as the connection obtained through the DriverManager facility.
DataSource's own method
Boolean isWrappseFor (Class iface)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.