Il giorno 11/apr/05, alle 15:13, Jonny Becker ha scritto:

Apache DBCP Pooling is used here. This is probably a dump question. But why aren't there any configurations made? Is DBCP better than c3p0 (in this case)?

There aren't any configurations here because it's using the defaults. Any configuration parameter that has a setter method in the org.apache.commons.dbcp.BasicDataSource class can be set simply by adding a <property> child element.


Don't. Using Spring, you should define the (possibly pooled) datasource as its own bean, and refer to it in the sessionFactory bean definition. Spring will instantiate and wire them up in the correct order.

Could you give me a small "code" hint, how this should look like. I'm totally new to spring.

There's no code at all! This is the beauty of it. The class implementing the "sessionFactory" bean (org.springframework.orm.hibernate.LocalSessionFactoryBean) has a setDataSource method that will automatically be called with the correct value.

I think you should really get up to speed with Spring, by reading at least the first chapters of its manual. It shouldn't take you more than a few minutes, but you'll have a much easier time going forward with CHS, if you do.

        Ugo

--
Ugo Cei
Tech Blog: http://agylen.com/
Source.zone: http://sourcezone.info/
Wine & Food Blog: http://www.divinocibo.it/

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to