You might want to look at Castor for XML/JDBC

The simplest solution is to write an intermediate layer.  Struts calls
specialized methods on this layer to handle calls to multiple persistence
services, invisible to your struts code.  So you can have a method called
getAllEmployees() that might access a DB, where getAllDepartments() might
access an XML file.  It might sound too concrete, but keep in mind that this
intermediate layer is the guts of your application and each method should be
treated like a step in your Use Cases.

-----Original Message-----
From: J Aaron Farr [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 1:45 PM
To: [EMAIL PROTECTED]
Subject: RE: DAO and Struts Best Practice

Hello all.

I've looked at a lot of DAO based projects and I haven't yet found one that
I
really like.  My problem is that often I end up having to access similiar
data
from very different sources.  For example, my current project needs to be
able
to gather the same data via JDBC, JMS, or static XML files (and down the
line,
probably SOAP).  Most implementations of DAO (or other datasource packages)
that I've seen are so SQL oriented that I find I cannot use them. 
Additionally, the SQL that I do use is often very complex so it's not as
simple
as just updating rows or columns.  Perhaps the problem is that I just don't
understand DAO or other packages like JDO or OBJ well enough.

That said, I think I go along with option #2 (Instantiated DAO with Method
parameters) more often than not.

jaaron

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


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

Reply via email to