title: How to pointcut hibernate when i use spring aop?
body: <p>I think as an entry point to the session, but seems to have failed. Whether my configuration?
  Here is my spring config.</p>
  
  <pre><code>&lt;bean id="aspect" class="org.bigbean.common.aop.DaoAspect" /&gt;
  &lt;aop:config&gt;
      &lt;aop:aspect ref="aspect"&gt;       
          &lt;aop:around pointcut="execution(* org.hibernate.SharedSessionContract.createQuery(java.lang.String))"
              method="aroundAdvice" /&gt;
      &lt;/aop:aspect&gt;
  &lt;/aop:config&gt;
  </code></pre>
  
  <p>follow is my class</p>
  
  <pre><code>    public Object aroundAdvice(ProceedingJoinPoint pjp) throws Throwable {
      System.out.println("aroundAdvice");
      String hql = (String) pjp.getArgs()[0];
      if(hql.indexOf("update") &gt; -1){
          StringBuilder sb = new StringBuilder();
          int temp = hql.indexOf("where");
          if(temp &gt; -1){
              sb.append(hql.subSequence(0, temp));
              sb.append(",updateDate = :updateDate ");
              sb.append(hql.substring(temp));
          }else{
              sb.append(",updateDate = :updateDate ");
          }
          hql = sb.toString();
          mark = true;
      }
      Object retVal = pjp.proceed(new Object[] { hql });
      return retVal;
  }
  </code></pre>