Re: T5 tapestry-spring: have to interface all HibernateDaoSupport methods
I.e., public class FooDaoImpl extends HibernateTemplate implements FooDao // which extends HibernateOperations { // some custom Foo dao methods. } Perfecto and parsimonious. bill On 6/25/07, Massimo Lusetti <[EMAIL PROTECTED]> wrote: On 6/26/07, Bill Holloway <[EMAIL PROTECTED]> wrote: > I have the following DAO pattern: > > public class FooDaoImpl > extends HibernateDaoSupport > implements FooDao > { >// some custom Foo dao methods. > } > > However, tapestry-ioc spring bean injection injects via interface. > So, none of the HibernateDaoSupport or HibernateTemplate methods like > saveOrUpdate or merge or get are visible from my injected DAO unless > they're explicitly written into the FooDao interface or some higher > level interface that FooDao extends. Pain. What are you gaining from HibernateDaoSupport? Why not using this pattern without HibernateDaoSupport and HibernateTemplate and let the spring framework handle transaction? -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 tapestry-spring: have to interface all HibernateDaoSupport methods
Thank you Massimo! That got it all solved. bill On 6/25/07, Massimo Lusetti <[EMAIL PROTECTED]> wrote: On 6/26/07, Bill Holloway <[EMAIL PROTECTED]> wrote: > I have the following DAO pattern: > > public class FooDaoImpl > extends HibernateDaoSupport > implements FooDao > { >// some custom Foo dao methods. > } > > However, tapestry-ioc spring bean injection injects via interface. > So, none of the HibernateDaoSupport or HibernateTemplate methods like > saveOrUpdate or merge or get are visible from my injected DAO unless > they're explicitly written into the FooDao interface or some higher > level interface that FooDao extends. Pain. What are you gaining from HibernateDaoSupport? Why not using this pattern without HibernateDaoSupport and HibernateTemplate and let the spring framework handle transaction? -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 tapestry-spring: have to interface all HibernateDaoSupport methods
On Mon, Jun 25, 2007 at 06:02:16PM -0500, Bill Holloway wrote: > I have the following DAO pattern: > > public class FooDaoImpl > extends HibernateDaoSupport > implements FooDao > { > // some custom Foo dao methods. > } > > However, tapestry-ioc spring bean injection injects via interface. > So, none of the HibernateDaoSupport or HibernateTemplate methods like > saveOrUpdate or merge or get are visible from my injected DAO unless > they're explicitly written into the FooDao interface or some higher > level interface that FooDao extends. Pain. Unless I misunderstand you, you need to do the following: In your code: -- @Inject @Service("fooDao") private FooDao _fooDao; -- In your spring context file: -- -- -- njl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 tapestry-spring: have to interface all HibernateDaoSupport methods
On 6/26/07, Bill Holloway <[EMAIL PROTECTED]> wrote: I have the following DAO pattern: public class FooDaoImpl extends HibernateDaoSupport implements FooDao { // some custom Foo dao methods. } However, tapestry-ioc spring bean injection injects via interface. So, none of the HibernateDaoSupport or HibernateTemplate methods like saveOrUpdate or merge or get are visible from my injected DAO unless they're explicitly written into the FooDao interface or some higher level interface that FooDao extends. Pain. What are you gaining from HibernateDaoSupport? Why not using this pattern without HibernateDaoSupport and HibernateTemplate and let the spring framework handle transaction? -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 tapestry-spring: have to interface all HibernateDaoSupport methods
I have the following DAO pattern: public class FooDaoImpl extends HibernateDaoSupport implements FooDao { // some custom Foo dao methods. } However, tapestry-ioc spring bean injection injects via interface. So, none of the HibernateDaoSupport or HibernateTemplate methods like saveOrUpdate or merge or get are visible from my injected DAO unless they're explicitly written into the FooDao interface or some higher level interface that FooDao extends. Pain. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]