Re: Closing connection when using JdbcDaoTemplate

2005-02-18 Thread Clinton Begin
Nope. The framework will close it for you. On Fri, 18 Feb 2005 17:36:31 -, Yee, Richard K, CTR,, DMDCWEST <[EMAIL PROTECTED]> wrote: > When using the JdbcDaoTemplate, should I be closing the connection that I > get from the DaoManager using the getConnection() method in a finally clause > my

Closing connection when using JdbcDaoTemplate

2005-02-18 Thread Yee, Richard K, CTR,, DMDCWEST
When using the JdbcDaoTemplate, should I be closing the connection that I get from the DaoManager using the getConnection() method in a finally clause my dao methods? I already plan to close any statements, result sets, etc. that I create. Thanks, Richard -Original Message- From: Brando

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Brandon Goodin
No problem Mike. These things are good to know. However, I'm still curious as to why it failed. If you ever figure it out. Please post it here and we could possibly add it to the wiki for future reference. Branon On Fri, 18 Feb 2005 11:48:09 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: > DB2 7 b

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Mike Zatko
DB2 7 blows. I went and tried the same code on a workstation with a DB2 8 client and it worked. Sorry for wasting your time. Brandon Goodin wrote: what is the driver and database that you are using? On Fri, 18 Feb 2005 11:26:35 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: 2.0.9 Brandon Goodin

Re: Passing parameters to sub selects

2005-02-18 Thread Phil Barnes
Thanks for the reply Brandon. That was indeed one of the "SQL-related options" I referred in my original message. There are a few reasons I didn't automatically do this: the first is that I did not write the original SQL, it was "handed off" to me, and the second is that I'm completely unfamilia

RE: SqlMap transactions

2005-02-18 Thread Akins, Greg
Doh, I just realized that I was only seeing the End Transaction error because I was rethrowing the original error out of the same try block. -Original Message- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 11:29 AM To: ibatis-user-java@incubator.apache.o

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Mike Zatko
DB2 7.2 FixPack 12 using the db2java.zip driver. If this is a case of DB2 sucking or something, I wouldn't bother with it. When I get time, I'll try running the exact same code on mysql and see what happens. Thanks. Brandon Goodin wrote: what is the driver and database that you are using? On Fr

RE: SqlMap transactions

2005-02-18 Thread Akins, Greg
Thanks. BTW, this code should fail. It's the exception throws from sqlmap.endTransaction() that is worrying me. Here is the method public int update(HoldAvp avp) throws SQLException { log.info("*** GAK *** apvId = " + avp.getId()) ; SqlMapClient sqlmap = this.getSqlMap() ;

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Brandon Goodin
what is the driver and database that you are using? On Fri, 18 Feb 2005 11:26:35 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: > 2.0.9 > > Brandon Goodin wrote: > > >what version of ibatis are you using? > > > > > >On Fri, 18 Feb 2005 11:16:23 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: > > > >

Re: SqlMap transactions

2005-02-18 Thread Brandon Goodin
Please post an example of your code. Brandon On Fri, 18 Feb 2005 11:23:35 -0500, Akins, Greg <[EMAIL PROTECTED]> wrote: > > It appears that when the first statement executed in a sqlmap transaction > fails, then the subsequent endTransaction (called in a catch) fails because > there isn't a "s

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Mike Zatko
2.0.9 Brandon Goodin wrote: what version of ibatis are you using? On Fri, 18 Feb 2005 11:16:23 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: *I tried it and it does not work. My error is as follows:* ResultSetLogProxy.java|41|DEBUG|2005-02-18 11:13:16,756|3766|{rset-100020} ResultSet PromotionFac

SqlMap transactions

2005-02-18 Thread Akins, Greg
Title: Message It appears that when the first statement executed in a sqlmap transaction fails, then the subsequent endTransaction (called in a catch) fails because there isn't a "started" transaction?   Is that correct?  If so, is it recommended that I just ignore the SQLException error th

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Brandon Goodin
what version of ibatis are you using? On Fri, 18 Feb 2005 11:16:23 -0500, Mike Zatko <[EMAIL PROTECTED]> wrote: > *I tried it and it does not work. My error is as follows:* > > ResultSetLogProxy.java|41|DEBUG|2005-02-18 > 11:13:16,756|3766|{rset-100020} ResultSet > PromotionFacadeSqlMapsImpl.jav

Re: Passing parameters to sub selects

2005-02-18 Thread Brandon Goodin
I'm curious why you don't simply write this as an actual subselect since it passes back a single value java type. Also, result selects are a convenience feature for simple to moderately complex scenarios. Don't be afraid to implement an iterator in your dao class that iterates over the getResults

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Mike Zatko
*I tried it and it does not work. My error is as follows:* ResultSetLogProxy.java|41|DEBUG|2005-02-18 11:13:16,756|3766|{rset-100020} ResultSet PromotionFacadeSqlMapsImpl.java|71|ERROR|2005-02-18 11:13:16,772|3782| --- The error occurred in configs/sqlmaps/promotions-sql.xml. --- The error occur

Passing parameters to sub selects

2005-02-18 Thread Phil Barnes
Hi all, First, I'd like to say "thanks" for all the work on iBATIS SqlMaps (and the DAO framework which I haven't tried -- yet!). I'm currently working on a set of "web reports", and iBATIS has made a terrific time saver. My question is about how to pass paramters from a "parameterClass" to a su

Re: Log4j question

2005-02-18 Thread Jeff Butler
Another thing to remember is the WebSphere itself uses commons logging. So to get JCL messages when running in WebSphere's JRE, you'll need to make some modifications to the WebSphere configuration. This could be why things work one way in a main method (not running in WebSphere's JRE), and a dif

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Brandon Goodin
I would recommend that you specify the jdbcType in your result. On Fri, 18 Feb 2005 06:55:01 -0800 (PST), Karen Koch <[EMAIL PROTECTED]> wrote: > Are you perhaps missing the parameterClass arg on the statement itself? > > --- Mike Zatko <[EMAIL PROTECTED]> wrote: > > > /*I have a table as foll

Re: [ResultMap] Can't get primitive types to work

2005-02-18 Thread Karen Koch
Are you perhaps missing the parameterClass arg on the statement itself? --- Mike Zatko <[EMAIL PROTECTED]> wrote: > /*I have a table as follows:*/ > > sqltype sqllen sqlname.datasqlname.length > -- -- >

[ResultMap] Can't get primitive types to work

2005-02-18 Thread Mike Zatko
/*I have a table as follows:*/ sqltype sqllen sqlname.datasqlname.length -- -- -- 492 BIGINT 8 PROMO_ACTION_ID 15 492 BIGINT 8 PROM