[jboss-dev-forums] [JBoss Transactions Development] - Re: JBoss Transaction Not Active - EJB 2.1 in JBOSS EAP 5.1.2

Rodel Talampas do-not-reply at jboss.com
Thu Aug 23 05:56:37 EDT 2012


Rodel Talampas [https://community.jboss.org/people/limacon] created the discussion

"Re: JBoss Transaction Not Active - EJB 2.1 in JBOSS EAP 5.1.2"

To view the discussion, visit: https://community.jboss.org/message/755343#755343

--------------------------------------------------------------
Hi Mike,

Getting back to you again. We identified the issue of the problem but we are stucked on what direction to go. The original developers of the code put in some logic (db handling) on the ejbPassivate callback method. In this method (which you see above) has a indirect call to getConnection which causes the error. 

public void ejbPassivate()
          {
     ......// SOME CODE HERE                  {
 * *JobJDBCMgr* m_mgr = (JobJDBCMgr) getJDBCManager();*
                                        byte[] rawActiveJob = null;
                                        try
                                        {
                                                  rawActiveJob = m_activeJob.toByteArray();
                                        }
                                        catch( IOException e )
                                        {
                                                  throw new EJBException( e );
                                        }
*m_mgr.updateWithActiveJob(getJobData(), rawActiveJob, getId() );*
                                             ......// SOME CODE HERE
                              }
                              else
     ......// SOME CODE HERE
                    }

     ......// SOME CODE HERE
          }

Most of the ejbCallBack methods have their own method variable JobJDBCMgr.  I tried to create CLASS level JDBC manager and it did solve the problem.. (*TEMPORARILY*).  This solution is working for some logic flow but NOT for all business logic (processes that takes around few seconds (10 secs or more)). Why I created a Class level variable - I want to retain the instance of the JobJDBCMgr Object when the Bean is pushed into the POOL.

Do you have any idea on how to resolve this issue? My timeout is set to a very high value (42000).

Hoping for your reply.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/755343#755343]

Start a new discussion in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2041]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120823/90f20e65/attachment.html 


More information about the jboss-dev-forums mailing list