Hi William, William Moore schrieb:
> Hello, > > Is it possible to use the Cocoon database connection pool inside an > application based on Cocoon, Spring and Hibernate? > > I have looked at CHS (http://www.cocoondev.org/main/117/43.html) and > CocoonAndHibernateTutorial > (http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial), but the > former does not use the Cocoon connection pool and the latter does not > use Spring. > > In my attempts I have found that Spring seems to create the DataSource > and SessionFactory objects defined in it's applicationContext.xml file > very early in the start-up process and outside the Cocoon framework. > This means the classes cannot operate as Cocoon Components and > consequently they cannot access the Cocoon connection pools. > > Is this correct or am I missing something obvious? I'm fairly new to > programming at this level. This is aboslutely correct. When using Spring, you should not use the Cocoon connection pool since that would mean a dependancy on the view layer (Cocoon in that case) for data persistency. The tutorial is meant to get you started quickly and with no requirements besides cocoon and hibernate, so it uses the Cocoon connection pool, but that is not the end of the story. Regards, Johannes --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
