Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: WEIRD java/stored procedure behavior

Re: WEIRD java/stored procedure behavior

From: <kal121_at_my-deja.com>
Date: 2000/03/28
Message-ID: <8brdst$2t2$1@nnrp1.deja.com>#1/1

Thanks - unfortunately id didn't have any effect setting autocommit to false. Any other ideas???

In article <38E11E59.91F7BFB4_at_weblogic.com>, Joseph Weinstein <joe_at_weblogic.com> wrote:
> Hi. It may have to do with the fact that JDBC connecitons run, by
 default,
> in autoCommit(true) mode. If you haven't, try setting your connection
 to
> autoCommit(false), then executing, then normally your JDBC code should
> also call commit(), but if you have the procedure doing it, then it
 may not
> be needed. Putting the commit in the procedure will be at odds with
> generic JDBC, but if you set autoCommit(false), then do what you
 normally
> do in SQL-PLUS, it should act the same. (SQL-PLUS runs in the
 equivalent
> of autoCommit(false)).
>
> Joe Weinstein at BEA, the home of WebLogic
>
> kal121_at_my-deja.com wrote:
>
> > Hello,
> >
> > I have an Oracle stored procedure that selects some fields into some
> > OUT variables. Then, after it selects into the OUT variables, I
 perform
> > an UPDATE on a certain field, then COMMIT, and that's it.
> >
> > When I run the procedure from within SQLPlus, the stored procedure
> > works fine - that is, it selects the OUT parameters, performs the
> > update, then commits. However, when I call the EXACT SAME stored
> > procedure from a java program, it does ONLY the select, but it never
> > performs the update or commit.
> >
> > Does anybody know why this is?
> >
> > Thanks
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> --
>
> PS: Folks: BEA WebLogic is in S.F., and now has some entry-level
 positions for
> people who want to work with Java and E-Commerce infrastructure
 products. Send
> resumes to joe_at_beasys.com
> ----------------------------------------------------------------------



> The Weblogic Application Server from BEA
> JavaWorld Editor's Choice Award: Best Web Application Server
> Java Developer's Journal Editor's Choice Award: Best Web Application
 Server
> Crossroads A-List Award: Rapid Application Development Tools for Java
> Intelligent Enterprise RealWare: Best Application Using a Component
 Architecture
> http://weblogic.beasys.com/press/awards/index.htm
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Mar 28 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US