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.

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. 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]

Reply via email to