-
1. Re: Data base connection not alive for longer transactions in jboss wildfly
wdfink Sep 28, 2015 3:19 PM (in response to ajay.jonna)Infinispan seems not the correc forum, move to WildFly
-
2. Re: Data base connection not alive for longer transactions in jboss wildfly
wdfink Sep 28, 2015 3:21 PM (in response to ajay.jonna)I'm not sure about your use-case.
Did you start a transactional EJB and have it running for 2 hours?
Could you elaborate on this?
-
3. Re: Data base connection not alive for longer transactions in jboss wildfly
ajay.jonna Sep 29, 2015 5:32 AM (in response to ajay.jonna)Yes, you are correct. Starting the EJB transaction, which takes around 2 hours to complete its conversion. Once converted then on words need to have data base operations to store the converted records.
-
4. Re: Data base connection not alive for longer transactions in jboss wildfly
wdfink Oct 1, 2015 1:03 PM (in response to ajay.jonna)You need to set the transaction timeout like this
@TransactionTimeout(value = 10, unit = TimeUnit.SECONDS)
But a better solution is to use a method without Tx to collect the results and invoke another method annotated with Tx.REQUIRED to store it.
Note, you need to invoke the method with a proxy (like a different EJB) as with a direct Java method invocation the container is not involved and there is no transaction started.