Update of /var/cvs/src/org/mmbase/module/database In directory james.mmbase.org:/tmp/cvs-serv23001
Modified Files: JDBC.java Removed Files: ConnectionWrapper.java.16 JDBCInterface.java JDBCProbe.java Naming.java Log Message: some cleanin up See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/database Index: JDBC.java =================================================================== RCS file: /var/cvs/src/org/mmbase/module/database/JDBC.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -b -r1.58 -r1.59 --- JDBC.java 20 Feb 2008 10:34:22 -0000 1.58 +++ JDBC.java 1 Aug 2008 19:36:51 -0000 1.59 @@ -12,10 +12,12 @@ import java.util.*; import java.sql.*; +import java.util.concurrent.*; import org.mmbase.util.*; import org.mmbase.module.*; + import org.mmbase.util.logging.*; /** @@ -25,9 +27,9 @@ * * @deprecation-used drop reference to [EMAIL PROTECTED] JDBCInterface} * @author vpro - * @version $Id: JDBC.java,v 1.58 2008/02/20 10:34:22 michiel Exp $ + * @version $Id: JDBC.java,v 1.59 2008/08/01 19:36:51 michiel Exp $ */ -public class JDBC extends ProcessorModule implements JDBCInterface { +public class JDBC extends ProcessorModule { private static final Logger log = Logging.getLoggerInstance(JDBC.class); @@ -42,11 +44,11 @@ private String databaseSupportClass; private DatabaseSupport databaseSupport; private MultiPoolHandler poolHandler; - private JDBCProbe probe = null; private String jdbcName; private String jdbcPassword; private long probeTime; private long maxLifeTime = 120000; + private ScheduledFuture future; { addFunction(new GetNodeListFunction("POOLS", PARAMS_PAGEINFO)); @@ -69,9 +71,12 @@ * Initialize the properties and get the driver used */ public void init() { - // This is now called in onload(), which is called before init() - // getProps(); - probe = new JDBCProbe(this, probeTime); + future = ThreadPools.scheduler.scheduleAtFixedRate(new Runnable() { + public void run() { + JDBC.this.checkTime(); + } + }, + probeTime, probeTime, TimeUnit.MILLISECONDS); log.info("Module JDBC started (" + this + ")"); } @@ -97,6 +102,7 @@ public void unload() { } protected void shutdown() { + future.cancel(true); poolHandler.shutdown(); } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs