Re: SqlSession.close() without committing

2010-04-07 Thread cowwoc
To: user-java@ibatis.apache.org <mailto:user-java@ibatis.apache.org> > Subject: Re: SqlSession.close() without committing > > One thing I'd have liked to see is an indicator of which packages are > intended as API packages for public consumption, and which packag

Re: SqlSession.close() without committing

2010-04-07 Thread Clinton Begin
nesday, April 07, 2010 11:43 AM > > To: user-java@ibatis.apache.org > > Subject: Re: SqlSession.close() without committing > > > > One thing I'd have liked to see is an indicator of which packages are > > intended as API packages for public consumption, and w

Re: SqlSession.close() without committing

2010-04-07 Thread Clinton Begin
I agree, EJB 3 looks very good. But my point was that the first two iterations of the spec didn't help. And if anything, the non-spec driven Spring framework drove EJB 3 to be what it is today. Clinton On Wed, Apr 7, 2010 at 11:06 AM, Guy Rouillier wrote: > On 4/7/2010 9:50 AM, Clinton Begin w

Re: SqlSession.close() without committing

2010-04-07 Thread Martin Ellis
of the woodwork ;-) > > -Original Message- > From: Martin Ellis [mailto:ellis@gmail.com] > Sent: Wednesday, April 07, 2010 11:43 AM > To: user-java@ibatis.apache.org > Subject: Re: SqlSession.close() without committing > > One thing I'd have liked to see is an indicator of

Re: SqlSession.close() without committing

2010-04-07 Thread Larry Meadors
On Wed, Apr 7, 2010 at 11:04 AM, Clinton Begin wrote: > There was once a man named Larry, > Who felt my code was scary, > For the code at which he balked, > He wrote JavaDocs, > And left the community merry. LOL! Should I be worried that you're writing poetry about me? :-D I guess I'll just be g

Re: SqlSession.close() without committing

2010-04-07 Thread Guy Rouillier
On 4/7/2010 9:50 AM, Clinton Begin wrote: This is what has killed J2EE vs. the alternatives. Look at the history: Not to start a flame war, but ... * CMP - Spec. Dead, along with all implementations. * EJB - Spec. Dead. Spring killed it -- not a spec. EJB3 is very much alive. The sp

Re: SqlSession.close() without committing

2010-04-07 Thread Clinton Begin
>> One thing I'd have liked to see is an indicator of which packages are >> intended as API packages for public consumption, and which packages >> are implementation. iBATIS 2.0 did that quite explicitly. It literally had a package separation between public and internal APIs. Unfortunately, like

Re: SqlSession.close() without committing

2010-04-07 Thread Clinton Begin
Unit Tests! On Wed, Apr 7, 2010 at 9:53 AM, cowwoc wrote: > Clinton, > > I'm not looking for a specification in that sense of the word :) I > meant something along the lines of Design by Contract: > http://en.wikipedia.org/wiki/Design_by_contract > > If my code depends on iBatis and upg

RE: SqlSession.close() without committing

2010-04-07 Thread Rick . Wellman
Hey Clinton, You've got volunteers coming out of the woodwork ;-) -Original Message- From: Martin Ellis [mailto:ellis@gmail.com] Sent: Wednesday, April 07, 2010 11:43 AM To: user-java@ibatis.apache.org Subject: Re: SqlSession.close() without committing One thing I'd hav

Re: SqlSession.close() without committing

2010-04-07 Thread Martin Ellis
One thing I'd have liked to see is an indicator of which packages are intended as API packages for public consumption, and which packages are implementation. The idea being that I'd like to minimise dependencies on 'private' API. There're a few incentives to do that: * making sure you're using a

Re: SqlSession.close() without committing

2010-04-07 Thread cowwoc
Clinton, I'm not looking for a specification in that sense of the word :) I meant something along the lines of Design by Contract: http://en.wikipedia.org/wiki/Design_by_contract If my code depends on iBatis and upgrading to a newer version breaks my code then how do we establish whe

Re: SqlSession.close() without committing

2010-04-07 Thread 陈抒
Hello: Maybe some guys can dig into the source codes of iBatis and write a book called 'Inside iBatis3'. Who want to write it?I want to buy it. :) By the way,I like JSF. 陈抒 Best regards http://blog.csdn.net/sheismylife On Wed, Apr 7, 2010 at 9:50 PM, Clinton Begin wrote: > Then you mig

Re: SqlSession.close() without committing

2010-04-07 Thread Clinton Begin
Then you might be happier with a spec like JPA. Although I'd warn that such specs are rarely implemented consistently. This is what has killed J2EE vs. the alternatives. Look at the history: * CMP - Spec. Dead, along with all implementations. * EJB - Spec. Dead. Spring killed it -- not a sp

Re: SqlSession.close() without committing

2010-04-07 Thread Larry Meadors
There never has and most likely never will be an ibatis "specification". Larry On Tuesday, April 6, 2010, cowwoc wrote: > > > Yes, iBATIS will rollback the connection if it deems it necessary.  The only > time you might need to call rollback explicitly is if you have a "select" > that actually

Re: SqlSession.close() without committing

2010-04-06 Thread cowwoc
Yes, iBATIS will rollback the connection if it deems it necessary. The only time you might need to call rollback explicitly is if you have a "select" that actually updates data in the database. Such is sometimes the case with stored procedures. Clinton, Coming back to our earlier discuss

Re: SqlSession.close() without committing

2010-04-05 Thread Clinton Begin
Yes, iBATIS will rollback the connection if it deems it necessary. The only time you might need to call rollback explicitly is if you have a "select" that actually updates data in the database. Such is sometimes the case with stored procedures. Clinton 2010/4/5 François Schiettecatte > If you

Re: SqlSession.close() without committing

2010-04-05 Thread François Schiettecatte
If you start a transaction or don't have auto-commit on, then the transaction will be rolled back. At least that is what I am seeing which makes sense to me. F. On Apr 5, 2010, at 12:38 PM, cowwoc wrote: > Hi, > >What happens if I close() a SqlSession without committing? Does iBatis > gua

SqlSession.close() without committing

2010-04-05 Thread cowwoc
Hi, What happens if I close() a SqlSession without committing? Does iBatis guarantee that the transaction will roll back? I ask because I want to use the following pattern: SqlSession session = factory.openSession(); try { // do work session.commit(); } finally { session.close(); }