cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agsoftware.dnsalias.com>
Subject Re: OJB Block (Or Java Dev/OO Newbie Questions
Date Tue, 21 Oct 2003 01:45:40 GMT
JD Daniels dijo:
> Hey all,
>
> I have been trying to get OJB to work under cocoon with MySQL. I have
> finally succeded (to a certain extent)
> However, I am very quickly getting confused.
>
> The woody OJB block sample uses:
>
> var factory =
> cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROL
> E);
>
> Now I kinda spied out that the component manager is going the way of the
> dodo in favour of a sequencemanger type thing...
>
> So my working bit is :
>
> var factory = new Packages.org.apache.ojb.jdori.sql.OjbStorePMF;
>
> So my questions to more experienced Java developers are:
>
> 1.) Why would we make a block for this? It seems the block simply calls
> OJB itself. Since OJB is not part of cocoon, it would make sense to
> invoke it on its own.

Hmm. Initially I thought the same, but since OJB has his own factory, I
create a block to have just 1 factory instead of create a new factory on
every request from the user. This way we save time.

> 2.) I am working on the first part, which is basically a user list that
> I use with the authentication framework. This part would a good idea to
> give back as sample. If I do that, do I need to make it a block now?

Good! I am newbie in this area too. I am trying to do other examples. Your
help is very welcome!

> Now before you guys answer..... I am a poor hack->click-reload->hack PHP
> guy... I love OO and java but it is a struggle :S

:-D

Best Regards,

Antonio Gallardo



Mime
View raw message