-->
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.  [ 1 post ] 
Author Message
 Post subject: How to prevent clear l2 cache on ExecuteUpdate()
PostPosted: Wed Nov 26, 2008 5:29 pm 
Newbie

Joined: Mon Jun 23, 2008 6:38 pm
Posts: 13
My application needs to execute a non query sql statement, but Hibernate tries to clean my L2 cache whenever I execute a nonquery . I found the following in the source code in BasicExecutor.java. Anyone knows why Hibernate is clearing the cache? and how can I avoid that? Thanks.

Code:
public int execute(QueryParameters parameters, SessionImplementor session) throws HibernateException {

      coordinateSharedCacheCleanup( session );

      PreparedStatement st = null;
      RowSelection selection = parameters.getRowSelection();

      try {
         try {
            st = session.getBatcher().prepareStatement( sql );
            Iterator paramSpecifications = getWalker().getParameters().iterator();
            int pos = 1;
            while ( paramSpecifications.hasNext() ) {
               final ParameterSpecification paramSpec = ( ParameterSpecification ) paramSpecifications.next();
               pos += paramSpec.bind( st, parameters, session, pos );
            }
            if ( selection != null ) {
   ............
}


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

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.