cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saskia Heesen" <saskia.hee...@gmx.de>
Subject Spring SQLTransformer
Date Sun, 20 Jan 2008 16:15:10 GMT
Hello all,

in Cocoon 2.1.x, I really like the SQLTransfomer since it provides easy access to databases.
However, I had some problems using it in Cocoon 2.2. The SQLTransformer in Cocoon 2.2 seems
to use avalon components even though Spring is the favorite component model. 

As I understand Craig Walls, Spring in Action, the major approach for database access is to
configure a data source. Springs seems not to have a DatasourceComponent like Avalon. So I
adapted the existing SQLTransformer and built a SpringSQLTransformer. Enclosed you will find
the source code, bean configuration, and a sample containing a sitemap calling the SpringSQLTransformer
and two ways to configure the bean. local-springContext-1.xml is a configuration for a datasource
that is provided by the application server (e.g. Tomcat). lcoal-springContext-2.xml is a bean
configuration for a connection pool using Jakarta Database Connection Pools jars.

What's your opinion to the SpringSQLTransformer? Can it be part of the database-block?

Kind regards

 Saskia


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Mime
View raw message