Multiple resultMap per connection?

2008-03-18 Thread J R
I am new to iBatis and having trouble with multiple resultMaps. I have one resultMap which has properties which are populated by making another select call. I am extending org.springframework.orm.ibatis.support.SqlMapClientDaoSupport and in DAO class I have call as below- getSqlMapClientTemplate(

Re: Abator Example Class Criteria Question

2008-03-18 Thread Ryan Shelley
Ah, that makes sense. I've got about 20 OR'ed criteria elements and one AND'ed element, but it should work out ok. Thanks for the insight! -Ryan On Tue, Mar 18, 2008 at 5:23 PM, Jeff Butler <[EMAIL PROTECTED]> wrote: > This is an exercise in boolean algebra :) > > You can do this (equivalent)

Re: about bean with no GET method performance

2008-03-18 Thread Leon Liu
Ok, I will test 5 properties bean to validate if the  performance issue will happen. I think ibatis is pretty on performance,  We use it on our site,  every day, our page hit more than 110 m times,  IBatis  do all these  very pretty:) Some tables in our site have than 80 column, and were queri

Re: Abator Example Class Criteria Question

2008-03-18 Thread Jeff Butler
This is an exercise in boolean algebra :) You can do this (equivalent) in Abator's example classes: where (field1 = 'foobar' and field2 = 'foo') or (field1 = 'foobar' and field3 = 'bar') Jeff Butler On Tue, Mar 18, 2008 at 7:11 PM, Ryan Shelley <[EMAIL PROTECTED]> wrote: > I need to generate

Abator Example Class Criteria Question

2008-03-18 Thread Ryan Shelley
I need to generate a WHERE Clause like: ...WHERE field1 = 'foobar' AND (field2 = 'foo' OR field3 = 'bar') I'm having some trouble working this through with the Example classes generated by Abator, so I thought I'd ask if it's possible. Thanks! -Ryan

Re: Retrieving Oracle column with data type TIMESTAMP WITH LOCAL TIME ZONE

2008-03-18 Thread Andrey Rogov
Jess, there is an offer to attack a problem under a correct angle :), 1. I have created two fields - TIMESTAMP(6) WITH TIME ZONE - TIMESTAMP(6) WITH LOCAL TIME ZONE 2. Has changed xml file. Instead of sql has written stored procedure { call pr

Re: select * causing " OutOfMemoryError: Java heap space"

2008-03-18 Thread Christopher Lamey
Looks like you can use the "userCursorFetch=true" param on the JDBC URL to get it to adhere to the fetch size: http://bugs.mysql.com/bug.php?id=18148 Cheers, topher On 3/18/08 12:24 PM, "nch" <[EMAIL PROTECTED]> wrote: > > So-lu-tion. > But, yeah, WOW!! > > Clinton, you've been really helpful

Re: JNDI dataSource and SqlMap-Config.xml settings

2008-03-18 Thread Michael Schall
Sorry... Sent the message while formating my xml... We have recently moved to using JNDI through WebSphere as our JDBC transaction manager while connecting to a DB2 9.1 database. Below is my transactionManager and settings elements from my sqlmap-config.xml file. I am wondering if the following

JNDI dataSource and SqlMap-Config.xml settings

2008-03-18 Thread Michael Schall
We have recently moved to using JNDI as our JDBC transaction manager.

Re: about bean with no GET method performance

2008-03-18 Thread Clinton Begin
>> Above calling take about 1700ms -1800ms. JDBC query take about 200ms. Does your JDBC example include creating all of the classes and setting all of the properties? Calling resultSet.getX() and setting properties 840,000 times in 1.8 seconds actually sounds pretty good. I hate to discou

Re: select * causing " OutOfMemoryError: Java heap space"

2008-03-18 Thread Clinton Begin
SOLUTION? A quick Google search yielded this thread from the MySQL boards which details the exact problem your having. http://lists.mysql.com/java/9137 It's actually quite silly and definitely a MySQL driver issue. I imagine that Hibernate's MySQL dialect configuration is aware of this problem,

Re: select * causing " OutOfMemoryError: Java heap space"

2008-03-18 Thread Leon Liu
pls set enhancementEnabled=false  and test again. Some cglib + some jdk version cause a big memory problem.   I met it in my project that take me a month to fix it. Leon Liu Nathan Maves 写道: did you try defaultAutoCommit=false for the connection pool? On Tue, Mar 18, 2008 at 9:13 AM, nc

Re: Retrieving Oracle column with data type TIMESTAMP WITH LOCAL TIME ZONE

2008-03-18 Thread Leon Liu
in some database , pls describe detail a bean's resultmap in xml file else will cause some problem. In oracle, date column MUST be TIMESTAMP, the problem cause our site big problem, all user lose time of HH:mm:ss part. resultmap define in detail is a good way improve performance. for Jesse

Re: Problem Timestamp insert and retriev

2008-03-18 Thread Ryan Shelley
Shouldn't it be: SimpleDateFormat sf = new SimpleDateFormat("-MM-dd HH:mm:ss"); java.util.Date date = sf.parse("2008-01-01 00:00:00"); uBean.setDateOfBird(date); sqlMap.insert("insertUser", *uBean*); Where you're passing in the "uBean" object, and not the "user" object (whatever that may be).

about bean with no GET method performance

2008-03-18 Thread Leon Liu
Hi ,    These days I test ibatis  performance with large result set and large bean. I do following step,    1.  A bean have  84 properties  and a tabble have 84 columns.    2. and I set enhencmentEnable=true,     3. I query 1 result from oracle database. Oracle database with JDBC driver se

RE: Problem Timestamp insert and retriev

2008-03-18 Thread dimitriBarzagli
No problem Niels, sorry but my English is not Ecellent. I have a mistake in write message. Bye Niels Beekman-2 wrote: > > Sorry for the noise, but you might want to change 'dateOfBird' to > 'dateOfBirth', I doubt that most users have two wings ;) > > No offense, just a friendly pointer... >

RE: Retrieving Oracle column with data type TIMESTAMP WITH LOCAL TIME ZONE

2008-03-18 Thread Jesse Reimann
Thanks for the suggestion, but that didn't help since it is the actual oracle jdbc driver that is throwing the exception and just setting the session within oracle doesn't stop prevent this. I think I'm just going to abandon this approach and attack the problem from a different angle and handle

RE: Problem Timestamp insert and retriev

2008-03-18 Thread Niels Beekman
Sorry for the noise, but you might want to change 'dateOfBird' to 'dateOfBirth', I doubt that most users have two wings ;) No offense, just a friendly pointer... Niels -Original Message- From: dimitriBarzagli [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 3:39 PM To: user-java@

Re: select * causing " OutOfMemoryError: Java heap space"

2008-03-18 Thread nch
Yes, I am using the same driver. - Original Message From: Nathan Maves <[EMAIL PROTECTED]> To: user-java@ibatis.apache.org Sent: Tuesday, March 18, 2008 3:56:40 PM Subject: Re: select * causing " OutOfMemoryError: Java heap space" Are we absolutely positive that we are using the same d

ibatis parameterMap extends question

2008-03-18 Thread chet37
Can we have multiple external parameterMaps and extend from other parameterMaps? or some way to do something similiar? I can see we can do that with resultMaps. The dtd does not support the same for ParameterMap. Is there going to be a future implementation of the same for ParameterMap ? I did a s

Re: Problem Timestamp insert and retriev

2008-03-18 Thread dimitriBarzagli
Hi Ryan, thank you for response. I modified the column definition in database and type definition in Objectbean. Actually I have another problem: I write this part of code to test the modifiy: ... SimpleDateFormat sf = new SimpleDateFormat("-MM-dd HH:mm:ss"); java.util.Date date = sf.parse("

Re: abator auto generated keys, multiple databases and domain relationships

2008-03-18 Thread Jeff Butler
1. iBATIS supports generated keys through the use of a query (not the JDBC 3.0 support for generated keys). Abator supports this too through the configuration element. I doubt that iBATIS 2.x will support JDBC 3.0 features, so this is what you must use for now. As far as multiple databases, I k

Re: IBATIS-496: indefinite wait in Throttle.increment()

2008-03-18 Thread Clinton Begin
There will definitely be more 2.x releases. To date it's just been a matter of finding the time. I will try to get it out this week. 3.0 may only have a partial upgrade path, as it is the largest change in 6 years. So 2.x will continue to be supported. Cheers, Clinton On Tue, Mar 18, 2008 at

RE: IBATIS-496: indefinite wait in Throttle.increment()

2008-03-18 Thread Karsten Silz
Hello! Thank you - I'll hunt for connections not closing correctly. Any new 2.x releases planned? Or do we wait for 3.0 to be the official release where this is fixed? Karsten Silz _ From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 14:17 To: user-java@ib

Re: IBATIS-496: indefinite wait in Throttle.increment()

2008-03-18 Thread Clinton Begin
You're likely not closing off your sessions consistently. Try running iBATIS from the SVN trunk. I've removed Throttle from the core, thus you should now get a better error (or at least I hope you do!). I'm guessing the new error will be from your datasource complaining that you're out of connec

IBATIS-496: indefinite wait in Throttle.increment()

2008-03-18 Thread Karsten Silz
Hi! We have a web application running on Tomcat, using the Commons JDBC connection pool and iBatis 2.2. Our app uses a single "SqlMapClient" instance for all our database access. After 7-10 days, the application doesn't have any database connections anymore. At first we thought we're running out

Re: abator auto generated keys, multiple databases and domain relationships

2008-03-18 Thread Zach Visagie
On Tue, 2008-03-18 at 11:40 +0200, Zach Visagie wrote: > A couple of questions: > 1. Abator auto generated keys. > Is it possible for abator to use the auto_generated keys feature, > instead of using a query? We have a custom connection pool able to > return them even for postgres. sorry only now

abator auto generated keys, multiple databases and domain relationships

2008-03-18 Thread Zach Visagie
Hi all I'm relatively new to ibatis, so sorry for the long mail. We've got basic web admin applications (using spring) for a transactional type product, which needs to support multiple database vendors. Some of the tables are quite denormalized so that's why I like ibatis over ORM stuff and my sup