use of java.beans.PropertyVetoException in project j2objc by google.
the class PropertyVetoExceptionTest method testPropertyVetoException_EventNull.
public void testPropertyVetoException_EventNull() {
String message = "testPropertyVetoException";
PropertyVetoException e = new PropertyVetoException(message, null);
assertSame(message, e.getMessage());
assertNull(e.getPropertyChangeEvent());
}
use of java.beans.PropertyVetoException in project j2objc by google.
the class PropertyVetoExceptionTest method testPropertyVetoException.
public void testPropertyVetoException() {
String message = "testPropertyVetoException";
PropertyVetoException e = new PropertyVetoException(message, event);
assertSame(message, e.getMessage());
assertSame(event, e.getPropertyChangeEvent());
}
use of java.beans.PropertyVetoException in project j2objc by google.
the class PropertyVetoExceptionTest method testPropertyVetoException_MessageNull.
public void testPropertyVetoException_MessageNull() {
String message = null;
PropertyVetoException e = new PropertyVetoException(message, event);
assertNull(e.getMessage());
assertSame(event, e.getPropertyChangeEvent());
}
use of java.beans.PropertyVetoException in project jfinal by jfinal.
the class C3p0Plugin method start.
public boolean start() {
if (isStarted)
return true;
dataSource = new ComboPooledDataSource();
dataSource.setJdbcUrl(jdbcUrl);
dataSource.setUser(user);
dataSource.setPassword(password);
try {
dataSource.setDriverClass(driverClass);
} catch (PropertyVetoException e) {
dataSource = null;
System.err.println("C3p0Plugin start error");
throw new RuntimeException(e);
}
dataSource.setMaxPoolSize(maxPoolSize);
dataSource.setMinPoolSize(minPoolSize);
dataSource.setInitialPoolSize(initialPoolSize);
dataSource.setMaxIdleTime(maxIdleTime);
dataSource.setAcquireIncrement(acquireIncrement);
isStarted = true;
return true;
}
use of java.beans.PropertyVetoException in project databus by linkedin.
the class MysqlMaxSCNHandler method createConnectionPool.
private static ComboPooledDataSource createConnectionPool(StaticConfig staticConfig) throws DatabusException {
ComboPooledDataSource cpds = new ComboPooledDataSource();
try {
cpds.setDriverClass(staticConfig.getDriverClass());
} catch (PropertyVetoException e) {
throw new DatabusException("Unable to create connection pool", e);
}
cpds.setJdbcUrl(staticConfig.getJdbcUrl());
cpds.setUser(staticConfig.getDbUser());
cpds.setPassword(staticConfig.getDbPassword());
//TODO : Default connection pool setting, make it configurable
return cpds;
}
Aggregations