Quantcast
Channel: BTSoru.com - Bilisim ve Yazilim Teknolojileri Soru/Cevap Platformu - latest questions
Viewing all articles
Browse latest Browse all 4270

Spring Datasource Parametreleri

$
0
0

Merhaba, Datasource tanımlaması aşağıdaki gibi yapıyorum. Sorunum şu properties içinde tanımladığım parametrelerin çalışıp çalışmadığını nasıl anlarım?

Kaç tane aktif connection olduğunu anlamanın bir yolu var mı?

@Bean(name="dataSource") public DataSource getDataSource() {

DriverManagerDataSource dataSource = null; String driverClassName = "com.ibm.db2.jcc.DB2Driver"; String url = Helper.getAppMessage("db2.url");
String username = Helper.getAppMessage("db2.userId");
String password = Helper.getAppMessage("db2.password");

Properties prop = new Properties();
prop.put("initialSize",20); prop.put("removeAbandoned",true); prop.put("maxActive", 100); prop.put("minIdle", 1); prop.put("maxIdle", 5); prop.put("validationQuery","select 1 from sysibm.sysdummy1"); prop.put("testOnBorrow", true);

dataSource = new DriverManagerDataSource(url,prop); dataSource.setDriverClassName(driverClassName); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password);

return dataSource; }


Viewing all articles
Browse latest Browse all 4270

Trending Articles


huddam daveti


Tekasür Suresi


"Yâ Kuddûs!" Esması Havâs ve Esrârı


Kasemi Mübelliğa


Peri44


Kuvvetli muhabbet ve aşk tılsımı


El-Mütekebbir


Papaz büyüsü


SCCM 2012 Client Installation issue


Zilhicce Ayının Namaz Duası ÖNEMLİ