Emmanouil Batsis wrote:
Hi Felix,
On Tuesday 25 October 2005 15:53, Felix Röthenbacher wrote:
Hi Emmanouil
I updated Jetty to version 5.1.4 with the JettyPlus libraries [1] which
means that there will be a JNDI context that can be used to get the
JCR repository.
Thanks; i was watching the jetty thread yestarday morning :-)
Hiding JNDI (or whatever) from the rest of the app can be usefull in the
future, so the repo factory is still the way to go right? Getting a repo
with:
Repository repo = RepositoryFactory.getInstance().getRepository();
is better than doing JNDI lookups, plus it's easy to refactor/extend in the
future.
agreed, but I would try to use JNDI lookup if possible anyway.
But it would certainly make sense if for instance a container does not
support JNDI or some other Repository instantiation is preferred
The ContextListener can be used to initialize the factory based on it's
web.xml configuration, with JNDI as the default. The factory can be a
concrete class/singleton for the local JVM.
Some issues:
* The factory will be initialized right after the web conext is up. If nothing
tries to obtain a repo before that then this is OK.
* Can we throw out LenyaRepository? It extends a jackrabbit-specific class and
the wrong one as well.
sure, if that's the case. I think one should be able to compile
Lenya itself without having a specific JCR implementation.
Hence I would split the compile target in two targets resp. separate the
specific instatiator code from the Lenya code.
Michi
Instead of JackRabbitRepository it should extend
org.apache.jackrabbit.core.jndi.BindableRepository AFAIK (for which i can
find the xref but not the javadocs online; it does live on the trunk).
LenyaRepository also has a configure who's javadoc points to Avalon's
Configurable but the class itself does not implement the interface?
Thanks again,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]