1 21 22 package org.opensubsystems.core.persist.db; 23 24 import java.sql.Connection ; 25 26 import org.opensubsystems.core.error.OSSConfigException; 27 import org.opensubsystems.core.error.OSSDatabaseAccessException; 28 import org.opensubsystems.core.error.OSSException; 29 30 46 public interface DatabaseConnectionFactory 47 { 48 65 Connection requestConnection( 66 boolean bAutoCommit 67 ) throws OSSDatabaseAccessException; 68 69 88 Connection requestConnection( 89 boolean bAutoCommit, 90 String strUser, 91 String strPassword 92 ) throws OSSDatabaseAccessException; 93 94 117 Connection requestConnection( 118 boolean bAutoCommit, 119 String strDataSourceName 120 ) throws OSSDatabaseAccessException; 121 122 147 Connection requestConnection( 148 boolean bAutoCommit, 149 String strDataSourceName, 150 String strUser, 151 String strPassword 152 ) throws OSSDatabaseAccessException; 153 154 160 void returnConnection( 161 Connection cntDBConnection 162 ); 163 164 166 171 String getDatabaseDriver( 172 ); 173 174 179 void setDatabaseDriver( 180 String strDatabaseDriver 181 ); 182 183 189 String getRealDatabaseDriver( 190 ); 191 192 197 String getDatabasePassword( 198 ); 199 200 205 void setDatabasePassword( 206 String strDatabasePassword 207 ); 208 209 214 String getDatabaseURL( 215 ); 216 217 222 void setDatabaseURL( 223 String strDatabaseURL 224 ); 225 226 231 String getDatabaseUser( 232 ); 233 234 239 void setDatabaseUser( 240 String strDatabaseUser 241 ); 242 243 248 String getDatabaseAdminUser( 249 ); 250 251 256 void setDatabaseAdminUser( 257 String strDatabaseUser 258 ); 259 260 265 String getDatabaseAdminPassword( 266 ); 267 268 273 void setDatabaseAdminPassword( 274 String strDatabasePassword 275 ); 276 277 284 boolean getUseAdminDataSource( 285 ); 286 287 294 void setUseAdminDataSource( 295 boolean bUseAdminDataSource 296 ); 297 298 305 void loadDefaultDatabaseProperties( 306 ) throws OSSConfigException, 307 OSSDatabaseAccessException; 308 309 320 void addDataSource( 321 String strDataSourceName, 322 String strDriverName, 323 String strUrl, 324 String strUser, 325 String strPassword 326 ) throws OSSDatabaseAccessException; 327 328 333 void setDefaultDataSourceName( 334 String strDataSourceName 335 ); 336 337 342 String getDefaultDataSourceName( 343 ); 344 345 351 boolean isDataSourceDefined( 352 String strDataSourceName 353 ); 354 355 362 void stop( 363 ) throws OSSException; 364 365 367 374 int getTotalRequestedConnectionCount( 375 ); 376 377 384 int getRequestedConnectionCount( 385 ); 386 387 395 int getRequestedConnectionCount( 396 String strDataSourceName 397 ); 398 399 405 String debug( 406 ); 407 } 408
| Popular Tags
|