[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10102
  • Last Modified:

URGENT : Servlet Web Application is stuck between transaction

Hello

I deployed servlet web application in IBM Websphere 6.0 and set the IBM DB2 V8 data source as DB2 Universal JDBC Driver Provider and it works fine. I am able to logon successfully.

I am not using EJB in my application.
I am using simple servlet jsp.
Operating System : Windows 2003 Server Ent. Edi.

Problem : My appication is not work consistent it is stuck between transaction and I encountering the following rollback and transaction error in SystemOut.log

SharedPool I Shareable connection MCWrapper id 3665270d Managed connection WSRdbManagedConnectionImpl@2b36a70d State:STATE_TRAN_WRAPPER_INUSE
from resource jdbc/ss_webdb was used within a local transaction containment boundary.

WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.
Resource jdbc/ss_webdb rolled back in cleanup of LocalTransactionContainment.
Resource jdbc/ss_webdb rolled back in cleanup of LocalTransactionContainment.
[5/12/05 18:00:39:125 IST] 0000002e LocalTranCoor W WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.
[5/12/05 18:00:39:266 IST] 0000002e SystemOut O Class : JHMnBean, m_objConnection is not null: OCT5
[5/12/05 18:00:39:266 IST] 0000002e SystemOut O Class : JHMnBean, m_objConnectionBilling is not null: OCT05
[5/12/05 18:00:39:266 IST] 0000002e SystemOut O
[5/12/05 18:00:39:281 IST] 0000002e ServletWrappe A SRVE0242I: [/jsp/ErrorLogin.jsp]: Initialization successful.
[5/12/05 18:00:39:297 IST] 0000002e SystemOut O USLogin_Main.jsp
[5/12/05 18:00:39:297 IST] 0000002e ServletWrappe A SRVE0242I: [/jsp/USLogin_Main.jsp]: Initialization successful.
[5/12/05 18:00:39:359 IST] 0000002e LocalTranCoor W WLTC0033W: Resource jdbc/ss_billdb rolled back in cleanup of LocalTransactionContainment.
[5/12/05 18:00:39:359 IST] 0000002e LocalTranCoor W WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.
[5/12/05 18:00:39:406 IST] 0000002a ServletWrappe A SRVE0242I: [/jsp/top_fr.jsp]: Initialization successful.
[5/12/05 18:00:39:406 IST] 0000002f ServletWrappe A SRVE0242I: [/jsp/title_fr.jsp]: Initialization successful.
[5/12/05 18:00:39:422 IST] 0000002a ServletWrappe A SRVE0242I: [/jsp/IncCommon.jsp]: Initialization successful.
[5/12/05 18:00:39:438 IST] 0000002e ServletWrappe A SRVE0242I: [/jsp/Wait_Screen.jsp]: Initialization successful.
[5/12/05 18:00:39:453 IST] 0000002a SystemOut O SEQ : 0
[5/12/05 18:00:39:453 IST] 0000002e SystemOut O SEQ : 0
[5/12/05 18:00:39:469 IST] 0000002a ServletWrappe A SRVE0242I: [/jsp/IncHidden.jsp]: Initialization successful.
[5/12/05 18:00:39:516 IST] 0000002a ServletWrappe A SRVE0242I: [/jsp/left_fr.jsp]: Initialization successful.
[5/12/05 18:00:39:516 IST] 0000002f ServletWrappe A SRVE0242I: [/jsp/bottom_fr.jsp]: Initialization successful.
[5/12/05 18:00:39:531 IST] 0000002a SystemOut O SEQ : 0
[5/12/05 18:00:39:531 IST] 0000002f SystemOut O l_strMessages after reading CheckNewMessages()null
[5/12/05 18:00:46:031 IST] 0000002a SystemOut O Class : JHMnBean, m_objConnection is not null: OCT5
[5/12/05 18:00:46:047 IST] 0000002a SystemOut O Class : JHMnBean, m_objConnectionBilling is not null: OCT05
[5/12/05 18:00:46:047 IST] 0000002a SystemOut O
[5/12/05 18:00:46:047 IST] 0000002a SystemOut O SEQ : 27
LocalTranCoor W WLTC0033W: Resource jdbc/ss_webdb rolled back in cleanup of LocalTransactionContainment.
LocalTranCoor W WLTC0033W: Resource jdbc/ss_billdb rolled back in cleanup of LocalTransactionContainment.
[5/12/05 18:00:46:047 IST] 0000002a LocalTranCoor W WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.

I tried to resolve this issue. Can anyone help on this.
Please try to resolve this issue asap. Very Urgent.

Regards&Thanks
udi

0
uday_kulk
Asked:
uday_kulk
  • 2
1 Solution
 
damonfCommented:
I see that two datasources are mentioned ... ss_webdb and ss_billdb.  What's going on there?  Are you using a GlobalTransaction object?  Is this an update or a select? Do you have autocommit set to on or off?  

Keep in mind that even with simple JSP/Servlet stuff, there are actually transactions setup for you by the container.  For an unresolved transaction, the default action is rollback, which will cancel everything else you've done.  Check this:  in WSAD, Web Deployment Descriptor editor for you webapp, "servlets" tab, lower right hand corner (scroll all the way down).  You will see WebSphere extensions about "boundary", "resolver" and "unresolved action".  Play with these.  For example, a simple test is change "unresolved action" to "commit" ... I don't recommend this setting for PROD, but if it cures your problem, it means that you may have to move your SQL statements within the app so they can happen at the proper time.  Of course, if you use EJB the transactions will be much more controllable.
0
 
uday_kulkAuthor Commented:
I am using two databases Bill and Web and ss_webdb and ss_billdb is the JNDI name set for the two databases.

I am using WebSphere Application Server 6.0.
Yes. It is Update ans Select.
I am not using EJB.

Where is the option for autocommits set?

Can u guide me how do i resolve this problem using  websphere application server 6.0..

Thanks & Regards
Uday
0
 
damonfCommented:
If you have to ask me about autoCommit, then it's set to "true" (on)  :-)   BTW, to turn it off you say conn.setAutocommit(false) ... but then you always have to do conn.commit() and conn.rollback() as necessary.  Since it's true here, I don't think it's the issue.

Did you try the stuff in my second paragraph.  Perhaps you could post the SQL code?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now