RE: Struts-example database

2003-08-25 Thread Steve Raeburn
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

Re: Struts + iBatis Database Layer

2003-07-02 Thread Vic Cekvenich
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

RE: Struts + iBatis Database Layer

2003-07-02 Thread Brandon Goodin
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

Re: Struts and database

2003-06-19 Thread Erik Price
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

RE: Struts and database

2003-06-19 Thread Yansheng Lin
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

Re: Struts and database

2003-06-19 Thread Laurent PETIT
, 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

RE: Struts and database

2003-06-19 Thread David Graham
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

RE: Struts and database

2003-06-19 Thread David Graham
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

RE: Struts and database

2003-06-19 Thread Yansheng Lin
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

RE: Struts and database

2003-06-19 Thread David Graham
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

RE: Struts and database

2003-06-19 Thread Hookom, Jacob
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

RE: Struts and database

2003-06-18 Thread Shane Mingins
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

Re: Struts and database

2003-06-18 Thread Sloan Bowman
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