On Mon, 13 Aug 2001, BinhMinh Nguyen wrote:
Hi,
I know how to get a DataSource from a Action java
class
but I do not know how to obtain a DataSource from a
JSP page.
Please show me how.
Doing this violates the usual separation of business logic and application
logic, but the data
for use by the persistenc layer?
That is the solution we think will work. Is this different from that?
Thanks,
Bud
DataSource can be obtained either Deployment descriptor as
java:comp/jdbc/MyDataSource
(associate a Jndi name to the Datasource
)
J2EE-based application servers
On Thu, 2 Aug 2001 [EMAIL PROTECTED] wrote:
I understand that--my app does close connections (release back to the
pool). The problem is that the pool itself maintains open connections to
the database, and doesn't seem to recover very well when the databsae dies
and comes back.
Is there any parameter that can be set to timeout datasources, or to
re-init them after a specified period of time? We recently bounced our
Oracle database that our struts connection pool points to, and I noticed
that all the connections had hung (the app just hung while trying to
perform
respond to struts-user
To: [EMAIL PROTECTED]
cc:
Subject:RE: DataSource timeouts?
in the documentation it says that you close the connection after you have
used it...
ie.
conn.close();
this wont close the connection but will release it for others to use
For some reason, my application cannot load
ActionServlet if we use Connection Pooling using
DataSource in the struts-config.xml, Please help me
spot my error. Thank you.
B Nguyen
--
strut-config.xml:
?xml version=1.0 encoding=ISO-8859-1
in the constructor, one could
only create Person objects, with a factory, you can create an object of
the real type instead.
Anyway, what I want is to get a DataSource without knowing about a
servlet. Is this somehow possible? Is there some static access to the
DataSource Repository?
Tia,
Andreas
in handy, when you have classes that inherit
AL from Person. If the DB access would happen in the constructor, one could
AL only create Person objects, with a factory, you can create an object of
AL the real type instead.
AL Anyway, what I want is to get a DataSource without knowing about a
AL servlet
DataSource can be obtained either Deployment descriptor as
java:comp/jdbc/MyDataSource
(associate a Jndi name to the Datasource
)
- Original Message -
From: Andreas Leitner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; 'Aapo Laakkonen'
[EMAIL PROTECTED]
Sent: Wednesday, July 25, 2001 3:29 PM
Hello,
I am trying to add property to DataSource object. There is addProperty(
String, String) method that I used but it had no affect. My impression is
that all connections are initialized after ActionServlet is loaded ( I
extended ActionServlet and added properties after calling super.init
?
That is the solution we think will work. Is this different from that?
Thanks,
Bud
DataSource can be obtained either Deployment descriptor as
java:comp/jdbc/MyDataSource
(associate a Jndi name to the Datasource
)
Take a look to the Castor project -
http://castor.exolab.org
That does indeed look awesome! Do you have experience with it? Is it
ready for production use? Many thanks for that great hint!
Andreas
Hello,
Did anyone encounter the following error while trying to load datasource for
Sybase jconnect 5.2? How did you resolve it? Is there a property that would
indicate for not checking for metadata accessor info?
===
2001
On Thu, 12 Jul 2001, Maik Mrazovic wrote:
thanks,
but it´s indifferent if Autocommit is false or true it does not
work with both options!
Database is IBM DB2 7, but the reason for my problem ist the
connection-object from the datasource-config.
GenericConnection (
src/share/org/apache
Hello,
I am having a recurring problem with struts and jdbc. The demo
driver I am using, inet's Sprinta200, only allows 2 connections. I have
my data source max set to 1, but I still get errors from the driver:
java.sql.SQLException: [TDS Driver]Too many connections :3
at
this error
when you try to open your connection.
Hope this helps.
--
Martin Cooper
- Original Message -
From: Bill Clinton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 13, 2001 1:47 PM
Subject: Struts Datasource problem
Hello,
I am having a recurring problem
Hi,
I want to use a datasource in a Struts based application but I also want
to lookup this dataSource in objects that do not have an action or a
servlet object in their scope, f.e. DAO's. In this case, using the
struts-config.xml dataSource description doesn't seem the best of
sollutions to me
What is the easiest way to set a timeout for a query
in the struts connection pool? I'm using Oracle 8
with the native driver.
David
__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
to be the DATASOURCE. I do not get an error but it seems the
application is not connecting to the database. Has something changed in Datasource
definition in struts-config file.
This is what I have it defined as(and it works fine with 1/29/01 version):
data-sources
data-source
autoCommit
It was a small mistake
Hello,
We at Tufan Infotech are evaluating Struts for using in our web application
development.
I am not able to connect to a Oracle 8i database and retrieve or update
data. The datasource configuration in struts-config.xml is given below.
!-- == Data Source Configuration
Hi all,
Hopefully this is an easy question for somebody.
In my struts-config I have the datasource
data-sources
data-source
autoCommit="false"
description="Access data source config"
driverClass="sun.jdbc.odbc.JdbcOdbcDriv
What specific operation are you trying to do? Since you don't have autocommit
set to true, you may be having transaction problems.
I found it helpful to create a Test.java file with the same operations
as creating the datasource (with the same parameters), a connection and
doing a sample
i think the problem lies in your url. i have implemented datasource in my
application using datasource and this is what my url looks like
jdbc:oracle:thin:@sandstorm:1521:testdb
here sandstorm is the name of the machine on which the database is
and testdb is the global database name
i
kartik!
url depends on driver class used.
piyush
Kartik Sudarsan wrote:
i think the problem lies in your url. i have implemented datasource in my
application using datasource and this is what my url looks like
jdbc:oracle:thin:@sandstorm:1521:testdb
here sandstorm is the name
PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Matthias Bauer
Sent: Friday, March 16, 2001 4:45 PM
To: Kartik Sudarsan
Cc: [EMAIL PROTECTED]
Subject: Re: datasource - connection timeout
Here is the change in class GenericDataSource: I am just checking whether
the
connection has been closed
My problem is that
access to the DataSource is through the servlet.findDataSource() call.
Struts stores the JDBC Connection pools as servlet context attributes
(in JSP terms, application-scope beans). You can also access them that
way. If you do not specify a name in the Struts-config file
Title: Question about struts application model (DataSource, Business Logic beans)
Hi,
I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans.
My Business Logic beans are making database
and your DataSource. I modeled my context
object after the Servlet session API, but you could make it much more
structured if you like.
Second, depending on your servlet environment, create some mechanism to
initialize your application context object. Using Tomcat, you could do
this using
the
underlying data model. I am planning on using the struts db connection pool,
which is supplied through the DataSource. My problem is that access to the
DataSource is through the servlet.getDataSource() call. How do I make the
Business Logic beans unaware of the servlet/http layer (as suggested
Title: Question about struts application model (DataSource, Business Logic beans)
Hi,
I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans.
My Business Logic beans are making database
propose a new interface:
interface StrutsDataSource extends DataSource
{
open()
close()
setProperty(String str,String)
}
those property can be everything: url,driver class ect ect
exactly the things that can be specified in the struts-config.xml
Then the implementor must map the string
writing a Web app at this time.
And i want it to run on both environments. (A normal JSP/servlet container and a J2EE
container)
Because i want it to run on both environments i must just the lowest common
denominator (do i say this right?)
And that is using a Datasource.
Why not make
Pardon me if I'm missing something, but is it intended that the
javax.sql.DataSource be required in the ActionServlet? It's just that I
downloaded a recent build and I'm now getting errors when trying to compile
my actions. They relate to javax.sql.DataSource not being found on the
import. Is
icit about this.) If you are just
compiling your own classes, you should not need them, but will again at
runtime (even if you do not use a DataSource in your app.
Craig
301 - 335 of 335 matches
Mail list logo