• Post Reply Bookmark Topic Watch Topic
  • New Topic

database connection for n java files

 
lokesh rajarathnam
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all...

How can i give a connection for an 10 java files i an application only once.
How can i use context.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36007
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lokesh,
Why do you want to share an open connection across files?

An initial context is typically used on an application server to share a datasource (and connection pool.)
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!