On 10/21/07, Rob Hills <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> On the Services tutorial page, there are a couple of lines that I believe
are
> incorrect.  In each case, they say: "Open your src/main/webapp/WEB-
> INF/applicationContext.xml and replace the personDao bean with the
> following:".  I believe they should say "... replace the personManager
bean..."
>
> The first occurrence is here:
>
> http://appfuse.org/display/APF/Services#Services-personmanagerbean

This first occurrence is correct. The personDao becomes an anonymous inner
bean:

Open your *src/main/webapp/WEB-INF/applicationContext.xml* and replace the
personDao bean with the following:

*Hibernate:*

<bean id="personManager"
class="org.appfuse.service.impl.GenericManagerImpl">
    <constructor-arg>
        <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"
autowire="byType">
            <constructor-arg
value="org.appfuse.tutorial.model.Person"/>
        </bean>
    </constructor-arg>

</bean>

Notice it also says the following shortly after:

If you wrote the PersonDao interface and implementation in the previous
tutorial, you'll want to use the following for your personManager bean
definition. If you don't, your PersonDaoTest will fail because there's no
longer an exposed personDao bean.

<bean id="personManager"
class="org.appfuse.service.impl.GenericManagerImpl">
    <constructor-arg ref="personDao"/>

</bean>


>
> and the second is here:
>
> http://appfuse.org/display/APF/Services#Services-implreg

This one seems as if it could be a bug. It probably should say:

Open your *src/main/webapp/WEB-INF/applicationContext.xml* file and add a
personManager bean:

<bean id="personManager"
class="org.appfuse.tutorial.service.impl.PersonManagerImpl">
    <constructor-arg ref="personDao"/>
</bean>

If anyone sees something that I'm not seeing, please let us know.

Matt

>
> The first time I followed this literally and removed my personDao bean
> definition and replaced it with a personManager definition, I encountered
a
> great long list of errors (saying there was no personDao bean).  I worked
out
> what was wrong but it may trip up some that are newer to J2EE than I am.
>
> Am I right here?  If so, I'll happily update the tutorial page.
>
> Cheers,
> Rob Hills
> Waikiki, Western Australia
> Mobile +61 (412) 904-357
> Fax: +61 (8) 9529-2137
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

Reply via email to