Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the Handle to a database from an ordinary class

Status
Not open for further replies.

Rajesh1974

Programmer
Jun 1, 2002
1
0
0
IN
hi,
I have an ordinary class in Silverstream. ie a class which is not an invoked business object ,tirggered or anything of that sort.Just a pure class. From this class I want to get the handle to a database (evt.getDatabase()). How am I going to do that ?.

I will be very glad if anyone can help me out.
Regards
Rajesh
 
You can give it to the class as a parameter (in the constructor for example)

Or if you only need a JDBC connection from the evt.getDatabase() you can use JNDI to lookup the DataSource object en get a connection from it.

gr,
Machiel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top