• 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

connection not released

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi , i am new to ejb and using glassfishv2 in my j2ee project(jsf/ejb/hibernate/mssql/oracle), i have database connection pooling setup using glassfish admin consol, i have a single stateless session bean which uses mssql through persistent context and oracle through @resource annotation..after certain period i am not getting connection to mssql as all the connection get occupied..
does stateless ejb occupies the connection when each instance is created and retains it...even if so ...isn't it the instance should be reused wihtout giving connection not availabe...help needed urgently
thanks ..
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Greenhorn!

I guess my big questions is how are you releasing the connections back to the pool? Is the stateless session bean, SLSB, calling a close method on the connection when it's done, or is it just hanging onto it? Is this more prevalent under peak load, or is it just a matter of time for the problem to occur?

Do you have a small stack tract (small, not all of it, just the important top part) or some code we could see (just a snippet, not the entire application) to give us some hints on where the problem might be, or what might be causing it?

Are there any settings in your pool that you've left out, or given high values to? Something like that might help us help you.

-Cameron McKenzie


 
Brajendra Mathema
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cameron, thankyou very much for quick reply,

actually i am not getting connection from mssql database
i am not closing the connection explicitly using @remove annotation, i thought application server(glassfish) itself manages the connection closing,

for mssql i have configured from glassfish admin console as:
i have set the initial pool size:100 and max pool size:200 and not getting any stack trace exception except message like no connection available

and when i monitor the resource i see all the connection consumed i.e all the 200 connection is in used and not released ,

i have set the ideal timeout 300s and pool resize quantity : 50

and also i want to know that when database connection is used using @resource annotation, as each instance is created for stateless session bean does it acquire the connection too or just prepares for getting connection

thankyou
-brajen
 
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic