-
1. Re: Transaction is not active
sriramp_here Mar 30, 2006 6:56 AM (in response to mlefevre)Hi ,
This occurs because the Jboss Transaction Manger time out the underlying connection if your database transactions are longer. One way to prevent is,
first find the piece of code i <mbean code="org.jboss.tm.TransactionManagerService"
name="jboss:service=TransactionManager"
xmbean-dd="resource:xmdesc/TransactionManagerService-xmbean.xml">
300
<!-- set to false to disable transaction demarcation over IIOP -->
true
<depends optional-attribute-name="XidFactory">jboss:service=XidFactory
in the file jboss-service.xml and change the
< attribute name="TransactionTimeout" >300< /attribute >
to some larger value so that your transaction does not time out.
Hope this helps.
Regards
Sriram -
2. Re: Transaction is not active
mlefevre Apr 6, 2006 3:46 AM (in response to mlefevre)Hi, Thank a lot. I have changed the configuration and now it is working fine.
Best Regards
Marc -
3. Re: Transaction is not active
gorakshnath Apr 25, 2006 7:23 AM (in response to mlefevre)i am getting same type of exceptions ,
could u please tell me the number u changed so that ur application works fine ?
also what is max value i can give ?
what is effect if i set that value to max ? -
4. Re: Transaction is not active
holeinone Apr 23, 2007 3:08 PM (in response to mlefevre)Well, this value is basically to protect you from never ending operations. (deadlocks)
So fill in a value (in seconds) after which your longest transaction cannot possibly return a valid value.
For instance: say your longest transaction takes at most 10 minutes to complete. Then, after say 15 minutes, you can be reasonably sure the transaction failed. You fill in 15*60=900 seconds.
Hugo
p.s. this will also mean that a transaction normally taking millisecond to complete will also only timeout after 15 minutes .... A lot can go wrong in 15 minutes.
As a rule of the thub: always make your transactions as short as possible! Please check to see if you can re-design your application such that you do not need to adjust this value. -
5. Re: Transaction is not active
itechmani Feb 19, 2009 12:01 PM (in response to mlefevre)Hi, am facing the very same exception, i tried changing the parameter you specifed as well. But am using JBOSS 4.2, so the jboss-service.xml said the block of code you specified is inactive and asked me to use the below lines of code instead.
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService" name="jboss:service=TransactionManager"> <attribute name="TransactionTimeout">3000000</attribute> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> </mbean>
Also i canged the transaction timed out from 300 to a very huge value. Still the issue persist. Can you kindly advice me to get this issue resolved. -
6. Re: Transaction is not active
itechmani Feb 19, 2009 3:27 PM (in response to mlefevre)I have made the connection time to an hour from the very huge time given above. Please find the below change that i made to jboss-service.config file in the conf folder under messaging profile where i deploy my application.
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService" name="jboss:service=TransactionManager"> <attribute name="TransactionTimeout">3600</attribute> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> </mbean>
-
7. Re: Transaction is not active
itechmani Feb 19, 2009 3:28 PM (in response to mlefevre)"itechmani" wrote:
I have made the connection time to an hour from the very huge time given above. Please find the below change that i made to jboss-service.config file in the conf folder under messaging profile where i deploy my application.<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService" name="jboss:service=TransactionManager"> <attribute name="TransactionTimeout">3600</attribute> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute> </mbean>
Still am facing the issue. Kindly help me to get this resolved. -
8. Re: Transaction is not active
holeinone Feb 22, 2009 7:59 AM (in response to mlefevre)You got a real, genuine, deadlock there.
2 threads fighting over the same resources.
When you set the timeout to an hour instead of 5 minutes it means only that the threads where fighting for the whole hour instead of 5 minutes.
There is no easy answer for this I'm afraid.
The application must be re-designed to prevent two threads wanting the same resource (database rows) at the same time.
H -
9. Re: Transaction is not active
jayakar914 Apr 5, 2011 9:43 AM (in response to mlefevre)Solution is :
Open File transaction-jboss-beans.xml in jboss-5.1.0.GA\server\all\deploy ,in that
<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>
<annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype = "JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class)</annotation><property name="transactionTimeout">300</property>
<property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>give maximum value for transactionTimeout like 43200 , it will prevent that Exception.
<property name="transactionTimeout">43200</property>
This is the finest solution for Jboss Server
-
10. Transaction is not active
wdfink Apr 5, 2011 12:19 PM (in response to jayakar914)Hi Jayakar,
you should look at the last post date you are updating a 5 year old thread where the last post is 2 years old.
-
-
12. Transaction is not active
wdfink Apr 29, 2011 5:59 AM (in response to theju)Hi Thej Thej,
you should start a new thread instad of posting to an old one which not match your question.
Please describe what you mean 'include Tx in java api' is not a specific question.