Migrating from ibatis 2 to 3

2010-03-04 Thread François Schiettecatte
caching sessions as much as possible and it could be that I am not using the stack correctly, but what I was doing worked fine in 2.x under heavy load. Cheers François -- François Schiettecatte 35 Washington Square North, #2 Salem, MA, 01970 617-909-2504 http://fschiettecatte.wordpress.com

Re: Migrating from ibatis 2 to 3

2010-03-04 Thread François Schiettecatte
. Cheers, Clinton 2010/3/4 François Schiettecatte fschietteca...@gmail.com: Hi I have been migrating a project from ibatis 2 to 3 and have run into some issues, mostly to do with connection pool management (C3P0), and I will write up my notes on my blog once I am done. Two issues

ResultHandler

2010-03-05 Thread François Schiettecatte
Hi Any reason why there are only two select() methods in org.apache.ibatis.session: void select(String statement, Object parameter, ResultHandler handler); void select(String statement, Object parameter, RowBounds rowBounds, ResultHandler handler); I would have expected to see this for

Re: SQL Maps connection mgmt in servlet

2010-03-06 Thread François Schiettecatte
Andrew Not sure about the first question, but the answer to 2 is yes it is thread safe. François On Mar 6, 2010, at 1:13 PM, Andrew Broderick wrote: Hi, I am fairly new to iBATIS. I am using SQL Maps v. 2.3.4 in a servlet. My config is outlined here: transactionManager type=JDBC

Re: SQL Maps connection mgmt in servlet

2010-03-06 Thread François Schiettecatte
Andrew I should have been more specific, technically it not considered thread safe but it seems to be, at least it has been for me for the past 18 months. F. On Mar 6, 2010, at 1:13 PM, Andrew Broderick wrote: Hi, I am fairly new to iBATIS. I am using SQL Maps v. 2.3.4 in a servlet. My

Re: SQL Maps connection mgmt in servlet

2010-03-08 Thread François Schiettecatte
on completion of a query? Thanks 2010/3/6 François Schiettecatte fschietteca...@gmail.com Andrew Not sure about the first question, but the answer to 2 is yes it is thread safe. François On Mar 6, 2010, at 1:13 PM, Andrew Broderick wrote: Hi, I am fairly new to iBATIS. I am

Re: AW: Problem while using RETURNING.. INTO cluase with iBATIS 3.0

2010-03-10 Thread François Schiettecatte
Patil I am ignorant about Oracle, I use MySQL (another fine Oracle product :), my first thought would be to use a stored procedure. François On Mar 10, 2010, at 4:27 AM, Patil Yogesh wrote: I have thought of this approach, but it requires two round trips to database First for

iBatis 2.x vs. iBatis 3.x performance

2010-03-12 Thread François Schiettecatte
one way to deal with this would be to check-out a connection from the pool at the start of a transaction and check it back in at the end of the transaction. Cheers François -- François Schiettecatte 35 Washington Square North, #2 Salem, MA, 01970 617-909-2504 http://fschiettecatte.wordpress.com

Re: Problem with Character Encoding

2010-03-12 Thread François Schiettecatte
I don't have any experience with Oracle specifically, but when I see this in MySQL or indeed on the web in general, there is usually a character encoding disconnect. I suspect that the layer connecting iBatis to Oracle most likely is not being told that it should expect utf8. I need to tell

Re: integrating lucene with ibatis - advice wanted

2010-03-17 Thread François Schiettecatte
Andrius Like Simo I like option 1, it is probably the simplest option. 3 could really ugly and pushes functionality down into the RBDMS which is not great for scaling, also adds overhead to any insert/update/delete operations. One think you might consider (which I do for a project I am working

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread François Schiettecatte
). For me this will require some amount of rework if I want to minimize the performance penalty I wrote about. Cheers François On Mar 12, 2010, at 3:54 PM, François Schiettecatte wrote: I did run into some issues with connection pooling. Creating a SqlSession() checks out

Re: iBatis 2.x vs. iBatis 3.x performance

2010-03-18 Thread François Schiettecatte
. Clinton 2010/3/18 François Schiettecatte fschietteca...@gmail.com Clinton Thanks for the information, and indeed my code creating the SqlSessionFactoryBuilder() and the SqlSessionFactory() is wrong, which I will fix. However there is an interesting issue around SqlSessionFactory

Re: Preferred tool for database modeling and generating SQL / DDL

2010-04-01 Thread François Schiettecatte
Josh On the Mac I used an application called SQLEditor which I have found to be pretty good: http://www.malcolmhardie.com/sqleditor/ Cheers François On Apr 1, 2010, at 2:50 PM, Josh Stone wrote: This question isn't directly related to iBATIS, but is relevant for iBATIS and

Re: SqlSession.close() without committing

2010-04-05 Thread François Schiettecatte
If you start a transaction or don't have auto-commit on, then the transaction will be rolled back. At least that is what I am seeing which makes sense to me. F. On Apr 5, 2010, at 12:38 PM, cowwoc wrote: Hi, What happens if I close() a SqlSession without committing? Does iBatis

Re: Dynamic table replacement possible in iBatis3 ?

2010-04-07 Thread François Schiettecatte
The format did change, here is the new format: select id=selectCountBySourceKey parameterType=String resultType=Integer /* contents.Content.selectCountBySourceKey */ SELECT COUNT(*) FROMcontents WHERE source_key =

Re: Dynamic table replacement possible in iBatis3 ?

2010-04-08 Thread François Schiettecatte
changed. #{foo} == jdbc set parameter ${foo} == string substitution before the prepared statement Nathan 2010/4/7 François Schiettecatte fschietteca...@gmail.com: The format did change, here is the new format: select id=selectCountBySourceKey parameterType=String resultType

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread François Schiettecatte
I think Mukhi is trying to pass a string and an array of numbers, the string being the entryRefno and the list of nunbers to be added to the IN() clause of the SELECT statement in the example given. The Map is the way to go, you just need to add the string as shows in the code sample below.

Re: how to pass two different types of values to query in IBATIS

2010-04-12 Thread François Schiettecatte
There you go, much cleaner, thanks for correcting me, I had not used that particular functionality before. François On Apr 12, 2010, at 11:00 AM, Martin Ellis wrote: 2010/4/12 François Schiettecatte fschietteca...@gmail.com: I think Mukhi is trying to pass a string and an array of numbers

interesting exception in 3.0

2010-05-01 Thread François Schiettecatte
Hi I grabbed the latest, greatest release of 3.0 from : http://people.apache.org/builds/ibatis/ibatis-3-core/ibatis-core-3.0-bundle.zip and am now getting an exception from time to time, but I was not getting it with the previous 3.0 beta release (240). I was wondering if there had

Re: interesting exception in 3.0

2010-05-01 Thread François Schiettecatte
I am using JDBC, with C3P0 as my data source. Cheers François On May 1, 2010, at 4:14 PM, Clinton Begin wrote: The only code changes related to that were with managed transactions. Which transacion manager are you using? (JDBC or MANAGED)? Cheers, Clinton 2010/5/1 François

IBatis version in the code?

2010-05-04 Thread François Schiettecatte
Hi I am trying to track down an issue which appeared when I updated to current releases of a batch of software and was wondering if there was a version number that was hard coded in iBatis which I could retrieve to make know which release I was using, knowing whether I am running

Re: interesting exception in 3.0

2010-05-05 Thread François Schiettecatte
between those versions. You can have a look at the change log if you like: https://issues.apache.org/jira/secure/BrowseProject.jspa?id=10601subset=-1 Or the subversion history as well. Clinton 2010/5/1 François Schiettecatte fschietteca...@gmail.com: I am using JDBC, with C3P0 as my data

Re: Performance improvements in version 3?

2010-05-05 Thread François Schiettecatte
Rob I have not made any formal measurements, but selects are much faster, and inserts/updates/deletes are a little slower, but I was not using 2.3.x 'correctly', I was caching sqlmaps when I should not have been. François On May 5, 2010, at 12:07 PM, Robert Dare wrote: Has anyone quantified

Re: interesting exception in 3.0

2010-05-07 Thread François Schiettecatte
find one refactoring that is in this area. I'll attempt to recreate and verify this too. Clinton 2010/5/5 François Schiettecatte fschietteca...@gmail.com: Clinton A little more information on this, I reverted back to 240 and the problem I reported did not occurs after a 24 hour run. I

Re: interesting exception in 3.0

2010-05-08 Thread François Schiettecatte
and attach it to a ticket. Please let me know, as I won't cut a release with a bug this serious, if it can be verified. Cheers, Clinton 2010/5/7 François Schiettecatte fschietteca...@gmail.com Clinton Thanks for pinging me. I have not had a chance to look at it, and it is still an issue

Re: interesting exception in 3.0

2010-05-10 Thread François Schiettecatte
2010/5/7 François Schiettecatte fschietteca...@gmail.com Clinton Thanks for pinging me. I have not had a chance to look at it, and it is still an issue, before rushing out and creating a jira ticket for it I wanted to look at the code diffs between the two releases, I will try to get

Re: How to correct the time out problem?

2010-05-12 Thread François Schiettecatte
陈抒 Not sure which RDBMS you are using. Ideally you want to set the idle connection timeout in your pool to a value smaller than the idle connection timeout on the server end, the errors you were seeing suggests that the server has dropped the connection while the pool thinks it is still ok.

Re: How to correct the time out problem?

2010-05-12 Thread François Schiettecatte
when I enable poolPingQuery. I will try your idea soon.Thanks again! 陈抒 Best regards http://blog.csdn.net/sheismylife 2010/5/12 François Schiettecatte fschietteca...@gmail.com 陈抒 Not sure which RDBMS you are using. Ideally you want to set the idle connection timeout in your

Re: interesting exception in 3.0

2010-05-14 Thread François Schiettecatte
this serious, if it can be verified. Cheers, Clinton 2010/5/7 François Schiettecatte fschietteca...@gmail.com Clinton Thanks for pinging me. I have not had a chance to look at it, and it is still an issue, before rushing out and creating a jira ticket for it I wanted to look at the code

Question about 'jdbcType='

2010-05-20 Thread François Schiettecatte
Hi I remember seeing something about jdbcType= not being needed anymore in xml maps for columns which can contain NULL values, is that the case or am I mis-remmembering? Cheers François -- François Schiettecatte http://fschiettecatte.wordpress.com