<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>My Tech Blog</title>
 <link href="http://nageshever.github.io/atom.xml" rel="self"/>
 <link href="http://nageshever.github.io/"/>
 <updated>2015-07-29T20:16:42+00:00</updated>
 <id>http://nageshever.github.io</id>
 <author>
   <name></name>
   <email></email>
 </author>

 
 <entry>
   <title>Arjuna016051 Thread Is Already Associated With A Transaction</title>
   <link href="http://nageshever.github.io/2015/07/29/arjuna016051-thread-is-already-associated-with-a-transaction.html"/>
   <updated>2015-07-29T00:00:00+00:00</updated>
   <id>http://nageshever.github.io/2015/07/29/arjuna016051-thread-is-already-associated-with-a-transaction</id>
   <content type="html">&lt;p&gt;This issue occurs when someone tries to begin a transaction in bean managed transaction process and previous tx is still in process or hung without either committing or rolling back.&lt;/p&gt;

&lt;p&gt;I have experienced this issue while working on a transaction based web service application. In order to resolve this, I would recommend to check the status of the transaction object created. Add below lines of code before beginning a transaction,  in order to resolve this issue.&lt;/p&gt;

&lt;p&gt;int txStatus = transaction.getStatus();
if (txStatus == Status.STATUS_MARKED_ROLLBACK || txStatus == Status.STATUS_ROLLEDBACK) {
                logger.warn(“Rolling back the transaction”);
                transaction.rollback();
}&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Hello world</title>
   <link href="http://nageshever.github.io/2015/07/28/hello-world.html"/>
   <updated>2015-07-28T00:00:00+00:00</updated>
   <id>http://nageshever.github.io/2015/07/28/hello-world</id>
   <content type="html">&lt;p&gt;This is a test post for my new blog. The blog is hosted on &lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt; which means the source is available at &lt;a href=&quot;http://github.com/nageshever/nageshever.github.io&quot;&gt;github.com/nageshever/nageshever.github.io&lt;/a&gt;. Be nice. Give credit. Share, don’t steal :)&lt;/p&gt;

&lt;p&gt;By the way, this blog is powered by &lt;a href=&quot;https://tinypress.co&quot;&gt;tinypress.co&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 

</feed>
