-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Make uncommitted visible to Oracle Procedures (same session)
PostPosted: Tue Mar 24, 2009 12:23 am 
Newbie

Joined: Tue Aug 16, 2005 9:21 am
Posts: 12
Hi,

I think my problem should be very simple, I started a new Session with hibernate to save or update some entities, before commit I have to call some oracle procedure to validate these entities, but the entities are not visible to oracle before commit.

Is there some Hibernate method or configuration to make uncommitted data visible to the when u call a procedure o function?

The original code is quite complex, but in general is something like that:

Code:
  Session session = SessionFactory.currentSession();
  session.saveOrUpdate(entity);

  Connection conn = session.getConnection();
  CallableStatement cst = conn.prepareCall("{call SOME_SP(?, ?, ?, ?, ?)}");
  cst.setInt(1, 123);
  cst.execute();
  // in this point the procedure do not see the entity


Any help is welcome.

Thx a lot
Rodrigo Souza
Sao Paulo - Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 24, 2009 4:37 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
What about calling session.flush()?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.