RE: "No operations allowed after connection closed" occasionally when using queryForList

2007-05-31 Thread James, Steven
I have had this error with mysql, check to see that you are not creating more than one Sqlclient. Secondly you have lazy loading on so ensure you are not calling a get on mapped object outside of the transaction. -Original Message- From: CppPlease [mailto:[EMAIL PROTECTED] Sent: Donnerst

RE: pool exhausted

2007-04-06 Thread James, Steven
when i have seen these problems before it is usually because you have more than one sqlmapclient so check to see if you are creating more than one or if this can happen in your code. -Original Message- From: paolo [mailto:[EMAIL PROTECTED] Sent: Fri 06/04/2007 11:58 To: user-java@iba

RE: Tutorial questions

2007-04-04 Thread James, Steven
Well you need to cast the returned from the list to an appropriate type. Therefore in your for loop do the cast like so out.println("Selected " + list.size() + " records."); for (int i=0; i < list.size(); i++) { MyType obj = (MyType)list.get(i); out.println( obj.mymethod + ""); } --

RE: Logging SQL statements

2007-03-23 Thread James, Steven
Why not just put a dynamic proxy in front of your service layer and log them there. -Original Message- From: Murtaza Goga [mailto:[EMAIL PROTECTED] Sent: Freitag, 23. März 2007 13:04 To: user-java@ibatis.apache.org Subject: RE: Logging SQL statements It would. You could extend the Fi

RE: Logging SQL statements

2007-03-23 Thread James, Steven
Does your database not provide an audit facility? From: Damien McCarthy [mailto:[EMAIL PROTECTED] Sent: Freitag, 23. März 2007 12:09 To: user-java@ibatis.apache.org Subject: RE: Logging SQL statements Hi There Kiryl, I'd suggest looking at http://sourc

RE: who's using it?

2007-02-13 Thread James, Steven
We use it at LogicaCMG for lots of client applications at a number of national and international clients across a range of sectors such as space and finance systems -Original Message- From: Levan Dvalishvili [mailto:[EMAIL PROTECTED] Sent: Tue 13/02/2007 19:29 To: user-java@ibatis.apach

RE: spring + ibatis + oracle

2007-02-02 Thread James, Steven
batches. Could y refer me to some doc for implementing the batches thnx James, Steven wrote: > > ASre you using batches to do this? > -Original Message- > From: kovy [mailto:[EMAIL PROTECTED] > Sent: Freitag, 2. Februar 2007 10:45 > To: user-java@ibatis.apache.org

RE: spring + ibatis + oracle

2007-02-02 Thread James, Steven
ASre you using batches to do this? -Original Message- From: kovy [mailto:[EMAIL PROTECTED] Sent: Freitag, 2. Februar 2007 10:45 To: user-java@ibatis.apache.org Subject: spring + ibatis + oracle hey everyone, I'm having a performance problem. I need to insert around 5 records in one

RE: Curious problem using iBatis 2.0 with MySql 5.0.19

2006-06-14 Thread James, Steven
Don't know if this will solve your issue but you do not call endTransaction in a finally block in function getAllarmiAttivi. This should allways be there.. Steve. From: gianluca bertulu [mailto:[EMAIL PROTECTED] Sent: Wed 14/06/2006 08:53 To: user-java@ibati

RE: iBatis Book

2006-05-15 Thread James, Steven
I agree totally... The forum and pdf's are better than a lot of commercial products i have used let alone os where sometimes you can expect to spend some time digging around. So well done to all. A cookbook would is a great idea... Consolidation of the tips to get over those non so trivial tas

RE: how to get ID from relation table?

2006-05-13 Thread James, Steven
Depend son the database but if it is an auto key just use the select key tag. Have a look at the documentation on page 15. http://cvs.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2.pdf From: CIJOML [mailto:[EMAIL PROTECTED] Sent: Sat 13/05/2006 13:32

RE: Is this the right way to use commitment control

2006-05-02 Thread James, Steven
No you must have this in a try catch finally exception handler. An in the finally section add endTransaction the code in here decides if a rollback is called try{ sqlMapClient.startTransaction(); sqlMapClient.insert("insertCOHeader", coDataBean); sqlMapClient.insert("insertCOCOmment

RE: Using join query

2006-04-11 Thread James, Steven
Look at the ibatis devloper guide on complex properties page 26 Steve From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 11/04/2006 14:29 To: user-java@ibatis.apache.org Subject: Using join query Hi, I am new to iBatis. I want to fetch the data fr

RE: Autocommit property

2006-03-03 Thread James, Steven
You need to set the correct property for your datasource in your configuration. See what properties it supports. If you are using SimpleDataSource then set JDBC.DefaultAutoCommit to true i.e From: Amparore Roberto [mailto:[EMAIL PROTECTED] Sent: Fri 03/03

RE: List of data as input

2006-02-16 Thread James, Steven
of list of titles before hand, I do not quite know how to write the SQL statement. Thanks, John Chien James, Steven wrote: >Hi John, > >If you download the ibatis quick start guide >http://cvs.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2-Tutorial.pdf > you will

RE: List of data as input

2006-02-16 Thread James, Steven
Hi John, If you download the ibatis quick start guide http://cvs.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2-Tutorial.pdf you will find this out i no time. Good luck you already have way there Steve.. From: John Chien [mailto:[EMAIL PROTEC

FW: db connections

2005-12-07 Thread James, Steven
I seam to be getting a null return on sqlmap getConnection but if i use getDataSource getConnection that works ok is there any reason for this? And if i use the latter do i need to close the connection myself? Steve. This e-mail and any attachment is for authorised use by the intended reci

db connections

2005-12-06 Thread James, Steven
I seam to be getting a null return on sqlmap.getConnection() but if i use getDataSource().getConnection() that works ok is there any reason for this? And if i use the latter do i need to close the connection myself? Steve. This e-mail and any attachment is for authorised use by the intended

RE: custom db.properties

2005-11-02 Thread James, Steven
Yes you can pass a java properties object into the sqlmapbuilder when you create your Sqlmap client . Take a look at the java docs.. Steve From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: Wed 02/11/2005 07:47 To: user-java@ibatis.apache.org Subject:

RE: When there are no statement, iBatis throws an exception.

2005-10-27 Thread James, Steven
Can't you evaluate the condition prior to making a call to you map e.g if(map.get("p_share")!=null) sqlmap.insert("idInsert",map); Steve. From: KwonNam Son [mailto:[EMAIL PROTECTED] Sent: Thu 27/10/2005 09:27 To: iBatisUser Subject: When there are no statem

RE: doesn't send the value to insert statement

2005-10-14 Thread James, Steven
set the KeyProperty of the selectKey (See developer guide sqlmaps-2.pdf paage 14 and set is to the java bean property you wish to be set.. This is why you do not see the value being passed in. Running the selectKey first is ok.. Steve.. From: Farsi, Reza [mail

RE: Reusing sqlmap definitions

2005-09-28 Thread James, Steven
Never done this but i think it is all to do with namespaces. So have a look at the wiki or documentation on namespace. From: fabio bongiovanni [mailto:[EMAIL PROTECTED] Sent: Wed 28/09/2005 09:51 To: user-java@ibatis.apache.org Subject: Reusing sqlmap definitions

RE: rollback

2005-09-16 Thread James, Steven
You don't need to. The end Transaction knows that commit has not been reached as the exception will prevent that codes execution and jump to the exception handler then the finally block. This end Transaction will just always rollback... On a successful transaction the rollback will have no effec

RE: Ibatis and Junit tests

2005-09-05 Thread James, Steven
case I cited below, I was simply experimenting with no iBatis transaction API calls at all. So there was no begin, commit or end. I was just curious what happened in the absense of referencing the iBatis transaction API. - Paul "James, Steven" <[EMAIL PROTECTED]> wrote on 09/05/

RE: Ibatis and Junit tests

2005-09-02 Thread James, Steven
Why not just switch on you db vendor logging facility i find this far more useful. Steve From: Paul Glezen [mailto:[EMAIL PROTECTED] Sent: Fri 02/09/2005 16:37 To: user-java@ibatis.apache.org Subject: Re: Ibatis and Junit tests This is precisely the kind of

RE: Database connection

2005-09-01 Thread James, Steven
yes on sqlmapclient.openusersession.setuserconnection(null) sqlmapclient.openusersession.setuserconnection(your conn) This is documented- have a look at the javadocs.. steve From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Thu 01/09/2005 14:47 To: user-ja

RE: Getting auto-generated keys in mySql

2005-08-18 Thread James, Steven
This has been available since MySQL 3.23.25 Steve -Original Message- From: Meindert [mailto:[EMAIL PROTECTED] Sent: Thu 8/18/2005 11:13 AM To: user-java@ibatis.apache.org; [EMAIL PROTECTED] Subject: RE: Getting auto-generated keys in mySql Hi all, I forgot to use the mysql syntax and

RE: Dynamic Database URL

2005-08-16 Thread James, Steven
This is possible just create a properties object and pass this to the sqlmap builder name the properties with keys like you have given in the sqlmapconfig. so the properties would have keys driver, url, username etc... i.e SqlMapClientBuilder.buildSqlMapClient(configReader,properties);

RE: Logging?

2005-08-10 Thread James, Steven
I use log 4j on do not have any problems with ibatis debug are you seting the log4j.PropertyConfigurator.configure wilth your properties? Steve.. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wed 10/08/2005 16:57 To: user-java@ibatis.apache.org; use

RE: Ibatis and Spring Framework

2005-08-05 Thread James, Steven
in addition to these comments i would also read chapter 7 on transactions as spring transaction demarcation strategies are very useful.. The spring reference manual is available at their website. -Original Message- From: John Hurst [mailto:[EMAIL PROTECTED] Sent: Thu 8/4/2005 9:24 PM To

RE: queryForList with skip max and groupBy feature

2005-08-04 Thread James, Steven
of KeyValue objects Regards Michal Malecki - Original Message - From: "James, Steven" <[EMAIL PROTECTED]> To: Sent: Thursday, August 04, 2005 3:24 PM Subject: RE: queryForList with skip max and groupBy feature i meant number of objects re

RE: queryForList with skip max and groupBy feature

2005-08-04 Thread James, Steven
al Message ----- From: "James, Steven" <[EMAIL PROTECTED]> To: Sent: Thursday, August 04, 2005 3:24 PM Subject: RE: queryForList with skip max and groupBy feature i meant number of objects returned... Caqn u also post the sql.. Cheers, Steve Fr

RE: queryForList with skip max and groupBy feature

2005-08-04 Thread James, Steven
i meant number of objects returned... Caqn u also post the sql.. Cheers, Steve From: Michal Malecki [mailto:[EMAIL PROTECTED] Sent: Thu 04/08/2005 14:15 To: user-java@ibatis.apache.org Subject: Re: queryForList with skip max and groupBy feature as far as i a

RE: queryForList with skip max and groupBy feature

2005-08-04 Thread James, Steven
as far as i am aware there is no such feature so send some more details ie the xml file with query? From: Michal Malecki [mailto:[EMAIL PROTECTED] Sent: Thu 04/08/2005 12:52 To: user-java@ibatis.apache.org Subject: queryForList with skip max and groupBy feature

RE: iterate over 2 collections

2005-08-03 Thread James, Steven
/2005 13:21 To: user-java@ibatis.apache.org Subject: Re: iterate over 2 collections On Wed, Aug 03, 2005 at 01:07:25PM +0100, James, Steven wrote: > Can we see the parameter class? the rule(parameter) class import java.util.ArrayList; import java.util.List; public class Rule exte

RE: iterate over 2 collections

2005-08-03 Thread James, Steven
On Wed, Aug 03, 2005 at 10:40:46AM +0100, James, Steven wrote: > > did you try it and what were the errors.. > for now I'm trying to play with this query. And finally that's it: d="dynamicGetRule" resultClass="com.greenvalley.TMS.MML.Entity.Rule"> s

RE: iterate over 2 collections

2005-08-03 Thread James, Steven
did you try it and what were the errors.. From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: Wed 03/08/2005 09:58 To: user-java@ibatis.apache.org Subject: iterate over 2 collections I have a query like this: select distinct r.rule_id,r.name,r.d

RE: Using WHERE IN along with AND

2005-07-15 Thread James, Steven
Can you not use R.ORD_ID = O.ORD_ID Steve... -Original Message-orderIdList From: Rao, Satish [mailto:[EMAIL PROTECTED] Sent: Thu 7/14/2005 4:23 PM To: user-java@ibatis.apache.org Subject: Using WHERE IN along with AND I have the following and it throws a UncategorizedSQL

RE: null value from db query caused ibatis setProperty error

2005-07-12 Thread James, Steven
You cant set a primative to null.. You can define a null default like this in your parameter map steve -Original Message- From: Stan Ou [mailto:[EMAIL PROTECTED] Sent: Tue 7/12/2005 4:24 PM To: user-java@ibatis.apache.org Subject: null value from db query caused ibatis setProperty err

RE: how to define multiple input parameters in select statement

2005-07-12 Thread James, Steven
use a search object and pass that in as parameterClass or set up a parameterMap, or use a list or hashmap... Check these out in the example jpetstore and also the have a look at the ibatis pdf docs they are well written and cover these types of questions. Steve -Original Message- From

Re: How to set the connection read-only?

2005-07-11 Thread James, Steven
-Original Message- From: James, Steven Sent: Mon 7/11/2005 1:51 PM To: user-java@ibatis.apache.org Cc: [EMAIL PROTECTED] Subject: if i understand you you wish for the reads to get the same view if another transaction is processing. eg if user a creates a connection then user b does

RE: No operations allowed after connection closed.

2005-06-23 Thread James, Steven
I have also seen this same error using a thin client. The first quesy throws a exception about closed connection then creates a new connection and carries on. I am using the same version of mysql but connector 3.1.6.. When i use the same client same queries against our hsqldb db we never get the

RE: problem in linux

2005-06-16 Thread James, Steven
you say you checked that the files are in place.. But have you checked the names.. Are they lower case or as outlined in your sqlmapconfig.. As the previous guy has said linux is case sensitive.. Try and ls the file from classes using the exact same text from you sqlmap i.e cd classes ls com/vico

RE: problem in linux

2005-06-15 Thread James, Steven
I develop and deploy on linux and solaris and have never had this issue. Are your resources on the classpath? -Original Message- From: Gunna Satria [mailto:[EMAIL PROTECTED] Sent: Wed 6/15/2005 10:57 AM To: user-java@ibatis.apache.org Subject: problem in linux Hi, i am having trouble w

RE: Update SQL Problem

2005-06-10 Thread James, Steven
Quite simple as far as i know ibatis does not help with this.. First ask youreslf if this is a big problem. How vital is a few microseconds compared to the added amount of your code you may need to write. 1 easy strategy that i have used is an isupdated field in your value object.. Then if s