Navigation Menu

Skip to content

Commit

Permalink
print out connection pool size. record event time for new outgoing ba…
Browse files Browse the repository at this point in the history
…tch history status
  • Loading branch information
chenson42 committed Oct 5, 2007
1 parent 581c26f commit 4f7d001
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Expand Up @@ -14,9 +14,7 @@ abstract public class AbstractJob extends TimerTask {
@Override
public void run() {
try {
//printDatabaseStats();
doJob();
//printDatabaseStats();
} catch (Throwable ex) {
getLogger().error(ex, ex);
}
Expand All @@ -26,8 +24,7 @@ public void run() {

abstract Log getLogger();

@SuppressWarnings("unused")
private void printDatabaseStats() {
protected void printDatabaseStats() {
if (getLogger().isDebugEnabled() && dataSource instanceof BasicDataSource) {
BasicDataSource ds = (BasicDataSource)dataSource;
getLogger().debug("There are currently " + ds.getNumActive() + " active database connections.");
Expand Down
Expand Up @@ -12,6 +12,7 @@ public class HeartbeatJob extends AbstractJob {

@Override
public void doJob() throws Exception {
printDatabaseStats();
bootstrapService.heartbeat();
}

Expand Down
2 changes: 1 addition & 1 deletion symmetric/src/main/resources/symmetric-database.xml
Expand Up @@ -24,7 +24,7 @@
<property name="maxWait" value="${db.pool.max.wait.millis}"/>
<property name="minEvictableIdleTimeMillis" value="${db.pool.min.evictable.idle.millis}"/>
<property name="timeBetweenEvictionRunsMillis" value="120000"/>
<property name="numTestsPerEvictionRun" value="10"/>
</bean>

<bean id="jndiDataSource" class="org.springframework.jndi.JndiObjectFactoryBean"
Expand Down
4 changes: 2 additions & 2 deletions symmetric/src/main/resources/symmetric-services.xml
Expand Up @@ -437,8 +437,8 @@
<property name="runtimeConfiguration" ref="runtimeConfiguration" />
<property name="createdSql">
<value>
insert into ${sync.table.prefix}_outgoing_batch_hist (batch_id, status,
data_event_count) values (?, 'NE', ?)
insert into ${sync.table.prefix}_outgoing_batch_hist (batch_id, status, event_time
data_event_count) values (?, 'NE', current_timestamp, ?)
</value>
</property>
<property name="errorSql">
Expand Down

0 comments on commit 4f7d001

Please sign in to comment.