Using the JRun datasource created in the JMC allows you to use the datasource using 
JNDI.  You then gain access to JRun's connection pooling as long as you enable pooling 
in the datasource.

The following is from page 34 of JRun 3.1 "Developing Applications with JRun:"

Using the JRun data source service
The JRun data source service lets you define JDBC data sources in JRun. Your code
then references the database using the data source name instead of hard-coding the
JDBC driver information. Using this approach, you can change data source
information in JRun without recompiling your servlets. A JRun data source provides
enhanced servlet portability in addition to optional connection pooling. It is the
recommended method of database access in JRun.

There is also a code example on this page.

HTH.

Ted Zimmerman



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 2:08 PM
To: JRun-Talk
Subject: help! Datasource!


I am using two ways to access the dabase in my apps.

for the JSP, I'm using the Jrun Data source, and using Jrun tags.

for my java classes, I have one DbAccess() that connects to the db, runs a query
and returns a resultset or status (for updates).

Is it possible to use the DataSource created through the Jrun console instead of
writing my own connection routine?

I found some documentation on using javax.sql.DataSource and
javax.sql.ConnectionPoolDataSource but don't understand why I would need to use
JNDI. (and how).

Would appreciate to get any kind of clarification or help in this matter.

Thanks,

Zeina


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to