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:
------
<bean id="fooDao" class="blah.blah.blah.FooDaoImpl">
<property name="sessionFactory" ref="mySessionFactory"/>
</bean>
------
--
njl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]