Pool de connexion

From Tuxunix
Jump to: navigation, search

Informations détailler sur les pools de connexions

  • Accès au Mbean de la fabrique de connexions ou de la source de données à l'aide de wsadmin
#> ./wsadmin.sh -conntype SOAP -host 127.0.0.1 -user xxxxx -password xxxxx -port 8882
xxxxx> $AdminControl queryNames *:type=DataSource,*
xxxxx> set objectName [$AdminControl queryNames *:name=DATASOURCE_xxxxxxx,*]
xxxxx> $AdminControl invoke $objectName showAllPoolContents

PoolManager name:jdbc/WebsphereXXXXXDS
PoolManager object:272109624
Total number of connections: 6 (max/min 60/1, reap/unused/aged 180/7200/1800, connectiontimeout/purge 180/FailingConnectionOnly)
                               (testConnection/inteval false/0, stuck timer/time/threshold 0/0/0, surge time/connections 0/-1)
Shared Connection information (shared partitions 200)
  No shared connections 

Free Connection information (free distribution table/partitions 30/1)
  (0)(0)MCWrapper id 6f0c6f0c  Managed connection WSRdbManagedConnectionImpl@34fa34fa  State:STATE_ACTIVE_FREE
  (0)(0)MCWrapper id 3df03df0  Managed connection WSRdbManagedConnectionImpl@4bbc4bbc  State:STATE_ACTIVE_FREE
  (0)(0)MCWrapper id 4500450  Managed connection WSRdbManagedConnectionImpl@63766376  State:STATE_ACTIVE_FREE
  (0)(0)MCWrapper id 215c215c  Managed connection WSRdbManagedConnectionImpl@5e065e06  State:STATE_ACTIVE_FREE
  (0)(0)MCWrapper id 542e542e  Managed connection WSRdbManagedConnectionImpl@431e431e  State:STATE_ACTIVE_FREE
  (0)(0)MCWrapper id 1d601d6  Managed connection WSRdbManagedConnectionImpl@4540454  State:STATE_ACTIVE_FREE
 
  Total number of connection in free pool: 6
UnShared Connection information
  No unshared connections

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Récupérer les informations dans un fichier

#> ./wsadmin.sh -conntype SOAP -host 127.0.0.1 -user xxxxx -password xxxx -port xxxx -c '$AdminControl invoke [$AdminControl queryNames *:name=DATASOURCE_WebsphereXXXXXX,*] showAllPoolContents' >/tmp/pool.log

Purger pool de connexions

xxxxx> $AdminControl invoke $objectName purgePoolContents normal
xxxxx> $AdminControl invoke $objectName purgePoolContents immediate

Nombre maximal de connexions

xxxxx> $AdminControl setAttribute $objectName maxConnections 200


Délai d'inutilisation

Le délai d'inutilisation peut être modifié à tout moment.

xxxxx> $AdminControl getAttribute $objectName unusedTimeout
xxxxx> $AdminControl setAttribute $objectName unusedTimeout 900