ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manikandan.R, ISDC Chennai" <manikand...@hcl.in>
Subject RE: Autocommit property
Date Fri, 03 Mar 2006 12:03:57 GMT
Hi Roberto, 
1)Perform the following steps to modify WebSphere Studio Application
Developer Integration Edition: 
        a. Open the Web project window. 
        b. Click Web Deployment Descriptor to open the <web
project>/WebContent/WEB-INF/web.xml file. 
        c. Click the Servlet tab. 
        d. Click the servlet that is generated by the Client proxy
wizard. 
        e. Scroll down to the WebSphere Extension window and make sure
that the following values are set: 
                Boundary: Bean Method 
                Resolver: Application 
                Unresolved Action: Commit 

2)here's how to successfully configure iBATIS to work with WAS. 
        a. Set <transactionManager commitRequired="true"> 
        b. If WAS is complaining about calls to setAutoCommit (false),
then you might want to use EXTERNAL transaction  management (i.e. not
iBATIS JTA). This will allow your app server to declaratively control
the transaction completely,  with no intervention from iBATIS. However,
you may also want to set DefaultAutoCommit to match the app server,
and/or   tell iBATIS not to setAutoCommit at all by setting
SetAutoCommitAllowed to false. Here's an example configuration.

        <transactionManager commitRequired="true"  type="EXTERNAL"> 
            <property name="DefaultAutoCommit" value="false"/> 
            <property name="SetAutoCommitAllowed" value="false"/> 
            <dataSource type="JNDI"> 
          <property name="DataSource" value="java:..."/> 
            </dataSource> 
          </transactionManager> 

Regards 
Manikandan 

Disclaimer: 
This message and any attachment(s) contained here are information that
is confidential, proprietary to HCL Technologies and its customers.
Contents may be privileged or otherwise protected by law. The
information is solely intended for the individual or the entity it is
addressed to. If you are not the intended recipient of this message, you
are not authorized to read, forward, print, retain, copy or disseminate
this message or any part of it. If you have received this e-mail in
error, please notify the sender immediately by return e-mail and delete
it from your computer.


-----Original Message----- 
From: Amparore Roberto [ mailto:roberto.amparore@sia.it
<mailto:roberto.amparore@sia.it> ] 
Sent: Friday, March 03, 2006 4:31 PM 
To: user-java@ibatis.apache.org 
Subject: Autocommit property 


I'm using IBATIS with WebSphere Appliation Server 5.1. 
  
In the init method of a Start-up servlet I'm using Ibatis to execute a
SELECT on a DB2 Database. 
It's work fine but the method ends I' catch the following exception : 
  
[03/03/06 11:36:12:452 CET] 3dfd084f LocalTranCoor E WLTC0033E: Resource
jdbc/EbaWebDS rolled back in cleanup of unresolved
LocalTransactionContainment.

[03/03/06 11:36:12:572 CET] 3dfd084f LocalTranCoor E WLTC0032E: One or
more resources rolled back. An unresolved LocalTransactionContainment
had an unresolved action of rollback.

[03/03/06 11:36:12:582 CET] 3dfd084f WebAppTransac E WTRN0043I:
LocalTransaction rolled-back due to setRollbackOnly. 
[03/03/06 11:36:12:853 CET] 3dfd084f WebGroup      E SRVE0020E: [Servlet
Error]-[InitServlet]: Failed to load servlet:
com.ibm.ws.LocalTransaction.RolledbackException

       at
com.ibm.ws.LocalTransaction.LocalTranCoordImpl.cleanup(LocalTranCoordImp
l.java:1073) 
       at
com.ibm.ws.webcontainer.webapp.WebAppTransactionCollaborator.postInvoke(
WebAppTransactionCollaborator.java:249)

       at
com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppSer
vletManager.java:885) 
       at
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppSe
rvletManager.java:224) 
       at
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets
(WebAppServletManager.java:542) 
       at
com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:127
7) 
       at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283) 
       at
com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387) 
       at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209) 
       at
com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java
:1005) 
       at
com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.j
ava:136) 
       at
com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.jav
a:356) 
       at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
.java:505) 
       at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS
tart(DeployedApplicationImpl.java:808)

       at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl
.java:354) 
       at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli
cationImpl.java:578) 
       at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica
tionMgrImpl.java:299) 
       at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl
.java:256) 
       at
com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl
.java:536) 
       at
com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)

       at
com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServ
erImpl.java:128) 
       at
com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl
.java:536) 
       at
com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)

       at
com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183) 
       at com.ibm.ws.runtime.WsServer.start(WsServer.java:128) 
       at com.ibm.ws.runtime.WsServer.main(WsServer.java:225) 
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79) 
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:41) 
       at java.lang.reflect.Method.invoke(Method.java:386) 
       at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:105) 
       at
com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRun
nerV5.java:97) 
  
[03/03/06 11:36:12:893 CET] 3dfd084f WebAppServlet E SRVE0183E:
LocalTransaction rolled-back due to setRollbackOnly 
[03/03/06 11:36:13:143 CET] 3dfd084f ApplicationMg A WSVR0221I:
Application started: ProvaDb 
[03/03/06 11:36:13:584 CET] 3dfd084f HttpTransport A SRVE0171I:
Transport http is listening on port 9,080. 
[03/03/06 11:36:15:106 CET] 3dfd084f HttpTransport A SRVE0171I:
Transport https is listening on port 9,443. 
[03/03/06 11:36:15:216 CET] 3dfd084f RMIConnectorC A ADMC0026I: RMI
Connector available at port 2809 
[03/03/06 11:36:15:316 CET] 3dfd084f WsServer      A WSVR0001I: Server
server1 open for e-business 
  
Looking for some help into the web I found a page the say to set the
autocommit property to value false. 
  
My question is: How can I set the value of autocommit property? 
  
Thanks you very much. 
  
Roberto Amparore 
  
  
  
*******************Internet Email Confidentiality
Footer******************* 
Qualsiasi utilizzo non autorizzato del presente messaggio nonche' dei
suoi allegati e' vietato e potrebbe costituire reato. Se lei ha ricevuto
erroneamente il presente messaggio, Le saremmo grati se, via e-mail, ce
ne comunicasse la ricezione e provvedesse alla distruzione del messaggio
stesso e dei suoi eventuali allegati. Le dichiarazioni contenute nel
presente messaggio nonche' nei suoi eventuali allegati devono essere
attribuite esclusivamente al mittente e non possono essere considerate
come trasmesse o autorizzate da SIA S.p.A.; le medesime dichiarazioni
non impegnano SIA S.p.A. nei confronti del destinatario o di terzi. SIA
S.p.A. non si assume alcuna responsabilita' per eventuali
intercettazioni, modifiche o danneggiamenti del presente messaggio
e-mail. 

Any unauthorized use of this e-mail or any of its attachments is
prohibited and could constitute an offence. If you are not the intended
addressee please advise immediately the sender by using the reply
facility in your e-mail software and destroy the message and its
attachments. The statements and opinions expressed in this e-mail
message are those of the author of the message and do not necessarily
represent those of SIA. Besides, The contents of this message shall be
understood as neither given nor endorsed by SIA S.p.A.. SIA S.p.A. does
not accept liability for corruption, interception or amendment, if any,
or the consequences thereof. 


Mime
View raw message