Re: daomanager doesn't rollback transaction?

2006-08-02 Thread Debasish Dutta Roy
Though there are several possible solutions already mentioned. Let me tell you about my experience. I had exactly the same problem.My problem was, with this setup I was still using sqlMapClient in the dao implementation classes. i.e. inside this.myDao.updateParent(p); I had sqlMapClient.udpate, I d

Re: help problem with select request using 'in' where clause

2006-07-27 Thread Debasish Dutta Roy
   select DONNEE_UUID, DESCRIPTION, LIBELLE, TYPAGE, EVALUATEUR, TSTMPINSR, TSTMPUPDT     from DONNEE        where        DONNE_UUID IN(" close=")" conjunction=",">#[]#        Your select tag is as simple as < select id = "selectFromDonneeUUID" resultMap = "abatorgenerated_DonneeResult" >F

Re: Mapped statement with chained queries ?

2006-07-21 Thread Debasish Dutta Roy
You can do this in a simple manner. In the resultmap you need to provide the values properly. Here is an example.Here is the resultmap for Task    other properties ---    --- Your select for task ---  --- other properties ---   -- select statement for getting job info--  

Re: lists as parameterClass

2006-07-20 Thread Debasish Dutta Roy
Yes, you can do that. Use the iterator tag.On 7/20/06, Thomas Karl Schwaerzler <[EMAIL PROTECTED] > wrote:hello,i'd like to do a query that looks like:select * from odm_product where id IN (1,2); where i'd like to pass over a list of long valuesas parameter ( java.lang.Long[] )is there something li

Re: locating errors in SqlMap

2006-07-19 Thread Debasish Dutta Roy
ere confusing at thebeginning) Debasish Dutta Roy wrote:> I would opt to disagree.> Following the suggestions would surely help. You can also put logs for> iBATIS. There are many email threads about that.>> I have made many minor to major mistakes in the sql-map files and have >

Re: locating errors in SqlMap

2006-07-19 Thread Debasish Dutta Roy
Hello TedAbsolutely! I completely agree with you. I was actually replying to Vadim's email rather than yours :).First few days are always difficult and a list of most frequently committed errors/mistakes and their resolution would surely make it more popular. -DebasishOn 7/19/06, Ted Schrader <[EMA

Re: transaction help update

2006-07-19 Thread Debasish Dutta Roy
. On 7/19/06, Bing Lu <[EMAIL PROTECTED]> wrote: can you tell me the url for that pdf?thanks--- Debasish Dutta Roy <[EMAIL PROTECTED]>wrote:> There is a PDF file about the dao manager. It is a > very good one. Also if> you are aware of J2EE design patterns, then you will> be

Re: transaction help update

2006-07-19 Thread Debasish Dutta Roy
There is a PDF file about the dao manager. It is a very good one. Also if you are aware of J2EE design patterns, then you will be easily able to map the documents and the ideas. That will help you design your applications nicely. In short, using a DAO Manager is like using a service layer. That way

Re: locating errors in SqlMap

2006-07-19 Thread Debasish Dutta Roy
I would opt to disagree.Following the suggestions would surely help. You can also put logs for iBATIS. There are many email threads about that.I have made many minor to major mistakes in the sql-map files and have been pointed quite well by iBATIS. E.g. I do get logs like thiscom.ibatis.common.jdbc

Re: transaction help please

2006-07-17 Thread Debasish Dutta Roy
It wil be a good design approach to have a dao manager. Its is the business delegate object and primarily there for your kind of situation.However, if you have a daomanager then you should not use the mapclient again in your dao, they will be different transactions. If you do not want to use the da

Re: A quick question need help as ASAP

2006-07-17 Thread Debasish Dutta Roy
The code looks good. Best thing would be try to run in SQL-PLUS or TOAD or something like that. Check if the query actyally works.On 7/17/06, Krishnamoorthi, Sruthi (Raytheon) <[EMAIL PROTECTED]> wrote: I am not understanding to whom are you putting thios question.The subject is related to my prob

Re: result map property as hashmap

2006-07-14 Thread Debasish Dutta Roy
department where deptid=#value# So this is your EMP_ID. Just  as an example.On 7/13/06, Bing Lu <[EMAIL PROTECTED]> wrote: so what does column="EMP_ID" do in here, does it passonto the next query as parameter? --- Debasish Dutta Roy <[EMAIL PROTECTED]>wrote:> Yes you can do that.

Re: result map property as hashmap

2006-07-13 Thread Debasish Dutta Roy
Yes you can do that.In your first resultmap, you are going to provide the --- First resultmap --- The select id "getEmployeeDetails" has a corresponding resultClass is a HashMap.So this way you will only call one query the first one and one of the result will be a hash map. On 7/13/06, Bing Lu <[EM

Re: HOW TO pass List of objects(a DTO) as single IN parameter to Stored Procedure

2006-07-11 Thread Debasish Dutta Roy
Take a look at user defined types. When you use the stored procedure, you need to define the parameter map. There you have the option of specifying the types. I am still not sure, that you have a sp which takes a List as a input parameter? and each element inside the list is again a user defined ob

Re: URGENT - Cannot get Transaction Management to work with iBATIS !!!

2006-06-29 Thread Debasish Dutta Roy
aryCustomer", argCustomer); }   Jeff Butler         On 6/28/06, Debasish Dutta Roy <[EMAIL PROTECTED] > wrote: Damn!!! So much for the details huh :)Oracle 9i.JDBC Driver : orajdbc-9.2.0.jar On 6/28/06, Richard Yee < [EMAIL PROTECTED]> wrote: Which database are you using?-Ric

Re: URGENT - Cannot get Transaction Management to work with iBATIS !!!

2006-06-28 Thread Debasish Dutta Roy
Damn!!! So much for the details huh :)Oracle 9i.JDBC Driver : orajdbc-9.2.0.jarOn 6/28/06, Richard Yee < [EMAIL PROTECTED]> wrote:Which database are you using?-Richard Debasish Dutta Roy wrote:> My Environment>> Server: Tomcat 5> JDK: 1.4.2>> Datasource>

URGENT - Cannot get Transaction Management to work with iBATIS !!!

2006-06-28 Thread Debasish Dutta Roy
My EnvironmentServer: Tomcat 5JDK: 1.4.2Datasource---Defined in Tomcat as a JNDI resource. Mentioned in web.xml as a resource ref.Application design- Web layer : Struts action classesMiddle layer: Normal business delegate classes. Action classes does     Customer

Re: commitRequired?, DefaultAutoCommit?, SetAutoCommitAllowed?

2006-06-27 Thread Debasish Dutta Roy
I am very confused about the transaction management also. I am not sure either if it works.I am using Oracle 9i and I have made several posts and it does not work. I cannot rollback operations. If I debug inside the daoManager then the code is suppose to roll back for all the contexts in the list.

Re: Debug iBATIS source code thru myeclipse

2006-06-27 Thread Debasish Dutta Roy
"Edit" button on the left pane- Browse to the iBATIS source zip file you downloadedCheers,Chris-Original Message-From: Debasish Dutta Roy [mailto: [EMAIL PROTECTED]]Sent: Tue 6/27/2006 9:46 AMTo: user-java@ibatis.apache.orgSubject: Debug iBATIS source code thru myeclipseCan I ste

Debug iBATIS source code thru myeclipse

2006-06-27 Thread Debasish Dutta Roy
Can I step into iBATIS source code while debugging my application?How can I do that with myeclipse? The 3 iBATIS jar files does not contain the source code.Have anyone tried this.

Re: Failed transaction commits half of transaction

2006-06-27 Thread Debasish Dutta Roy
hi I pretty much do the exact thing but my transaction does not rollback if there is any sql exception. And also my scenario is lot simpler. One schema, Oracle, Tomcat Jndi, standard stuff.Do you have anything in web.xml. Did you remove the reference of the datasource from web.xml?On 6/26/06, jayb

Re: Return result as Map

2006-06-21 Thread Debasish Dutta Roy
Map will work.1. You have to mention as java.util.HashMap as has been mentioned by Niels. Here point to be noted if you do not give a concrete class then iBATIS does not know what to instantiate and should give exception, I have received this exception. So I suspect there is something else that is

Re: Passing Values to IN Operator in Oracle Stored Procedure

2006-06-19 Thread Debasish Dutta Roy
Hi you have to use dynamic tag. Here is an example                                    #[]#                     From java code all your country ids are in a java.util.List object.On 6/19/06, Bala R K <[EMAIL PROTECTED]> wrote: Hi, I am using Java, Oracle 9i and iBatis 2.1.7 in my application. I lik

Re: How to print SQL statements from iBATIS

2006-06-19 Thread Debasish Dutta Roy
thanks! that works for me.On 6/19/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: Hello,   add the following line to the log4jproperties file :   log4j.logger.java.sql=debug, stdout   From: Debasish Dutta Roy [mailto:[EMAIL PROTECTED]] Sent: Monday, June 19, 2006 4:2

How to print SQL statements from iBATIS

2006-06-19 Thread Debasish Dutta Roy
How to configure iBATIS so that I can see the SQL statements getting executed via iBATIS.I am using log4j. And my development env is MyEclipse 4.0.Even if it spits out in the console it will be fine.

2 Lists in query statement

2006-06-15 Thread Debasish Dutta Roy
hi allI need to add 2 lists into the query. i.e. I have a select with 2 IN clause. Used an object with 2 lists. Passed that to the query.            select distinct psp.profile_study_protocol_id         from profile_study_protocol psp, profile_protocol_item ppi         where             psp.profil

Re: Rollback Issues

2006-06-15 Thread Debasish Dutta Roy
hat bypasses the commit?  Maybe there is some useful information in that exception?   Jeff Butler  On 6/15/06, Debasish Dutta Roy <[EMAIL PROTECTED] > wrote: OK. Here are the answers1. First one is an insert & second one is a stored proc call. The first one populates the REQUEST table

Re: Rollback Issues

2006-06-15 Thread Debasish Dutta Roy
e it doesn't look like they are, but also doesn't hurt to ask.   Jeff Butler     On 6/15/06, Debasish Dutta Roy <[EMAIL PROTECTED] > wrote: offcourse it will be helpful if you could share what you did correctly, and if you could find something wrong in my approach. I am using Or

Re: Rollback Issues

2006-06-15 Thread Debasish Dutta Roy
offcourse it will be helpful if you could share what you did correctly, and if you could find something wrong in my approach. I am using Oracle 9i.On 6/15/06, Tony Qian <[EMAIL PROTECTED]> wrote: Yes. It worked for me (MySQL). Tony Debasish Dutta Roy wrote on 6/15/2006, 11:09 AM

Rollback Issues

2006-06-15 Thread Debasish Dutta Roy
Hi AllHas anyone successfully tested rollback with DAOManager implementation.I am unable to get it working. I have a business delegate who does like this:DAO1 dao1 = daoManager.getDAO(DAO1.class);DAO2 dao2 = daoManager.getDAO(DAO2.class);try {   daoManager.startTransaction();  dao1.firstTa

Re: Stored Procedure Problem

2006-06-14 Thread Debasish Dutta Roy
#=call test_request.mySP(  #requestId,jdbcType=INTEGER,mode=IN#,#output2,jdbcType=VARCHAR,mode=OUT#)}     The first way has been documented for some time.  The second way has been available for some time, but only recently documented (see the latest PDF in SVN).   Jeff Butler     On 6/14/06, Debasish Dut

Re: Is Error in Ibatis ?

2006-06-14 Thread Debasish Dutta Roy
I faced a similar problem. The answer is correct as provided by Richard.The mistake that I was making :I was running the query in a loop and for one of the id it was giving a single result for some other id it was giving muliple results. Yours may be a similar case. Just follow what Richard says. O

Re: Stored Procedure Problem

2006-06-14 Thread Debasish Dutta Roy
Can you please give me your example. That would be really helpful.On 6/14/06, Larry Meadors <[EMAIL PROTECTED] > wrote:I have had success using a external resultmap and then using "?" instead of #property# in the mapped statement.LarryOn 6/14/06, Debasish Dutta Roy <[EMAIL PROTE

Stored Procedure Problem

2006-06-14 Thread Debasish Dutta Roy
Dear allThe documentation of SP is so bad it really creates loads of downtime.Can anyone give me a detailed example of using Stored Procedure. My requirements...1. The SP looks like{?=call test_request.mySP(?,?)} where 1 = Registered out parameter type INT, 2=In Parameter type INT, 3=Out Parameter

Re: DAOManager Rollback problem

2006-06-14 Thread Debasish Dutta Roy
gt; wrote:>> It looks good to me. What exactly is the problem you are facing?>>> On 6/13/06, *Debasish Dutta Roy* < [EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:>> I am having a problem with rollback. I use DaoManger and SQLMap. >>

Re: DAOManager Rollback problem

2006-06-14 Thread Debasish Dutta Roy
s good to me. What exactly is the problem you are facing?On 6/13/06, Debasish Dutta Roy <[EMAIL PROTECTED] > wrote:I am having a problem with rollback. I use DaoManger and SQLMap. I have a business delegate who does like this:DAO1 dao1 = daoManager.getDAO(DAO1.class);DAO2 dao2 = daoManager

Re: iterate over java.Util.List

2006-06-14 Thread Debasish Dutta Roy
Hi AllFirst and foremost you can surely pass the List object as a parameter. I have done that many times.Please do the following...List argList is your list containing all the IN values                                    #[]#                    Java codemapClient.queryForList ("myMethod", argList)

DAOManager Rollback problem

2006-06-13 Thread Debasish Dutta Roy
I am having a problem with rollback. I use DaoManger and SQLMap.I have a business delegate who does like this:DAO1 dao1 = daoManager.getDAO(DAO1.class);DAO2 dao2 = daoManager.getDAO(DAO2.class);try {   daoManager.startTransaction();  dao1.firstTask();  dao2.secondTask();  daoManager