Thanks for replying Drew, I already have a datasource for my app. I guess the
step that I as missing was using the jsp and <jrun:sql> tag!
I just went to the doc of taglib and all the answers were there!
Thanks again!
"Drew
Falkman" To: Jrun-Talk
<[EMAIL PROTECTED]>
<drew@drewfal cc:
kman.com> Subject: RE: Caching connection
02/20/2002
11:01 AM
Please
respond to
jrun-talk
Hey-
JRun offers the ability to pool your database connections using JDBC. You
can setup datasources in the JRun Management Console, then access them using
their datasource name.
To setup a datasource:
1. Login to the JMC, click the plus sign next to the appropriate server
instance in the left menu. This opens the sub-menu for that server.
2. Click the JDBC Data Sources link. This will bring up the data source menu
screen on the right frame.
3. Click the "add" button - this will start the add datasource wizard.
4. On the first screen, select your driver type (MS SQL Server - a native db
driver is included if you are using Advanced or Enterprise), Enter the
datasource name - this is what you will refer to in your application - and a
brief description (optional).
5. On the next screen, you are asked for the database address/port number,
the database name (in SQL Server) and security information. Enter the
appropriate responses.
6. The next screen will as you for connection information - do you wish to
pool connections (yes, you should, most likely), when should the connection
timeout and at what interval should the connection retry a query if the
database is unavailable or busy. You can also enter any vendor arguments you
like for instantiating the connection.
7. Click next and you are finished.
Now you can refer directly to this datasource in your applications (this is
extremely easy if you are using JSP and the <jrun:sql> tag...)
Drew Falkman
Author, JRun Web Application Construction Kit
http://www.drewfalkman.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:56 AM
To: JRun-Talk
Subject: Caching connection
Our office is new in implementing J2E technology. We are set up with JRun
and ms
sql server. The db admin was horrifed when he opened the sql server log and
saw
all the connections by one of my applications.
Basically, the site queries the db almost at every page, to collect, display
the
different info. So everytime the user browses a page, data is being pulled
from
sql.
Am I doing anything wrong? I thought that everytime I connect, I should
close
the connection.
I posted this q to javaranch, and one person replied that i should store in
app
level, and another one that JDBC2 Datasource would do that for me.
I'm embarrassed to admit but am clueless of what they mean. Can someone
please
explain?
Thanks!
______________________________________________________________________
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