In our case, we started by using the dbcp library packaged with tomcat 5.5, but
we ended up having strange long delays
with long requests, so we switched to c3p0 and since then everything is fine.
Gilles
De : Nathan Maves
À : user-java@ibatis.apache.org
Env
Yes, they're both fine for production. iBATIS SimpleDataSource has been
around since iBATIS 1.0 and has changed very little (but it does get a major
facelift in iBATIS 3.0). The difference between the iBATIS SimpleDataSource
and most others is that it's a synchronous datasource. That is, it does
PS: If you're using an application server, my recommendation is to use the
container managed DataSource... always always always...
Cheers,
Clinton
On Tue, Jan 20, 2009 at 6:37 AM, Clinton Begin wrote:
> Yes, they're both fine for production. iBATIS SimpleDataSource has been
> around since iBAT
Hi all,
I've been studying a few large enterprise applications and have noticed an
interesting trend... many of these apps have HUNDREDS of connections (like
600) available or even open in their connection pools...
Survey Questions:
1. How many connections do you have available in your pool?
Thanks, Clinton. I think I have it all straight in my head now!
Sounds like we need to proceed with caution.
Cheers,
Alistair.
From: Clinton Begin [mailto:clinton.be...@gmail.com]
Sent: 20 January 2009 05:25
To: user-java@ibatis.apache.org
Subject: Re: i
On Tue, Jan 20, 2009 at 8:38 AM, Clinton Begin wrote:
> PS: If you're using an application server, my recommendation is to use the
> container managed DataSource... always always always...
I'm just curious why? Is it because of possible monitoring tools (like
maybe a server's JMX hooks?.) For e
Hi
I have an application that runs every day of the week 8 - 10 times for a
different piece of information each time. On 1 of those jobs for the last
few days I've had a problem. This is a batch application and it just hangs,
doesn't throw any exceptions or anything. It just stops dead it's in tr
Hello.
My application is using iBatis' method "querForList". However, after I
execute this method my memory useage sky-rockets upwards. I have profiled my
application and it happends when I execute the following method:
public static List selectUnsyncedCityByDate(SyncDates syncDates,
int sk
This *really* depends on the JDBC driver - if there is a way to limit
the list via SQL, do that instead of skip and max.
What DB are you using?
Larry
Sorry for forgetting to mention that.
I'm using MySQL with MyConnectorJ5.1.7
I've tried a test with the Rowhandler and unfortunatly memory also jumps up
tremendously after the database connection has been established (5mb to
50mb).
Larry Meadors wrote:
>
> This *really* depends on the JDBC dr
For what its worth... my profiler says the 3 biggest memory hogs are:
byte[] (65%)
byte[][] (20%)
com.mysql.jdbc.ByteArrayRow (10%)
I've attached a screenshot of the profiling results.
Perhaps this rings a bell?
Thanks!
http://www.nabble.com/file/p21568927/profiling_results.png
--
View this
Look into using the LIMIT keyword in your select.
Something like this:
select *
from city
where syncDate < ? and syncDate > ?
limit $skip$, $max$
You'll need to add those values to the parameter object.
Larry
On Tue, Jan 20, 2009 at 11:22 AM, Jeff P wrote:
> I'm using MySQL with MyConnector
Ha, yeah, it's the driver for sure. You'll get the same results if you
prepare and execute the statement yourself instead of using ibatis.
I remember when looked at the source for the pgsql driver some time
ago - it does a similar thing - it fetched the results of the query
into a big freaking byt
Ours is an application that requires guaranteed response times under 50 ms,
so:
1) We dropped using any kind of pool, so that
2) number of constantly open connections equals to the number of processors
(16)
3) I know you were asking about pool, but still I dared to respond with this
no-pool varia
It sounds like you're still using a "pool", but your max, min, idle, and
active connections are all equal (i.e. 16). Otherwise, how do you allocate
connections to the incoming requests?
Cheers,
Clinton
On Tue, Jan 20, 2009 at 12:33 PM, Nicholoz Koka Kiknadze wrote:
> Ours is an application tha
Hi Clinton,
I apologize ahead, if I am missing or not getting
something right. As far as my understanding goes, arent number of
connections in a pool in relation to the number of parallel users that
access the application than the number of CPU cores in a database?
Regards
S
On
We have a pool of 16 threads (one per cpu) with a single connection
assigned per thread, so its rather a thread pool...
On Tue, Jan 20, 2009 at 2:39 PM, Clinton Begin wrote:
> It sounds like you're still using a "pool", but your max, min, idle, and
> active connections are all equal (i.e. 16). O
This is a very basic problem, and I have tried many combination but it is not
working at all.
I have two table , let assume, there is 1-1 relationship for simplification of
problem at hand
Teacher(id, name)
Student(id,name,teacher_id)
The two beans are
public class Teacher {
private Int
Hi Sundar,
I am not an hardware expert, but I suspect that even with modern dma access
etc if you ask your CPU to process N database transactions (initiated by
different users) in parallel it may take longer compared to when you ask it
to do them consequently. So quite possible that pools with con
Thanks Nicholoz!
I have never ever questioned people for
having so many connections. But that was the reason what I have always got,
i.e, Connections being propotionate to number of parallel users. I just
brought the question about because, I wasnt surprised at all
Can any body please help me, I am now getting very frustrated. Whole day
consumed and no progress to show :-(
I strictly followed the steps at
http://ibatisnet.sourceforge.net/DevGuide/ar01s03.html#d0e1036 but no luck.
I converted my code to 1-M
public class Teacher {
private Integer id;
I am no expert in this either but a default setup for oracle allows for 200
connections. At least this was the case a few version back. In my mind I
think you can an maybe should have more connections than processors.
Depending on the length of time the connection is open and idle. Again I
coul
That's for the .net version.
On Tue, Jan 20, 2009 at 3:42 PM, Petr V. wrote:
> I strictly followed the steps at
> http://ibatisnet.sourceforge.net/DevGuide/ar01s03.html#d0e1036 but no luck.
>
Thank you alot, Larry!!!
It really scared the hell out of me when I checked the profiler and saw that
1 query used so much memory.
I can confirm that using your technique reduced ram usage to 5mb (which is
practically nothing!)
Thanks again!
Larry Meadors wrote:
>
> Ha, yeah, it's the driver
Hi There,
How can I use iBatis without starting an transaction? I try to do:
PRAGMA synchronous=OFF
for SQLite database, but iBatis report an SQLExeption that this cannot
be done within an transaction.
Then I used:
Connection conn = SqlMapClient.getDataSource.connection;
Statement st = conn.c
So all this being said what is the general rule of thumb for setting
up pool sizes?
On Tue, Jan 20, 2009 at 5:43 PM, Nathan Maves wrote:
> I am no expert in this either but a default setup for oracle allows for 200
> connections. At least this was the case a few version back. In my mind I
> thi
Thanks Larry for helping me out. What a miserable mistake at my end :-( Just
started iBatis and had no idea that xml configuration could be changed from dot
net to java.
Any how, here is a working example for archives so if some one new search then
he could find a working example.
I want to have two way relationship like Teacher contains reference of Student
and Student contains reference of Teacher. Is it even possible in iBatis ?
class Teacher {
Student sid;
}
class Student {
Teacher teacher;
}
I wrote the following SQL config file an
Absolutely. In addition to general resource contention (CPU, Disk I/O
etc.), you also have to consider lock contention against the database tables
themselves. Relational databases do not scale well in this regard. Throw
as much CPU power and hardware against your database as you like, as soon as
use the EXTERNAL transaction manager and pass in your own connection.
cheers,
Clinton
On Tue, Jan 20, 2009 at 4:57 PM, Xiangrong Fang wrote:
> Hi There,
>
> How can I use iBatis without starting an transaction? I try to do:
>
> PRAGMA synchronous=OFF
>
> for SQLite database, but iBatis report
Thanks So much Clinton. That was terrific!
-Sundar
On Tue, Jan 20, 2009 at 9:12 PM, Clinton Begin wrote:
> Absolutely. In addition to general resource contention (CPU, Disk I/O
> etc.), you also have to consider lock contention against the database tables
> themselves. Relational databases do
Not sure about 600, but i have heard of cases where the connection pool
size was so large, it brought down the DB server when the pools were
intialized.
Clinton Begin
By no means am I an expert in this field, but last year I was working on a
large app. The DB guy had pretty impressive knowledge, not just about
databases but also app servers and connecting to DB¹s in general. He had
done some performance monitoring on a number systems with varying loads and
conne
33 matches
Mail list logo