Hi,

You may remember me from last week... I'm the one trying to deploy a Model-2
JCA-based Jackrabbit on JBoss 4.0.5 and then get the WebDAV servlets
connecting via JNDI to the shared repository.

After sifting through the Jackrabbit source code I think I've solved the
WebDAV deployment problem... If you take a look at

http://svn.apache.org/repos/asf/jackrabbit/tags/1.3/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/JNDIConfig.java

it contains a method:

   public void init(ServletConfig ctx) throws ServletException  {
       super.init(ctx);
       // add all params whose name starts with 'java.namming.' to the env
       Enumeration enum = ctx.getInitParameterNames();
       while (enum.hasMoreElements()) {
           String name = (String) enum.nextElement();
           if (name.startsWith("java.naming.")) {
               jndiEnv.put(name, ctx.getInitParameter(name));
           }
       }
       // enable jndi if url is specified
       jndiEnabled = jndiEnv.containsKey("java.naming.provider.url");
   }

The last statement "activates" the JNDI configuration IF AND ONLY IF the "
java.naming.provider.url" parameter has been specified.

I've add the solution to http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

But it seems odd needing to specify the JNDI environment variables when
deployed __inside__ JBoss.

Hope it helps,
Ijonas Kisselbach.

Reply via email to