1 Reply Latest reply on Mar 17, 2008 10:53 AM by grzegorz.knapczyk

    transaction timeout for managed conversation transaction

    nes

      Hello, I have this snippet:


      @Asynchronous
      public void rebuildIndex() {
      FullTextSession session = (FullTextSession) entityManager.getDelegate();
      Transaction userTx = session.beginTransaction();
      userTx.setTimeout(1000000000);
      ...
      }

      Now, the problem is that the setTimeout call fails, because you may not call it for managed transactions. The default setting appears to be 3 minutes, until it times out. But, normally, this method will take about 20 minutes. Maybe even more. So, how can I change the timeout?

      Thanks in advance!

      niko

        • 1. Re: transaction timeout for managed conversation transaction
          grzegorz.knapczyk

          Hi!

          I am sorry, it is out of topic, but since you use Hibernate Search you might know...

          When I try in my application:

          FullTextSession session = (FullTextSession) entityManager.getDelegate();
          


          it throws exception:

          15:45:23,866 WARN [HibernatePersistenceProvider] Unable to wrap into a FullTextSessionProxy, regular SessionProxy returned
          java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.seam.persistence.HibernatePersistenceProvider.proxySession(HibernatePersistenceProvider.java:97)
           at org.jboss.seam.persistence.HibernatePersistenceProvider.proxyDelegate(HibernatePersistenceProvider.java:116)
           at org.jboss.seam.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:95)
          


          I use Jboss 4.2.2.GA, Seam 2.0.1.GA, HibernateSearch 3.0.1. ...