You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Bing Lu <mf...@yahoo.com> on 2006/07/17 22:23:44 UTC

transaction help please

Hi, how do I do a delete&insert operation in one
transaction in ibatis? do I need to specify anything
in the transactionManager for this?

thanks

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: transaction help please

Posted by Debasish Dutta Roy <de...@gmail.com>.
It wil be a good design approach to have a dao manager. Its is the business
delegate object and primarily there for your kind of situation.

However, if you have a daomanager then you should not use the mapclient
again in your dao, they will be different transactions. If you do not want
to use the daomanager, do the insert and delete with the same mapclient.

Again, before you are too late and things get out of hands, it will be a
strong suggestion to get a dao manager as a delegate or a service layer as
mentioned above.

On 7/17/06, Bing Lu <mf...@yahoo.com> wrote:
>
> Do I have to get a DAOManager, I can just do a
> startTransaction and endTransaction just using the
> sqlMapClient right?
>
> --- hicham abassi <ha...@gmail.com> wrote:
>
> > You must implement a service layer to be able to
> > call 1,n dao and
> > implement transaction management
> >
> > Look at this page :
> >
>
> http://svn.apache.org/repos/asf/ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/service/OrderService.java
> >
> > especially this method : insertOrder(Order order)
> >
> > On 7/17/06, Bing Lu <mf...@yahoo.com> wrote:
> > > Hi, how do I do a delete&insert operation in one
> > > transaction in ibatis? do I need to specify
> > anything
> > > in the transactionManager for this?
> > >
> > > thanks
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Re: transaction help please

Posted by Bing Lu <mf...@yahoo.com>.
Do I have to get a DAOManager, I can just do a
startTransaction and endTransaction just using the
sqlMapClient right? 

--- hicham abassi <ha...@gmail.com> wrote:

> You must implement a service layer to be able to
> call 1,n dao and
> implement transaction management
> 
> Look at this page :
>
http://svn.apache.org/repos/asf/ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/service/OrderService.java
> 
> especially this method : insertOrder(Order order)
> 
> On 7/17/06, Bing Lu <mf...@yahoo.com> wrote:
> > Hi, how do I do a delete&insert operation in one
> > transaction in ibatis? do I need to specify
> anything
> > in the transactionManager for this?
> >
> > thanks
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: transaction help please

Posted by hicham abassi <ha...@gmail.com>.
You must implement a service layer to be able to call 1,n dao and
implement transaction management

Look at this page :
http://svn.apache.org/repos/asf/ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/service/OrderService.java

especially this method : insertOrder(Order order)

On 7/17/06, Bing Lu <mf...@yahoo.com> wrote:
> Hi, how do I do a delete&insert operation in one
> transaction in ibatis? do I need to specify anything
> in the transactionManager for this?
>
> thanks
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>