Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 32355 invoked from network); 13 Dec 2006 16:22:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2006 16:22:29 -0000 Received: (qmail 3032 invoked by uid 500); 13 Dec 2006 16:22:31 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 3016 invoked by uid 500); 13 Dec 2006 16:22:31 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 3005 invoked by uid 99); 13 Dec 2006 16:22:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 08:22:31 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [213.190.129.19] (HELO SDBAHCSMS02.agriculture.gov.ie) (213.190.129.19) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2006 08:22:20 -0800 Received: from sdbahexch01.agriculture.gov.ie (unverified [10.0.3.238]) by SDBAHCSMS02.agriculture.gov.ie (Clearswift SMTPRS 5.2.3) with ESMTP id for ; Wed, 13 Dec 2006 16:17:35 +0000 Received: from SDBAHEXC03.agriculture.gov.ie ([10.0.3.153]) by sdbahexch01.agriculture.gov.ie with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Dec 2006 16:17:35 +0000 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C71ED3.9E8CDB34" X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: RE: Problem committing records using IBATIS in embedded jar file Date: Wed, 13 Dec 2006 16:27:45 -0000 Message-ID: <46225033AA90B54D842D85582F094F087255FF@sdbahexc03.agriculture.gov.ie> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem committing records using IBATIS in embedded jar file Thread-Index: Acce0cSE1ssEJbuVRvWqvbpT+m7O0AAAJY1A From: "Ross, Niall" To: X-OriginalArrivalTime: 13 Dec 2006 16:17:35.0385 (UTC) FILETIME=[332C3890:01C71ED2] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C71ED3.9E8CDB34 Content-Type: text/plain; charset="UTF-7" Content-Transfer-Encoding: quoted-printable The odd "@ @" syntax is just merely tokens which are substituted for there= =20 correct values from a properties files.=20 =20 We are using iBatis version 2.0.9 =20 Regards, Niall =20 Project A 2nd config file sql-map-config-iforis.xml =20 =20 =20 =20 =20 =20 -----Original Message----- From: Brandon Goodin [mailto:brandon.goodin@gmail.com] Sent: 13 December 2006 16:08 To: user-java@ibatis.apache.org Subject: Re: Problem committing records using IBATIS in embedded jar file I see Project A loads two different SQL Map configs with an odd @...@ synta= x. You only posted 1 of them for Project A. Please post the other as well. = Also, what version of iBATIS are you using? Brandon On 12/13/06, Ross, Niall < Niall.Ross@agriculture.gov.ie> wrote:=20 Brandon, =20 Attached are the essential parts of the necessary files. =20 Regards, Niall ----------------------------------------------------------------- =20 Project A sql-map-config.xml =20 =20 =20 =20 =20 =20 ..... .....=20 =20 =20 Project A dao.xml =20 > =20 =20 =20 =20 = =20 =20 =20 =20 = =20 =20 .... .... =20 =20 ie/gov/agriculture/sps/app/dao/xml/@SQL_CONFIG_MAP_IFORIS@"/> =20 = =20 =20 =20 =20 =20 Project B sql-map-config.xml =20 =20 =20 =20 =20 =20 Project B dao.xml =20 > =20 =20 =20 =20 =20 =20 =20 ---------------------------------------------------------------------------= ------------------------------------ Supporting Code =20 The following code is the code that is failing to commit. The DAOConfig in = question below is=20 coming from Project A so is therefore associtaed with dao.xml from that pro= ject above. =20 DaoManager manager =3D null; =20 try { manager =3D DAOConfig.getDaomanager(); /* Insert a record on the Application Table */ dao =3D (ApplicationDAO) manager.getDao(ApplicationDAO.class); =20 manager.startTransaction(); //various inserts =20 manager.commitTransaction(); =20 } catch (Exception e) { throw new SPSBusinessException(e); } finally { if (manager !=3D null) { =20 manager.endTransaction(); } } =20 =20 =20 -----Original Message----- From: Brandon Goodin [mailto: brandon.goodin@gmail.com] Sent: 12 December 2006 15:40 To: user-java@ibatis.apache.org Subject: Re: Problem committing records using IBATIS in embedded jar file Please post your dao.xml and sqlmap-config.xml from ProjectA and ProjectB. = Also, post any supporting code that is failing to commit (code that loads t= he dao.xml, code that loads sqlmapconfig.xml, code that starts and commits = the transaction, etc....). This will help us to see what you are doing and = will likely get you an answer that is not a guess.=20 Brandon On 12/12/06, Ross, Niall < Niall.Ross@agriculture.gov.ie> wrote:=20 Hi, I am having the following problem and I was wondering had anyone encountere= d this type of thing before or could someone possibly lend a hand with a solution. Ok here's the setup: Project A uses ibatis to control all transaction management functionality n= eeded.=20 Project B also uses ibatis but also includes Project A in the form of a jar. We are currently developing in Project B and wish to prevent duplication of= code so we want to re-use the DB related calls from Project A within Project B through= the Project A jar.=20 With me so far??? When we execute code from Project A that alters a table in some way we use = the DAOManager to start, end and commit the transactions. This is working in Project A. The problem occurs when trying to execute this same code through the jar fi= le from within Project B=20 as when we the execute the code the transaction does not get committed at a= ll. It will however be committed when I physically shutdown my local appserver. It seems to me that there is some sort of IBATIS config conflict problem wh= en trying to execute transaction management=20 in the way described above. Does anyone have any suggestions? Regards, Niall **************************************************************************** *************** Department of Agriculture and Food ******************=20 The information contained in this email and in any attachments is confidential and is designated solely for the attention and use of the intended recipient(s). This information may be subject to legal and professional privilege. If you are not an intended recipient of=20 this email, you must not use, disclose, copy, distribute or retain this message or any part of it. If you have received this email in error, please notify the sender immediately and delete all copies of this email from your computer system(s).=20 **************************************************************************** **************************************************************************** **************** An Roinn Talmha+-AO0-ochta Agus Bia *******************= =20 T+-AOE an t-eolais san r+-AO0-omhphost seo, agus in aon ceangl+-AOE-in leis, faoi phribhl+-AOk-id agus faoi r+-APo-n agus le h-aghaigh an seola+-AO0 amh= +-AOE-in. D+-IBk-fh+-AOk-adfadh +-AOE-bhar an seoladh seo bheith faoi phribhl+-AOk-id= =20 profisi+-APo-nta n+-APM dl+-AO0-thi+-APo-il. Mura tusa an seola+-AO0 a bh+-= AO0 beartaithe leis an r+-AO0-omhphost seo a fh+-AOE-il, t+-AOE cosc air, n+-APM aon chuid= de, a +-APo-s+-AOE-id, a ch+-APM-ipe+-AOE-l, n+-APM a scaoileadh. M+-AOE th+-A= OE-inig s+-AOk chugat de=20 bharr dearmad, t+-AOk-igh i dteagmh+-AOE-il leis an seolt+-APM-ir agus scri= os an t-+-AOE-bhar +-APM do r+-AO0-omhaire le do thoil. **************************************************************************** ***************************************************************************= *=20 *************** Department of Agriculture and Food ****************** =20 The information contained in this email and in any attachments is=20 confidential and is designated solely for the attention and use of=20 the intended recipient(s). This information may be subject to legal=20 and professional privilege. If you are not an intended recipient of this email, you must not use, disclose, copy, distribute or retain=20 this message or any part of it. If you have received this email in=20 error, please notify the sender immediately and delete all copies of this email from your computer system(s). ***************************************************************************= *=20 =20 =20 ***************************************************************************= *=20 **************** An Roinn Talmha+AO0-ochta Agus Bia ******************* =20 T+AOE an t-eolais san r+AO0-omhphost seo, agus in aon ceangl+AOE-in leis,=20 faoi phribhl+AOk-id agus faoi r+APo-n agus le h-aghaigh an seola+AO0 amh+AO= E-in. D'fh+AOk-adfadh +AOE-bhar an seoladh seo bheith faoi phribhl+AOk-id=20 profisi+APo-nta n+APM dl+AO0-thi+APo-il. Mura tusa an seola+AO0 a bh+AO0 be= artaithe=20 leis an r+AO0-omhphost seo a fh+AOE-il, t+AOE cosc air, n+APM aon chuid de,= =20 a +APo-s+AOE-id, a ch+APM-ipe+AOE-l, n+APM a scaoileadh. M+AOE th+AOE-inig = s+AOk chugat de=20 bharr dearmad, t+AOk-igh i dteagmh+AOE-il leis an seolt+APM-ir agus scrios = an=20 t-+AOE-bhar +APM do r+AO0-omhaire le do thoil.=20 **************************************************************************** =20 ***************************************************************************= * =20 *************** Department of Agriculture and Food ****************** The information contained in this email and in any attachments is=20 confidential and is designated solely for the attention and use of=20 the intended recipient(s). This information may be subject to legal=20 and professional privilege. If you are not an intended recipient of this email, you must not use, disclose, copy, distribute or retain=20 this message or any part of it. If you have received this email in=20 error, please notify the sender immediately and delete all copies of this email from your computer system(s). ***************************************************************************= * =20 ***************************************************************************= * =20 **************** An Roinn Talmha+AO0-ochta Agus Bia ******************* T+AOE an t-eolais san r+AO0-omhphost seo, agus in aon ceangl+AOE-in leis,=20 faoi phribhl+AOk-id agus faoi r+APo-n agus le h-aghaigh an seola+AO0 amh+AO= E-in. D+IBk-fh+AOk-adfadh +AOE-bhar an seoladh seo bheith faoi phribhl+AOk-id=20 profisi+APo-nta n+APM dl+AO0-thi+APo-il. Mura tusa an seola+AO0 a bh+AO0 be= artaithe=20 leis an r+AO0-omhphost seo a fh+AOE-il, t+AOE cosc air, n+APM aon chuid de,= =20 a +APo-s+AOE-id, a ch+APM-ipe+AOE-l, n+APM a scaoileadh. M+AOE th+AOE-inig= s+AOk chugat de=20 bharr dearmad, t+AOk-igh i dteagmh+AOE-il leis an seolt+APM-ir agus scrios = an=20 t-+AOE-bhar +APM do r+AO0-omhaire le do thoil. =20 **************************************************************************** ------_=_NextPart_001_01C71ED3.9E8CDB34 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
The=20 odd "@ @" syntax is just merely tokens which are substituted for=20 there 
correct values from a properties=20 files. 
 
We are=20 using iBatis version 2.0.9
 
Regards,
Niall
<= U> 
<= U>Project A 2nd config file =20 sql-map-config-iforis.xml
 
<sqlMapConfig> 
 <settings=20 cacheModelsEnabled=3D"true" enhancementEnabled=3D"true" maxSessions=3D"50"= =20 maxTransactions=3D"50" maxRequests=3D"300" useStatementNamespaces=3D"true" = />=20
 
 <transactionManag= er=20 type=3D"JDBC" >
  <dataSource=20 type=3D"SIMPLE">
   <property name=3D"JDBC.Driver"= =20 value=3D"oracle.jdbc.driver.OracleDriver"/>
   <pro= perty=20 name=3D"JDBC.ConnectionURL"=20 value=3D"jdbc:oracle:thin:@10.0.97.70:1522:UAT"/>
   &= lt;property=20 name=3D"JDBC.Username"=20 value=3D"SPS_AHCSMIG_CONNECT"/>
   <property=20 name=3D"JDBC.Password"=20 value=3D"SPS_AHCSMIG_CONNECT"/>
   <property=20 name=3D"JDBC.DefaultAutoCommit" value=3D"true"=20 />
   <property name=3D"Pool.MaximumActiveConnectio= ns"=20 value=3D"10"/>
   <property=20 name=3D"Pool.MaximumIdleConnections"=20 value=3D"5"/>
   <property name=3D"Pool.MaximumChec= koutTime"=20 value=3D"120000"/>
   <property name=3D"Pool.TimeTo= Wait"=20 value=3D"500"/>
   <property name=3D"Pool.PingQuery= "=20 value=3D"select * from TDIF_NOTES"/>
   <property=20 name=3D"Pool.PingEnabled" value=3D"false"/>
   <pro= perty=20 name=3D"Pool.PingConnectionsOlderThan"=20 value=3D"1"/>
   <property=20 name=3D"Pool.PingConnectionsNotUsedFor"=20 value=3D"1"/>
  </dataSource>
 </transacti= onManager>
 
 <sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/IForisData.xml"/>
<= /DIV>
 
</sqlMapConfig>
-----Original Message-----
From: Brandon Goodin=20 [mailto:brandon.goodin@gmail.com]
Sent: 13 December 2006=20 16:08
To: user-java@ibatis.apache.org
Subject: Re: Pr= oblem=20 committing records using IBATIS in embedded jar file

= I see=20 Project A loads two different SQL Map configs with an odd @...@ syntax. Y= ou=20 only posted 1 of them for Project A. Please post the other as well. Also,= what=20 version of iBATIS are you using?

Brandon

On 12/13/06, R= oss,=20 Niall <Niall.Ross@agriculture.gov.= ie>=20 wrote:
Brandon,
&n= bsp;
Attached are the= essential=20 parts of the necessary files.
&n= bsp;
Regards,
Niall
--------------------------------------------------------------= ---
&n= bsp;
Proje= ct A=20 sql-map-config.xml
&n= bsp;
<sqlMapConfig> 
 =20 <settings
  cacheModelsEnabled=3D"true"
  = enhancementEnabled=3D"true"
  maxSessions=3D"64"
 &nbs= p;maxTransactions=3D"8"
  maxRequests=3D"128"
  u= seStatementNamespaces=3D"true"/>=20
<!--
 <transactionManager=20 type=3D"EXTERNAL">
  <dataSource=20 type=3D"JNDI">  
   <property=20 name=3D"DataSource"=20 value=3D"jdbc/ejb/SPS"/>
  </dataSource>
 = ;</transactionManager>
-->
 
 <transactionManager type=3D"JDBC"=20 >
  <dataSource=20 type=3D"SIMPLE">
   <property name=3D"JDBC.Driv= er"=20 value=3D"oracle.jdbc.driver.OracleDriver"/>
   <= ;property=20 name=3D"JDBC.ConnectionURL"=20 value=3D"jdbc:oracle:thin:@10.0.97.62:1521:TERRA"/>
  &= nbsp;<property=20 name=3D"JDBC.Username" value=3D"SPS_DEV"/>
   <= property=20 name=3D"JDBC.Password" value=3D"SPS_DEV"/>
   <= property=20 name=3D"JDBC.DefaultAutoCommit" value=3D"true"=20 />
   <property name=3D"Pool.MaximumActiveConne= ctions"=20 value=3D"10"/>
   <property=20 name=3D"Pool.MaximumIdleConnections"=20 value=3D"5"/>
   <property=20 name=3D"Pool.MaximumCheckoutTime"=20 value=3D"120000"/>
   <property name=3D"Pool.Ti= meToWait"=20 value=3D"500"/>
   <property name=3D"Pool.PingQ= uery"=20 value=3D"select * from=20 TDSP_NOTES_SAMPLE"/>
   <property=20 name=3D"Pool.PingEnabled" value=3D"false"/>
   <= ;property=20 name=3D"Pool.PingConnectionsOlderThan"=20 value=3D"1"/>
   <property=20 name=3D"Pool.PingConnectionsNotUsedFor"=20 value=3D"1"/>
  </dataSource>
 </trans= actionManager>
 
 <sqlMap= =20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/EntCustLinkData.xml"/>= ;
 <sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/FarmerDetailsData.xml"/&= gt;
 <sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/CodeTable.xml"/>=20
 <sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/ScannedDocumentSummaryDa= ta.xml"/>
 <sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/NotesData.xml"/>
&= nbsp;<sqlMap=20 resource=3D"ie/gov/agriculture/sps/app/dao/xml/CommonageAllocData.xml"/= >
 .....
 ..... 
  
</sqlMapConf= ig>
&n= bsp;
Proje= ct A=20 dao.xml
&n= bsp;
<daoConfig>
 <!-- iBatis DAO configuration fi= le=20 -->
   <context>
     <= !--=20 Static content -->
  <transactionManager=20 type=3D"SQLMAP">
   <property=20
    name=3D"SqlMapConfigResource"
 &nbs= p;  value=3D"ie/gov/agriculture/sps/app/dao/xml/@SQL_CONFIG_MAP@"/=20 >
  </transactionManager> 
 &nbs= p;<dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.PrePrintDetailsDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.PrePrintDetailsSQLMapDAO"/> 
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.ApplicationDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.ApplicationSQLMapDAO"/>  
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.EntCustLinkDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.EntCustLinkSQLMapDAO"/>   
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.StopsDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.StopsSQLMapDAO"/> 
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.FarmerSearchDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.FarmerSearchJDBCDAO"/> 
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.CodeDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.CodeTableDAO"/> 
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.ScannedDocumentSummaryDAO"= =20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.ScannedDocumentSummarySQLMapDAO"/>
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.ScannedDocumentImagesDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.ScannedDocumentImageSQLMAPDAO"/> 
  <!--
&n= bsp; <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.Audit"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.AuditDAO"/>-->=20    
  <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.CommonageAllocDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.CommonageAllocSQLMapDAO"/>
      <= BR>  ....
  ....
 </context> 

 
   <context>
  =20   <!-- Static content=20 -->
  <transactionManager=20 type=3D"SQLMAP">
   <property=20
    name=3D"SqlMapConfigResource"
 &nbs= p;  value=3D"
ie/gov/agriculture/sps/app/dao/xml/@SQL_CONFIG_MAP_IFORIS@"/>
  </transactionManager>
 
&= nbsp; <dao=20 interface=3D"ie.gov.agriculture.sps.app.dao.IForisDAO"=20
   implementation=3D"ie.gov.agriculture.sps.app.dao.= impl.IForisSQLMapDAO"/> 
 </context> 
 
</daoConfig>
 
 
Proje= ct B=20 sql-map-config.xml
&n= bsp;
<sqlMapConfig> 
 =20 <settings
  cacheModelsEnabled=3D"true"
  = enhancementEnabled=3D"true"
  maxSessions=3D"64"
 &nbs= p;maxTransactions=3D"8"
  maxRequests=3D"128"
  u= seStatementNamespaces=3D"true"/>=20
<!--
 <transactionManager=20 type=3D"EXTERNAL">
  <dataSource=20 type=3D"JNDI">  
   <property=20 name=3D"DataSource"=20 value=3D"jdbc/ejb/SPS"/>
  </dataSource>
 = ;</transactionManager>
-->
 
 <transactionManager type=3D"JDBC"=20 >
  <dataSource=20 type=3D"SIMPLE">
   <property name=3D"JDBC.Driv= er"=20 value=3D"oracle.jdbc.driver.OracleDriver"/>
   <= ;property=20 name=3D"JDBC.ConnectionURL"=20 value=3D"jdbc:oracle:thin:@10.0.97.62:1521:TERRA"/>
  &= nbsp;<property=20 name=3D"JDBC.Username" value=3D"SPS_DEV"/>
   <= property=20 name=3D"JDBC.Password" value=3D"SPS_DEV"/>
   <= property=20 name=3D"JDBC.DefaultAutoCommit" value=3D"true"=20 />
   <property name=3D"Pool.MaximumActiveConne= ctions"=20 value=3D"10"/>
   <property=20 name=3D"Pool.MaximumIdleConnections"=20 value=3D"5"/>
   <property=20 name=3D"Pool.MaximumCheckoutTime"=20 value=3D"120000"/>
   <property name=3D"Pool.Ti= meToWait"=20 value=3D"500"/>
   <property name=3D"Pool.PingQ= uery"=20 value=3D"select * from=20 TDSP_NOTES_SAMPLE"/>
   <property=20 name=3D"Pool.PingEnabled" value=3D"false"/>
   <= ;property=20 name=3D"Pool.PingConnectionsOlderThan"=20 value=3D"1"/>
   <property=20 name=3D"Pool.PingConnectionsNotUsedFor"=20 value=3D"1"/>
  </dataSource>
 </trans= actionManager>
 
 <sqlMap= =20 resource=3D"ie/gov/agriculture/spsinet/app/dao/xml/SavedDraftData.xml"/= >

</sqlMapConfig>
 
Project B dao.xml
 
<daoConfig>
 <!-- iBatis DAO configuration fi= le=20 -->
   <context>
     <= !--=20 Static content -->
  <transactionManager=20 type=3D"SQLMAP">
   <property=20
    name=3D"SqlMapConfigResource"
 &nbs= p;  value=3D"ie/gov/agriculture/spsinet/app/dao/xml/@SQL_CONFIG_MAP@= "/=20 >
  </transactionManager>
  
=   <dao=20 interface=3D"ie.gov.agriculture.spsinet.app.dao.SampleDraftSaveDAO"=20
   implementation=3D"ie.gov.agriculture.spsinet.app.= dao.impl.SampleDraftSaveSQLMapDAO"/>  
  <dao= =20 interface=3D"ie.gov.agriculture.spsinet.app.dao.SavedDraftJDBCDAO"=20
   implementation=3D"ie.gov.agriculture.spsinet.app.= dao.impl.SavedDraftJDBCSQLMapDAO"/>  
  <dao=20 interface=3D"ie.gov.agriculture.spsinet.app.dao.AgentSearchDAO"=20
   implementation=3D"ie.gov.agriculture.spsinet.app.= dao.impl.AgentSearchJDBCDAO"/> 
  
 </context> 
</daoConfig>
&n= bsp;
--------------------------------------------------------------= -------------------------------------------------
Suppo= rting=20 Code
 
The following co= de is the=20 code that is failing to commit. The DAOConfig in question below is=20
coming from Proj= ect A so is=20 therefore associtaed with dao.xml from that project=20 above.
&n= bsp;
 DaoManager= manager =3D=20 null;
       =20
       =20 try
       =20 {
           = =20 manager =3D=20 DAOConfig.getDaomanager();
       = ;    =20 /* Insert a record on the Application Table=20 */
           = ; dao=20 =3D (ApplicationDAO)=20 manager.getDao(ApplicationDAO.class);
     =       =20
           = =20 manager.startTransaction();
      &nbs= p;     //various=20 inserts
 
          &n= bsp; manager.commitTransaction();
 
  &nbs= p; =20 }
        catch (Exception=20 e)
       =20 {
           = =20 throw new=20 SPSBusinessException(e);
       = =20 }
       =20 finally
       =20 {
           = if=20 (manager !=3D=20 null)
          &n= bsp;=20 {
           =     =20
           &= nbsp;   =20 manager.endTransaction();
       =     =20 }
        }
&n= bsp;
&n= bsp;
&n= bsp;
-----Original Message-----
From= :=20 Brandon Goodin [mailto:brandon.goodin@gmail.com]
Sent: 12 Decemb= er 2006=20 15:40
To: user-java@ibatis.apache.org
Subject: Re: = Problem=20 committing records using IBATIS in embedded jar file

Please post your dao.xml and sqlmap-config.xml from Project= A=20 and ProjectB. Also, post any supporting code that is failing to commi= t=20 (code that loads the dao.xml, code that loads sqlmapconfig.xml, code = that=20 starts and commits the transaction, etc....). This will help us to se= e=20 what you are doing and will likely get you an answer that is not a gu= ess.=20

Brandon

On 12/12/06, Ross,=20 Niall <Niall.Ross@agriculture.gov.ie> wrote:=20
Hi,

I=20 am having the following problem and I was wondering had anyone=20 encountered this type of thing before
or could someone possibly = lend=20 a hand with a solution.

Ok here's the setup:

Project = A=20 uses ibatis to control all transaction management functionality nee= ded.=20
Project B also uses ibatis but also includes Project A in the f= orm=20 of a jar.

We are currently developing in Project B and wish = to=20 prevent duplication of code so we
want to re-use the DB related = calls=20 from Project A within Project B through the Project A jar.
With= me=20 so far???

When we execute code from Project A that alters a = table=20 in some way we use the DAOManager to
start, end and commit the=20 transactions. This is working in Project A.

The problem occu= rs=20 when trying to execute this same code through the jar file from wit= hin=20 Project B
as when we the execute the code the transaction does = not=20 get committed at all. It will however be committed
when I physic= ally=20 shutdown my local appserver.

It seems to me that there is so= me=20 sort of IBATIS config conflict problem when trying to execute=20 transaction management
in the way described above.

Does= =20 anyone have any=20 suggestions?

Regards,
Niall



**************= **************************************************************
*********= ******  Department=20 of Agriculture and Food ******************

The information= =20 contained in this email and in any attachments is
confidential a= nd is=20 designated solely for the attention and use of
the intended=20 recipient(s). This information may be subject to legal
and=20 professional privilege.  If you are not an intended recip= ient=20 of
this email, you must not use, disclose, copy, distribute or= =20 retain
this message or any part of it. If you have received this= =20 email in
error, please notify the sender immediately and delete = all=20 copies
of this email from your computer system(s).=20
***************************************************************= *************


**************************************************= **************************
****************  An=20 Roinn Talmha+AO0-ochta Agus Bia  *******************=20

T+AOE an t-eolais san r+AO0-omhphost seo, agus in aon=20 ceangl+AOE-in leis,
faoi phribhl+AOk-id agus faoi r+APo-n agus l= e=20 h-aghaigh an seola+AO0 amh+AOE-in.
D+IBk-fh+AOk-adfadh +AOE-bhar= an=20 seoladh seo bheith faoi phribhl+AOk-id
profisi+APo-nta n+APM=20 dl+AO0-thi+APo-il. Mura tusa an seola+AO0 a bh+AO0 beartaithe
le= is an=20 r+AO0-omhphost seo a fh+AOE-il, t+AOE cosc air, n+APM aon chuid de,=
a=20 +APo-s+AOE-id, a ch+APM-ipe+AOE-l, n+APM a scaoileadh.  M= +AOE=20 th+AOE-inig s+AOk chugat de
bharr dearmad, t+AOk-igh i=20 dteagmh+AOE-il leis an seolt+APM-ir agus scrios an
t-+AOE-bhar += APM=20 do r+AO0-omhaire le do=20 thoil.
*********************************************************= *******************


**********************************************= ******************************=20

*************** Department of Agricul= ture=20 and Food ******************

 

The information contained in this ema= il and=20 in any attachments is

confidential and is designated solely= for=20 the attention and use of

the intended recipient(s). This infor= mation=20 may be subject to legal

and professional privilege. If you ar= e not=20 an intended recipient of

this email, you must not use, disclos= e,=20 copy, distribute or retain

this message or any part of it. If yo= u have=20 received this email in

error, please notify the sender immed= iately=20 and delete all copies

of this email from your computer=20 system(s).

**********************************************= ******************************=20

 

 

**********************************************= ******************************=20

**************** An Roinn Talmha=EDoc= hta Agus=20 Bia *******************

 

T=E1 an t-eolais san r=EDomhphost seo= , agus in=20 aon ceangl=E1in leis,

faoi phribhl=E9id agus faoi r=FAn agu= s le=20 h-aghaigh an seola=ED amh=E1in.

D'fh=E9adfadh =E1bhar an seoladh seo = bheith faoi=20 phribhl=E9id

profisi=FAnta n=F3 dl=EDthi=FAil. Mur= a tusa an=20 seola=ED a bh=ED beartaithe

leis an r=EDomhphost seo a fh=E1il, t= =E1 cosc air,=20 n=F3 aon chuid de,

a =FAs=E1id, a ch=F3ipe=E1l, n=F3 a s= caoileadh. M=E1=20 th=E1inig s=E9 chugat de

bharr dearmad, t=E9igh i dteagmh=E1il= leis an=20 seolt=F3ir agus scrios an

t-=E1bhar =F3 do r=EDomhaire le do th= oil.=20

**********************************************= ******************************

 


*********************= *******************************************************

*************** Depa= rtment of Agriculture and Food ******************

 

The information conta= ined in this email and in any attachments is

confidential and is d= esignated solely for the attention and use of

the intended recipien= t(s). This information may be subject to legal

and professional priv= ilege. If you are not an intended recipient of

this email, you must = not use, disclose, copy, distribute or retain

this message or any p= art of it. If you have received this email in

error, please notify = the sender immediately and delete all copies

of this email from yo= ur computer system(s).

*********************= *******************************************************

 

 

*********************= *******************************************************

**************** An = Roinn Talmhaíochta Agus Bia *******************

 

Tá an t-eolais= san ríomhphost seo, agus in aon ceangláin leis,

faoi phribhléi= d agus faoi rún agus le h-aghaigh an seolaí amháin.

D’fhéadf= adh ábhar an seoladh seo bheith faoi phribhléid

profisiúnta n&= oacute; dlíthiúil. Mura tusa an seolaí a bhí be= artaithe

leis an ríomhp= host seo a fháil, tá cosc air, nó aon chuid de,

a úsáid= , a chóipeál, nó a scaoileadh. Má tháin= ig sé chugat de

bharr dearmad, t&eacu= te;igh i dteagmháil leis an seoltóir agus scrios an

t-ábhar &oacut= e; do ríomhaire le do thoil.

*********************= *******************************************************

 

------_=_NextPart_001_01C71ED3.9E8CDB34--