Nobody was interested on dev :) reposting here...

I'm working on a lenya project which requires a shopping cart to be built.

I would like to keep my products etc in a database and I'm using EJB
entity beans to store these products. I've already migrated the lenya ac
system to EJB and it's working great.

Now I'm trying to generate content from my ejb entities. I've made a
ServiceableGenerator which is able to look up the correct entity bean
from the publicationId, documentId, area and language. This is using an
implementation of DocumentIdentifier as an entity which then has a
reference to an implementation of a Lenya Node. The lenya node then has
a references to a bunch of ContentBeans (for different versions of
content, authoring live etc), which implement an interface which
requires the method:
void generate(org.xml.sax.ContentHandler ch)
this way I pass the contentHandler through from the
ServiceableGenerator, and each instance of my EJB Entity will be able to
generate xml content in it's own way.

What I want to know next, is how to configure my publication to use this
generator for specific document types? I've also contemplated using my
EJBGenerator for all document types in the same way the JCRGenerator
works. I'm having trouble understanding how this would work too. Any ideas?

Can anyone give me some ideas on what would be involved in implementing
a EJBGenerator to completely replace the filesystem based storage? I
believe this would have a number of advantages, especially if using the
generate(ch) interface I mention above. You would simply implement a new
Bean which implemented that interface and it could generate XML content,
this could then be passed through an XSLT in the same way all other
content is.

I'm interested in contributing the code I have written back into the
lenya project. However I have made substantial changes to much of the
core of lenya. I've defined interfaces for a bunch of lenya classes
which did not have them, I've then moved all the interfaces to a
src/common directory, so they can be shared between EJB and lenya. I've
rewritten alot of lenya code which used arrays to use Java1.5 typed
collections, and many for loops now use iterators instead of counting
through an array with an index. Any ideas on the best way to contribute
this code back? Maybe make a bunch of patches which are split into the
different areas they effect. Unfortunetly I'm under alot of pressure to
get the site I'm working on finished so I won't have alot of time to
create patches such as this... so it may be a while forthcoming.

Thanks for any help :)
Michael Ralston

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

Reply via email to