• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DB Connection Pool refresh

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have few questions regarding DB connection pool refresh (stop and start the connection pool). ***Below questions are applicable only when there is no server restart happenning.
In what cases do we have to refresh the Database Connection pool -
1. Do we have to refresh if there are some changes to the tables and views that we query change, like new columns are added/exposed?
2. What if a new package was introduced and we refer to that package in the application?
3. What if an existing package was modified and the parameters that were passed to the procedure from our application were also changed?
4. What if an existing package was modified and recompiled but parameters that were passed to the procedure from our application were not changed?
5. We connect to a database say XYZ from the application server. A procedure in XYZ that was called from our application internally connects to some other databse ABC and accesses a procedure in it. What if that procedure in ABC changes, do we still have to refresh the connection pool?

Finally,
Ours is clustered environment. If we stop all servers first and then start one after another, then in that case I believe we need not refresh the connection pool because server restart will take care of it(correct me if I am wrong). If we do rolling restart (once server after another, not normal restart), do we still have to refresh the DB Connection pool in the above mentioned scenarios?

Thanks in Advance
 
Ranch Hand
Posts: 88
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aswani,

The connection refresh mainly determines stale connections and remove them. Then creates as many connections which are sufficient to meet minimum connection specified in data source. I can't get equivalent weblogic link but you can see this for stale connections.

Besides, I didn't got you any of package questions, what do you mean by package?

Finally, in a clustered environment each server serving i.e. node will have its own set of connections. So, restartig a node in whichever way you do will refresh connection itself.
 
Aswani Kommireddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply. I will go through that article.

For your question "what do you mean by package?"
I meant PL/SQL package (Procedures and functions). Sorry that I was not clear.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. Do we have to refresh if there are some changes to the tables and views that we query change, like new columns are added/exposed?



No

2. What if a new package was introduced and we refer to that package in the application?



No refresh required

3. What if an existing package was modified and the parameters that were passed to the procedure from our application were also changed?



No refresh required

4. What if an existing package was modified and recompiled but parameters that were passed to the procedure from our application were not changed?



No refresh required

5. We connect to a database say XYZ from the application server. A procedure in XYZ that was called from our application internally connects to some other databse ABC and accesses a procedure in it. What if that procedure in ABC changes, do we still have to refresh the connection pool?



No refresh required

A connection pool simply offers a pool of connections to the underlying persistence store. It is not bound to the data / schema in the store in any way. Of course you can get a connection that belongs to a schema, but the point I am trying to make is, a DB refresh is not needed unless the DB went down and all the connections in the pool are lost and cannot be reclaimed.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To your question datasource contains a pool of database connections that are created (min and max connections) when the data source instantiated at server startup.

Applications use connection pool in datasource and then request a database connection. When finished with the connection, the application calls connection.close(), which returns the connection opened to database back to the connection pool in the data source.

When you do rolling restart connections opened to DB from datasource are closed and instantiated again.

Hope this helps.

- Tarun
 
Aswani Kommireddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the pl/sql packages that our application executes are recompiled, we have to restart our connection pools. Otherwise we are seeing exceptions. Once we restart our connection pools then everything is working as expected.

Is there a setting in Weblogic to get new connections when the existing connections are stale without us restarting the connection pools?
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are using WL8 to deploy our applications.Soon we are going to migrating to 10.x.
Here my problem is we have a connection pool in wl8 server whose allowed connections limit is 40.
Whenever it reaches the count of 40 it is bringing the managed server down.
So to eradicate this issue we are daily monitoring the connections count and restarting managed server as and when it reaches 30.

So,to minimize our efforts we thought to write a script which will calculate the connection count on hourly basis,and restart the managed server when the connection count reached to 30.

What will be the best option for this problem.

thanks
Praveen
reply
    Bookmark Topic Watch Topic
  • New Topic