Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

database connection for n java files  RSS feed

 
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
Marshal
Posts: 36616
474
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.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!