Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jboss server database polling  RSS feed

 
jothish chokkalingam
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I m having a question in my mind that whether the server whenever started connects to oracle db and send the connection object to the middle tier so that there wont be any overhead in middle tier to connect to data base and get the datas.....

can any one answer my question
help me ...
urgently needed
[ January 25, 2006: Message edited by: jothish chokkalingam ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I completely understand your question, but "sending the Connect" anywhere is normally impossible, since Connection objects are not Serializable.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are some guidelines.

The server's job is to create the Connnections in the pool and establish the links to the DB.

The application's job is to:

- obtain the DataSource via a JNDI lookup
- obtain a Connection via the DataSource as late as possible
- use the Connection
- always close the Connection (which releases the Connection to the pool)

Doing it this way makes best use of the pooled Connections and minimises problems such as cursor leaks.
 
jothish chokkalingam
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Y guys ...
i got ur point....
can you ppl send me any documentation regarding this....
help me please......
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!