Revision 2716
Added by sgarg about 19 years ago
src/edu/ucsb/nceas/metacat/DBConnectionPool.java | ||
---|---|---|
651 | 651 |
DBConnection conn = null; // the dbconnection |
652 | 652 |
connectionPoolSize = connectionPool.size(); |
653 | 653 |
freeConnectionSize = getFreeDBConnectionNumber(); |
654 |
difference = connectionPoolSize - freeConnectionSize; |
|
655 | ||
654 | 656 |
if(freeConnectionSize < connectionPoolSize){ |
655 |
int numberOfConnections = connectionPoolSize - freeConnectionSize; |
|
656 |
logMetacat.warn(numberOfConnections + "connections " + |
|
657 |
"being used out of " +connectionPoolSize + " connections"); |
|
657 |
logMetacat.warn(difference + " connection(s) " + |
|
658 |
"being used and connection pool size is " +connectionPoolSize); |
|
658 | 659 |
} else { |
659 | 660 |
logMetacat.info("Connection pool size: " +connectionPoolSize); |
660 | 661 |
logMetacat.info("Free Connection number: "+freeConnectionSize); |
661 | 662 |
} |
662 |
difference = connectionPoolSize - freeConnectionSize; |
|
663 | 663 |
|
664 | 664 |
//If all connections are free and connection pool size greater than |
665 | 665 |
//initial value, shrink connection pool size to intital value |
... | ... | |
719 | 719 |
DBConnection conn = null; // the dbconnection |
720 | 720 |
connectionPoolSize = connectionPool.size(); |
721 | 721 |
freeConnectionSize = getFreeDBConnectionNumber(); |
722 |
logMetacat.warn("Connection pool size: " +connectionPoolSize); |
|
723 |
logMetacat.warn("Free Connection number: "+freeConnectionSize); |
|
724 | 722 |
difference = connectionPoolSize - freeConnectionSize; |
723 | ||
724 |
if(freeConnectionSize < connectionPoolSize){ |
|
725 |
logMetacat.warn(difference + " connection(s) " + |
|
726 |
"being used and connection pool size is " +connectionPoolSize); |
|
727 |
} else { |
|
728 |
logMetacat.info("Connection pool size: " +connectionPoolSize); |
|
729 |
logMetacat.info("Free Connection number: "+freeConnectionSize); |
|
730 |
} |
|
725 | 731 |
|
726 | 732 |
//If all connections are free and connection pool size greater than |
727 | 733 |
//initial value, shrink connection pool size to intital value |
Also available in: Unified diff
Modified the WARNing message