connection pooling
Hello
I'm not sure what is the exact section in which this topic should be posted. But i have a website wehre users login and upon clicking a certain link..a connection is made to a third party reporting software. this connection is then stored as an attribute. But in my stress testing i've discovered that if 400+ users try to make this connection at the same time..server is drastically slow. This connection is not at all user specific and is general for all users. Can someone suggest a better way coding/configuring wise that would solve this problem? we use websphere, jsp, servlet, MVC architechture.
thanks
Well, as you mentionned in your Thread title, you should create a Connection Pool to connect to that server with properly configured minimum and maximum connection amounts.
After that, any requests to your jsps or servlets which need to query this 3rd party should try to retrieve a connection from the Connection Pool and block until they get one.
do u suggest this connection pool be in websphere? we have our DB connections in websphere but i dont think connection for this 3rd party can be pooled in websphere. the way we make the connection is by using bunch of API's.
I think this has to be pooled in our code. but againd i dont know how ? i mean..if i have anything in the code..it will definitley be executed when the a new user logs in...i dont know if it is doable but is it possible to always have a attribute in a session? when user logs out..all other attributes get destroyed except this. so in my code i can just check if the attribute isnt null..just use it to rather than making new connection.
..sorry for being confusing
> > And please don't write your own connection pool,
> > unless you like reinventing the wheel.
>
> I do. ;-)
[url #" style="display: block; background-image: url('http://radio.weblogs.com/0105910/images/square_wheels.jpg'); width: 400px; height: 268px] [/url]