Re: Transaction Performance Issue

2008-04-16 Thread Vannel
im using EJB as my external transaction manager -- View this message in context: http://www.nabble.com/Transaction-Performance-Issue-tp16583884p16739622.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Re: Transaction Performance Issue

2008-04-16 Thread Brandon Goodin
If you are using an external transaction manager it is completely up to you to manage the transactions. iBATIS utilizes the connection that is handed to it by your external transaction manager. What is the external transaction manager that is being used? Brandon On Thu, Apr 17, 2008 at 12:41 AM,

Re: Transaction Performance Issue

2008-04-16 Thread Vannel
can anyone tell me what the scope of a transaction is? - try { //execute sql int ret = insert(...); if (ret>0) { //execute some other sql update(...); } } catch { //catch errors } - in the above scenario, are there 2 transactions (1 for insert, 1 for update)..? or

Re: Problem in resultMap:Cause: java.sql.SQLException: Invalid state, the ResultSet object is closed

2008-04-16 Thread nepalon
I have tried the code and it work well: Connection cn1 = null; PreparedStatement pst1 = null; PreparedStatement pst2 = null; ResultSet rs1 = null; ResultSet rs2 = null; DataSource ds = (BasicDataSource)ctx.getBean("

RE: Pass multiple parameters using Map

2008-04-16 Thread Jason Kratz
No offense here but did you read the documentation PDF?  This exact topic is discussed on page 30 of the developer's guide.  There are multiple ways of doing what you want but your specific case is on page 30. Jason   Hi, Here's a newbie question for iBATIS: I need to pass three parameters to

Re: Pass multiple parameters using Map

2008-04-16 Thread Brandon Goodin
Map param = new HashMap();param.put("someProp",someValue); param.put("otherProp",someOtherValue); sqlMapClient.queryForList("Foo.selectForSomething",param); select id,someColumn,someOtherColumn,someName from foo where someColumn=#someProp# and someOtherColumn=#otherProp# Brandon Goodin On Wed,

Re: stored proc call with list items in parameter

2008-04-16 Thread Brandon Goodin
There are several reason we don't use OGNL, none of which have anything to do with the quality of OGNL as a specification. I would say the primary reason we don't use OGNL is because it just wasn't that well known when we started iBATIS. As time marched on it was easier to continue to support the m

Pass multiple parameters using Map

2008-04-16 Thread Li Ma
Hi, Here's a newbie question for iBATIS: I need to pass three parameters to a query. I don't want to create a new class just for this one query, so I tried to use Map as parameterClass even parameterMap, nothing worked. Anyone can provide a sample of doing such kind of task? I did Google and sear

ibatis: problem with an update

2008-04-16 Thread macoisi
Hi All. I have a problem whit an update statement using iBatis 2.3 and spring 2.0.7 When I try to execute the follow update: UPDATE approfondimento SET nome = #nome:VARCHAR#, descrizione = #descrizione:VARCHAR#, is_active = #activ

Re: Pseudo-nesting of transactions

2008-04-16 Thread Koka Kiknadze
Sorry, 'it'll save your headache' should read 'it'll save you from your headache' ;) On Thu, Apr 17, 2008 at 1:06 AM, Koka Kiknadze <[EMAIL PROTECTED]> wrote: > Is there a better way of dealing with this? I go for Spring framework's declarative transactions. Spring has support for iBatis and defi

Re: Pseudo-nesting of transactions

2008-04-16 Thread Koka Kiknadze
> Is there a better way of dealing with this? I go for Spring framework's declarative transactions. Spring has support for iBatis and definitely it'll save your headache.

Re: stored proc call with list items in parameter

2008-04-16 Thread Darren Davison
On Tue, Apr 15, 2008 at 08:48:36AM -0500, Brandon Goodin wrote: >We've looked into this in the past and for whatever reason haven't added >this feature. I think there were some difficulties. There is currently not >a way to refer to a particular index of a list in a parameter using >

Pseudo-nesting of transactions

2008-04-16 Thread Alistair Young
I have a question about nesting iBATIS transactions. Or, at least, being able to write methods which will work in an iBATIS transactional context whether or not one has been imposed externally. Consider the following bit of sample code: sqlMap.startTransaction(); sqlMap.update("XXX", xxx);

Re: Problem in resultMap:Cause: java.sql.SQLException: Invalid state, the ResultSet object is closed

2008-04-16 Thread Jeff Butler
Your JDBC code does not match what iBATIS is doing. Try this: try { cn = ds.getConnection(); pst1 = cn.prepareStatement("select * from t_softwares"); rs1 = pst1.executeQuery(); while(rs1.next()) { System.out.println("software:" + rs1.getString(1)); pst2 = cn.prepareStatement("sele