Hi Danny,
Danny Waldmann schrieb:
public ServiceManager manager;
(btw, your fields should never be public)
[...]
But it didn't work so far.
How can I initialize the ServiceManager?
There are two options:
a) Implement your class as an Avalon service.
You find more information in the Avalon framework documentation:
http://excalibur.apache.org/framework/guide-cop-in-avalon.html
b) Pass the service manager from a service to your object, e.g. in the
constructor.
And is something else missing?
At a first glance your code looks good. I'd recommend to add a null
check before releasing a service, though (the lookup might fail when the
configuration in cocoon.xconf is broken for some reason).
-- Andreas
Thank's in advance.
-----Ursprüngliche Nachricht-----
Von: Jörn Nettingsmeier [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 24. Januar 2008 11:34
An: [email protected]
Betreff: Re: Sample code for accessing the repository
Danny Waldmann wrote:
Hi!
I want to ask if there is some sample code to access content in the
repository in Apache Lenya 2.0. I searched but did not found anything like
that.
Thank's in advance.
such a thing would be nice to have... should go into
http://lenya.apache.org/docs/2_0_x/reference/repository/index.html
currently, it contains a list of objects related to repository
management that might help you get started (in combination with the
javadocs).
danny, my standard reply would be UTSL, but it can be a little dangerous
with lenya, because i fear we might be using deprecated or hackish
access methods internally in some places...
i hope i'll find time soon to create a generic editor handler, at which
point i'll have to learn to work with our repo - some documentation
fallout might result. but don't hold your breath.
andreas, you being the repository man: can you maybe name a source file
that demonstrates how to get, store, update, lock, whatever, documents
in the repo in a concise manner, according to current best practice?
that would be a valuable starting point. the concepts page you mentioned
is really scarce indeed, and for example does not demonstrate locking.
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]