Ibatis + apache BasicDataSource + Spring DAO + autocommit

2009-10-22 Thread javaguy44
Hi, I saw this excellent post by Clinton http://www.nabble.com/Proper-transaction-code-pattern-(was:-Autocommit-not-properly-handled-in-Ibatis)-td8505967.html#a8505967 and after a few hours of playing around + googling, I was wondering if someone can clear up the case of ibatis + BasicDataSource

RE: Update Table with selected columns

2009-10-22 Thread Vinaya Tirikkovalluru
I have update the null columns too with updateByPrimaryKeySelective. Thanks Vinaya -Original Message- From: Jeff Butler [mailto:jeffgbut...@gmail.com] Sent: Thursday, October 22, 2009 3:35 PM To: user-java@ibatis.apache.org Subject: Re: Update Table with selected columns updateByPrimar

Re: Update Table with selected columns

2009-10-22 Thread Jeff Butler
updateByPrimaryKeySelective and updateByExampleSelective allow you to select the columns - only non-null columns in the parameter objects will be updated. Jeff Butler On Thu, Oct 22, 2009 at 2:31 PM, Vinaya Tirikkovalluru wrote: > They do, they don't take the specified columns though. > I need

RE: Update Table with selected columns

2009-10-22 Thread Vinaya Tirikkovalluru
They do, they don't take the specified columns though. I need to update all the columns in the table. I don't want to do that. I would like to specify which columns I want to update, not all Thanks Vinaya -Original Message- From: Jeff Butler [mailto:jeffgbut...@gmail.com] Sent: Thursd

Re: Update Table with selected columns

2009-10-22 Thread Jeff Butler
Ibator generates updateByPrimaryKey and updateByExample methods that serve this purpose. Jeff Butler On Thu, Oct 22, 2009 at 2:26 PM, Vinaya Tirikkovalluru wrote: > Hi, > > > > I am using Ibator to generate the Ibatis objects. > > I have a requirement where I should be able to create the SQL as

Update Table with selected columns

2009-10-22 Thread Vinaya Tirikkovalluru
Hi, I am using Ibator to generate the Ibatis objects. I have a requirement where I should be able to create the SQL as Update table set a=1, b=2, c=3, Where clause/primary key Any one did get this to work with Ibator? I would like to modify the Ibator code if necessary Thanks

Re: caching question

2009-10-22 Thread Nathan Maves
Lets make sure everyone is on the same page here. First the terms. IBATIS Cache == a collection of Resultsets Resultset == collection of rows from the executed query. Like is has been said a few times ibatis caches resultsets. So here are some examples. Lets start with a query for People that

Re: static SqlMapClient and transaction isolation problem

2009-10-22 Thread Nathan Maves
Ibatis 2.x does use ThreadLocal to handle the transactions. With ibatis 3 you need to handle this on your own right now but we have been playing with a few ways to use ThreadLocal with it as well. I actually have a pretty clean working webapp using it. On Thu, Oct 22, 2009 at 9:09 AM, Rick.Wellm

Re: static SqlMapClient and transaction isolation problem

2009-10-22 Thread Larry Meadors
On Thu, Oct 22, 2009 at 9:03 AM, User 080701 wrote: > > If I create a static SqlMapClient to service many threads, does ibatis > guarantee transaction isolation ? yes. > e.g. If one thread start the transaction and not commit, >      if another thread start the transaction using the same sqlMapC

RE: static SqlMapClient and transaction isolation problem

2009-10-22 Thread Rick . Wellman
Unfortunately I cannot dive into the many details of iBatis and transactions but here is how I would answer your question: 1) You almost assuredly want to create a single static SqlMapClient to service many threads. 2) I am pretty sure that iBatis uses ThreadLocal to isolate transactions from dif

static SqlMapClient and transaction isolation problem

2009-10-22 Thread User 080701
If I create a static SqlMapClient to service many threads, does ibatis guarantee transaction isolation ? e.g. If one thread start the transaction and not commit, if another thread start the transaction using the same sqlMapClient, does it throw transaction already start exception ? -- Vie

RE: caching question

2009-10-22 Thread meindert
No, it would store a maximum of 100 result sets (with the complete result of the query) (A result set is a list of objects equal to the list of rows returned from the DB) N.B. Your server might run into memory issues if each of those result sets contains about 200 objects The cache is only handy if

RE: caching question

2009-10-22 Thread Vinaya Tirikkovalluru
I think it creates a connection, but get the results from oracle cache not the application cache. I assume this because, I see the following statements in the log file whenever the cache is accessed by the app 2009-10-22 09:31:30,594 [,] INFO [STDOUT] {conn-100075} Connection 2009-10-22 09:31:

RE: caching question

2009-10-22 Thread Odelya YomTov
So if lets say the result could return 200 records, and the cacheModel size is set for 100 - would it return only 100 results? Or the next time it would actually display only the 100 records and not 200? -Original Message- From: meindert [mailto:meind...@eduflex.com] Sent: Thursday, Octob

RE: caching question

2009-10-22 Thread meindert
>Do you mean that actually it invokes the database when I execute the query? No, only the first time, the next time you ask the same query with the same parameters it will get the resultset from the cache The cache size is the number of different result sets are stored in the cache. So if you invo

RE: caching question

2009-10-22 Thread Odelya YomTov
Do you mean that actually it invokes the database when I execute the query? If so, what is the point of caching? -Original Message- From: meindert [mailto:meind...@eduflex.com] Sent: Thursday, October 22, 2009 3:01 PM To: user-java@ibatis.apache.org Subject: RE: caching question It's the

RE: caching question

2009-10-22 Thread meindert
It's the result you cache not the query. How many different query result would you like to cache -Original Message- From: Odelya YomTov [mailto:ode...@jpost.com] Sent: 22 October 2009 02:29 PM To: user-java@ibatis.apache.org Subject: caching question Hi! I have a global question about

caching question

2009-10-22 Thread Odelya YomTov
Hi! I have a global question about caching. I have in my database around 80 recrods In cacheModel - what do you recommend as the size of the cacheModel? I am using the query almost in every screen. Thanks - To unsubscr

Re: Cannot execute stored procedure in batch mode after upgrade to 2.3.4.726

2009-10-22 Thread blmmz
Hi, anybody got any ideas? I encountered the same problem. ivan.bogouchev wrote: > > Hello, > > Recently we upgraded to ibatis-sqlmap-2.3.4.726 and since have problems > executing stored procedures in batch mode. > > The error is : ORA-00900: invalid SQL statement . > > Is it a known issue