ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Calling a Sybase Store Procedure
Date Fri, 31 Dec 2004 03:12:59 GMT
Siva, will that work for you?  Because iBATIS was written strictly to
improve transactional behavior of applications, we've always avoided
AutoCommit like the plague.  I know we could probably support it, but
it wouldn't be pretty.

I'd rather the problem be solved where it is being caused -- the
database.  That said, if this is an unacceptable solution, then we
will do something.

Cheers,
Clinton


On Wed, 29 Dec 2004 09:22:46 +0800, But, Kelvin-KW
<Kelvin-KW.But@aig.com> wrote:
>  
> 
> Hi Siva, 
> 
> I have similar experience in calling Sybase ASE 12.5 stored procedures.  My
> solution is to use 
> 
>         sp_procxmode <stored procedure> , "anymode" 
> 
> command to change all stored procedures into proper transaction mode. 
> 
> Kelvin 
>  
> 
> -----Original Message----- 
> From: Clinton Begin [mailto:clinton.begin@gmail.com] 
> Sent: Wednesday, December 29, 2004 12:10 AM 
> To: ibatis-user-java@incubator.apache.org 
> Subject: Re: Calling a Sybase Store Procedure 
>  
> 
> You have to run certain SYBASE stored procedures with AutoCommit=ON. 
> However, iBATIS does not support autocommit (by design).  So, at this 
> time you'll need to supply your own connection (set autocommit=true) 
> to .setUserConnection(). 
> 
> You can use the same datasource to get a new connection from the 
> SqlMapClient (.getDataSource()), then set autocommit to true, then 
> .setUserConnection().  Just be sure to manage it and close it 
> properly. 
> 
> Sorry for the roundabout solution, I'm looking for a better one.  Too 
> bad Sybase does this to us. 
> 
> Cheers, 
> Clinton 
>  
> 
> 
> On Tue, 28 Dec 2004 16:00:25 -0000, Jagadeesan, Siva 
> <siva.jagadeesan@csfb.com> wrote: 
> > Hi Guys: 
> > 
> > I am having problem when I am trying to call a store procedure through
> IBatis. 
> > 
> > This is the exception I am getting, 
> > 
> > Caused by: 
> > com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure 'proc_next_id' may
> be 
> > run only in unchained transaction mode. The 'SET CHAINED OFF' command will
> > cause the current session to use unchained transaction mode. 
> > 
> > I am able to call this store proc using direct JDBC. 
> > 
> > I think it is something to do with Connection. 
> > 
> > Has anyone came across this problem 
> > 
> > Rgds, 
> > --Siva Jagadeesan 
> > 
> >
> ==============================================================================
> > This message is for the sole use of the intended recipient. If you
> received 
> > this message in error please delete it and notify us. If this message was 
> > misdirected, CSFB does not waive any confidentiality or privilege. CSFB 
> > retains and monitors electronic communications sent through its network. 
> > Instructions transmitted over this system are not binding on CSFB until
> they 
> > are confirmed by us. Message transmission is not guaranteed to be secure. 
> >
> ==============================================================================
> > 
> > 
> IMPORTANT NOTICE: 
> 
>  
> 
> The information in this email (and any attachments) is confidential. 
> If you are not the intended recipient, you must not use or disseminate the
> information. 
> If you have received this email in error, please immediately notify me by
> "Reply" command 
> and permanently delete the original and any copies or printouts thereof. 
> Although this email and any attachments are believed to be free of any virus
> or 
> other defect that might affect any computer system into which it is received
> and opened, 
> it is the responsibility of the recipient to ensure that it is virus free
> and no responsibility 
> is accepted by American International Group, Inc. or its subsidiaries or
> affiliates either 
> jointly or severally, for any loss or damage arising in any way from its
> use.

Mime
View raw message