Spring
- Spring Reference
- Spring Java Doc
- Spring blog (by author of Spring in Action)
- Good post on property placeholder configurer
- Post on custom annotations for auto-wiring
- Post on enums as beans
- Post on string array as a bean
and this too
This may be useful in the future for pre-loading beans (e.g., command line arguments)
DefaultListableBeanFactory factory = (DefaultListableBeanFactory) ctx.getBeanFactory();
GenericBeanDefinition mainArgs = new GenericBeanDefinition();
mainArgs.setBeanClassName(...)
factory.registerBeanDefinition();
Apache Commons DBCP
c3p0 Connection Pool Configuration via Spring:
Found this on the spring forums:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="user" value="${db.username}"/>
<property name="password" value="${db.password}"/>
<property name="driverClass" value="${db.driverClassName}"/>
<property name="jdbcUrl" value="${db.url}"/>
<property name="initialPoolSize" value="0"/>
<property name="maxPoolSize" value="1"/>
<property name="minPoolSize" value="1"/>
<property name="acquireIncrement" value="1"/>
<property name="acquireRetryAttempts" value="0"/>
</bean>
Add new attachment
Only authorized users are allowed to upload new attachments.