The example application defines a custom plug-in that is initialised at
start-up and loads the database and stores it in the ServletContext
(application scope).
struts-config.xml:
plug-in
className=org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn
set-property property=pathname
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bPproj/src/war/com/baseBeans/scaFfoldingXpress/base/util/DAOIBaseHelper.java
Andy Cheng wrote:
Hi! All
Basically I have made the ibatis and struts examples working, and I can
build some simple apps with both. However, I do not really
Here is a link to my BaseDAO that utilizes the Ibatis SqlMap. My plan is to
move this to a singleton that works more like Log4j Logger. This would allow
the SqlMap to be called from a static method. Many people use static methods
in their DAOs to avoid instantiating objects everytime they need to
Sloan Bowman wrote:
I will do my best to explain this but I will also point you in the
right direction. First off you need to read the Java Blueprints on using
DAO with J2ee. This will teach you the best methods of using Databases
by using the DAO to encapsulate the DataSource . Here is
Subject: Re: Struts and database
I will do my best to explain this but I will also point you
in the right direction. First off you need to read the Java
Blueprints on using DAO with J2ee. This will teach you the best
methods of using Databases by using the DAO to encapsulate the
DataSource
, 2003 5:26 PM
Subject: RE: Struts and database
A follow up to the J2EE DAO Pattern: I found that it helps a lot using
externalized SQL statements, i.e., build SQL statements in an XML file with
your
own DTD. It's point #3 in that blueprint. However, to this date I haven't
found any good
Bowman [mailto:[EMAIL PROTECTED]
Sent: June 18, 2003 9:49 PM
To: Struts Users Mailing List
Subject: Re: Struts and database
I will do my best to explain this but I will also point you
in the right direction. First off you need to read the Java
Blueprints on using DAO with J2ee. This will teach
I store all of my sql statements in a properties file and use ? for
replacement parameters into PreparedStatement objects. That way I can
support many databases by swapping in a different properties file. Even if
you only need to support 1 database it's still useful because you don't
need
What! You don't have to recompile when you make a change to your properties
file?
Man, I must've been doing something seriuosly wrong. Whenever I changed
anything in the application.properties or struts-config.xml, or any of my dtd's
and .xml files(including validation.xml, which is such a
What! You don't have to recompile when you make a change to your
properties
file?
Compiling is only for Java code. Text files don't need to be compiled so
you might be talking about rebuilding your app?
David
Man, I must've been doing something seriuosly wrong. Whenever I changed
anything
www.ibatis.com
Is a great one out there also.
Jacob
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts and database
A follow up to the J2EE DAO Pattern: I found that it helps a lot using
Hi Andy
Programming Jakarta Struts - Chuck Cavaness
Source: http://examples.oreilly.com/jakarta/
Professional Struts Applications: Building Web Sites with Struts, Object
Relational Bridge, Lucene, and Velocity
Source: http://web.wrox.com/download/code/professional/7817.zip
Both of these use OJB
I will do my best to explain this but I will also point you
in the right direction. First off you need to read the Java
Blueprints on using DAO with J2ee. This will teach you the best
methods of using Databases by using the DAO to encapsulate the
DataSource . Here is the link to the Java
13 matches
Mail list logo