Well, there is no 1.1 RC3 so you must be referring to 1.1 beta 3. It looks like others have answered your original question but I wanted to talk about your Database class. You should never return a ResultSet into your Action or form classes as it maintains an open database connection. You need to copy the results into a class like ResultSetDynaClass
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/RowSetDynaClass.html


so the db connection can be closed. Also, exposing SQL to your actions tightly couples them to any changes you make to your database schema. A useful pattern used to prevent this is called Data Access Object
http://developer.java.sun.com/developer/restricted/patterns/DataAccessObject.html


David


Hi,
Im just now converting to rc1.3 and find that findDataSource is
deprecated.  How do you find one of many datasources?

FYI:
------
I have a separate class called Database with method runQuery that
returns a resultset to my ActionForm class, I only pass DBName and
QueryString as parameters.  So my previous code where:
In ActionForm:
ResultSet rs = Database.runQuery("logondb", "select username, password
from users where username = '" + uname + "'");

Many thanks in advance.
Johan Wasserman.


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to