/** * Create a new pool from a configuration. * * @param config Config element or null. null will use the central MApi configuration. * @param activator Activator or null. null will use the central MApi Activator. * @throws Exception */ public DbPool(IConfig config,MActivator activator) throws Exception { this.config = config; if (this.config == null) doCreateConfig(); if (activator == null) activator = MApi.lookup(MActivator.class); DbProvider provider = (DbProvider) activator.createObject(this.config.getExtracted("provider",JdbcProvider.class.getCanonicalName())); provider.doInitialize(this.config,activator); this.provider = provider; init(); }