aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Wondering receiving Connections from Singleton Class in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Wondering receiving Connections from Singleton Class in EJB" Watch "Wondering receiving Connections from Singleton Class in EJB" New topic
Author

Wondering receiving Connections from Singleton Class in EJB

Jack Nicholson
Ranch Hand

Joined: Sep 07, 2002
Posts: 41
Hello Guys,
I am using singleton Class for getting the connection from Datasource in EJB.
When I am creating new Connection I am giving initial connection as 1, maximum connections as 10, & increment it by 1.
In my application, i am getting the connection before performing any d/b operation & releasing connection as soon as d/b operation is performed.
I am pondering over is that
When I am using Singleton class there should be only one connection available, at the pool.
But when i am running the application,
that means at anytime only one connection should be active in the pool & available connection should be reused always.
But
I found that
there are more than One connection in the pool when i observed it from
"Monitor All Active pools" Option in WebLogic7.0 App Server
Can any body tell me How this can happen?


[ April 30, 2003: Message edited by: Jack Nicholson ]

Jack Nicholson
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wondering receiving Connections from Singleton Class in EJB