Using OJB and struts is not really any different from using jdbc with
struts.

Set up ojb as per instruction on their site, and use it in the same places
where you'd normally make jdbc calls.

I;m not sure if there are any nice examples (havnt looked since i began
using ojb a long time ago).  I've been using ojb with struts for a long
while.  The go quite nicely together.

One nice trick i've used it to have a BaseDAO that has OJB code for simple
CRUD.  If other DAOs extend it they inherit methods like 'getObjectByPKID'
without having to do any coding!

I've also 'cheated' in some projects and rolled the DAO and BO into one
object.  I hear the cries of pain from the 'patterns' advocates, but
really... why have a separate DAO and BO/TO when they can be rolled to
gether to create a clever self-persistable BO.  If you do go down this
route, then create a service/plug-in that provides more complex multi-object
transactions.

Hope that gives you some ideas...

Daniel.


> -----Original Message-----
> From: liooil [mailto:[EMAIL PROTECTED]
> Sent: 15 December 2004 09:42
> To: [EMAIL PROTECTED]
> Subject: OJB && struts
>
>
> Hello world,
>
> I'm trying to connect my web to my db through OJB ...
> I found many threads relative to this topic (persistence, ...,
> whatever, ...)
> And after that, i feel fuzzy about all mentioned patterns :
> DAO, Broker, Business Delagate, and so on ...
>
> At this moment, i'm stuck with my ODMG/OJB Struts plugIn (like in
> Cavaness's Beer4all) and i don't how i could connect that to my
> DAO pattern.
>
> Code Exemples on topice are not numerous. Or they just ignore the
> whole chain needed for reliable production web.
>
>
> Any comments, links are welcome
>
> thx,
>
>
> liooil,
>
>
> ___[ Pub ]____________________________________________________________
> Inscrivez-vous gratuitement sur Tandaime, Le site de rencontres !
> http://rencontre.rencontres.com/index.php?origine=4
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 09/12/2004
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 09/12/2004


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

Reply via email to