Thanks Larry,

 

>Also, I'd suggest that we use constructor injection instead of setter

>injection - that way, we only need to remove the default constructors

>from the service classes (eg., public AccountService() {...}, and the

>related imports. 

 

I though I was doing this? It gave a minor error because the DaoManager is
part of the constructor for OrderService:

Com.ibatis.jpetstore.service

The DAO will be injected by spring, thus the constructor can be deleted

Example for AccountService, remove the public AccountService()methode

(also remove import com.ibatis.dao.client.DaoManager;)

 

 

>I was curious why if we are starting with jpetshop5, why not use the

>hsqldb stuff that is there?

Just kept is simple, was only interested into the conversion to spring. Also
didn't know where to put it :-)

 

Kind Regards

 Meindert

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Larry Meadors
Sent: 12 April 2007 04:14 PM
To: [EMAIL PROTECTED]
Subject: Re: converting iBATIS framework DAOs to the Spring Framework

 

Thanks a TON for doing this, it's really appreciated!

 

Here is the WIKI Page: http://tinyurl.com/ysvjw5

 

I just converted it to WIKI format and corrected some simple stuff.

 

I was curious why if we are starting with jpetshop5, why not use the

hsqldb stuff that is there?

 

Also, I'd suggest that we use constructor injection instead of setter

injection - that way, we only need to remove the default constructors

from the service classes (eg., public AccountService() {...}, and the

related imports. It also prevents people from replacing the dao

instances (well, not entirely, but they have to do a bit more work).

 

Larry

Reply via email to