ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meindert" <meind...@pastelebusiness.com>
Subject RE: iBATIS, Spring, and transactions...
Date Tue, 10 Apr 2007 16:30:03 GMT
I'm busy converting and went to the site
http://www.learntechnology.net/content/ibatis/spring_ibatis.jsp

What is quite a clear explanation :-)

 

I'm converting a project that is based on the jpetstore, what is using
org.apache.struts.beanaction.BeanAction in my struts-config.xml

The above mentioned site has got a different approach.

My question is;

a) can I still use org.apache.struts.beanaction.BeanAction? I only want to
change the DAO to Spring DAO because IBATIS DAO is depreciated

and if so

b) The BeanAction class is using

private static final TheService theService = TheService.getInstance();

to connect with the service object, what created itself static;

private static final TheService instance = new TheService();

 

How do I get a instance from the spring created service object?

My service object get's created by spring using the following config in
spring.xml;

<bean id=" theService " class="com.service.TheService ">

        <constructor-arg index="0" ref="theDao"/>

    </bean>

And code;

public TheService (TheDao theDao){

      this.theDao = theDao;

  }

 

Kind Regards

 Meindert

 

 

 

-----Original Message-----
From: Poitras Christian [mailto:Christian.Poitras@ircm.qc.ca] 
Sent: 10 April 2007 04:25 PM
To: user-java@ibatis.apache.org; lmeadors@apache.org
Subject: RE: iBATIS, Spring, and transactions...

 

That would be a great idea!

It's always welcome to see some code to show each steps. My app is

already to big to use it direclty as an example... 

 

Christian

 

I'll check if I can provide you with my smaller app (contains only 2

actions, but it does not have any transaction).

I'll just add the insert/updates I used at first to fill database.

 

-----Original Message-----

From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf

Of Larry Meadors

Sent: Tuesday, 10 April 2007 10:16

To: user-java@ibatis.apache.org

Subject: Re: iBATIS, Spring, and transactions...

 

That would be AWESOME, if you want, I can help with proofing, etc.

 

Maybe someone else would be willing to provide a *simple* iBATIS DAO

sample application that we could convert and then document the process.

 

Larry

 

 

On 4/10/07, Poitras Christian <Christian.Poitras@ircm.qc.ca> wrote:

> I have to say that it would be really nice to have an "how to" for 

> passing from iBATIS DAO to Spring DAO...

> I made a french document about that question. I could transalte it to 

> english in the next weeks and put it on the wiki...


Mime
View raw message