Author: rwesten
Date: Mon Oct 31 13:28:49 2011
New Revision: 1195450

URL: http://svn.apache.org/viewvc?rev=1195450&view=rev
Log:
Fixes STANBOL-353: Other than in the initial description of the Issue the 
SolrDispatchFilter was used to implement the requested feature. This includes 
also a default configuration for the launchers so that the internally managed 
SolrIndex is published with the prefix "/solr/default". There is also a new 
integration-test that checks for the index with the dbpedia default data (core 
name: dbpedia_43k).

Details:

commons/solr/core:

* The commons.solr.core bundle now exports additional solr packages. See the 
pom.xml for details.
* corrected a Bug that causes concurrent modification exceptions on shutting 
down a CoreContainer.
* The deactivate method of EmbeddedSolrServerProvider now correctly shutdowns 
Solr CoreContainer that are not managed as OSGI services

commons/solr/web:

implementation of STANBOL-353 by

* subclass of SolrDispatchFilter that prevents the initialization and 
destruction of a CoreContainer on the initialization and deactivation
* OSGI component that allows to match CoreContainers available as OSGI services 
(as provided by STANBOL-354) to configured prefixes.
* ServiceTracker are used to register/unregister such components with the 
HttpService as the referenced Solr CoreContainer become available/unavailable.

other changes

* added a configuration that registers the internally managed Solr Server with 
the prefix "/solr/default/" to the stable, full, full-war and kres launcher.
* added an integration-test that checks that the default data index is 
available under /solr/default/dbpedia_43k

Added:
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java
   (with props)
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java
   (with props)
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
   (with props)
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java
   (with props)
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/
    
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java
   (with props)
    incubator/stanbol/trunk/commons/solr/web/src/main/resources/OSGI-INF/
    
incubator/stanbol/trunk/commons/solr/web/src/main/resources/OSGI-INF/metatype/
    
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/
    
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/
    
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/
    
incubator/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/commons/solr/web/it/
    
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
    
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
    
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
    
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
Modified:
    incubator/stanbol/trunk/commons/solr/core/pom.xml
    
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java
    
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/impl/EmbeddedSolrPorovider.java
    incubator/stanbol/trunk/commons/solr/web/pom.xml
    incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml
    incubator/stanbol/trunk/launchers/full-war/pom.xml
    incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README
    incubator/stanbol/trunk/launchers/full/pom.xml
    incubator/stanbol/trunk/launchers/full/src/main/resources/README
    incubator/stanbol/trunk/launchers/stable/pom.xml
    incubator/stanbol/trunk/launchers/stable/src/main/resources/README

Modified: incubator/stanbol/trunk/commons/solr/core/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/pom.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/commons/solr/core/pom.xml (original)
+++ incubator/stanbol/trunk/commons/solr/core/pom.xml Mon Oct 31 13:28:49 2011
@@ -68,7 +68,17 @@
               org.apache.solr.common,
               org.apache.solr.common.luke,
               org.apache.solr.common.params,
-              org.apache.solr.common.util
+              org.apache.solr.common.util,
+              org.apache.solr.servlet,
+              org.apache.solr.core,
+              org.apache.solr.handler.*,
+              org.apache.solr.request,
+              org.apache.solr.response,
+              org.apache.solr.schema,
+              org.apache.solr.search.*,
+              org.apache.solr.update .*,
+              org.apache.solr.util.*,
+              org.apache.solr.analysis
             </Export-Package>
             <!-- NOTE: 
                * The exclusion of javax.xml.stream assumes that only serialised

Modified: 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java
 (original)
+++ 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/ManagedSolrServer.java
 Mon Oct 31 13:28:49 2011
@@ -20,6 +20,7 @@ import static org.apache.stanbol.commons
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Dictionary;
@@ -204,13 +205,14 @@ public class ManagedSolrServer {
      * this instance. This will also cause all OSGI services to be unregistered
      */
     public void shutdown(){
+        Collection<CoreRegistration> coreRegistrations;
         synchronized (registrations) {
-            for(Iterator<Entry<String,CoreRegistration>> it = 
registrations.entrySet().iterator();it.hasNext();){
-                Entry<String,CoreRegistration> entry = it.next();
-                entry.getValue().unregister();
-                it.remove();
-                log.debug("removed Registration for SolrCore 
{}",entry.getKey());
-            }
+            coreRegistrations = new 
ArrayList<CoreRegistration>(registrations.values());
+        }
+        for(CoreRegistration reg : coreRegistrations){
+            reg.unregister();
+            registrations.remove(reg.getName());
+            log.debug("removed Registration for SolrCore {}",reg.getName());
         }
         //unregister the serviceRegistration for the CoreContainer
         serverRegistration.unregister();

Modified: 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/impl/EmbeddedSolrPorovider.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/impl/EmbeddedSolrPorovider.java?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/impl/EmbeddedSolrPorovider.java
 (original)
+++ 
incubator/stanbol/trunk/commons/solr/core/src/main/java/org/apache/stanbol/commons/solr/impl/EmbeddedSolrPorovider.java
 Mon Oct 31 13:28:49 2011
@@ -252,6 +252,10 @@ public class EmbeddedSolrPorovider imple
         log.debug("deactivating" + 
EmbeddedSolrPorovider.class.getSimpleName());
         defaultSolrServerTracker.close();
         defaultSolrServerTracker = null;
+        //shutdown externally managed CoreContainers
+        for(CoreContainer coreContainer : coreContainers.values()){
+            coreContainer.shutdown();
+        }
         this.context = null;
     }
 

Modified: incubator/stanbol/trunk/commons/solr/web/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/pom.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/commons/solr/web/pom.xml (original)
+++ incubator/stanbol/trunk/commons/solr/web/pom.xml Mon Oct 31 13:28:49 2011
@@ -58,14 +58,14 @@
           <instructions>
             <Export-Package>
               org.apache.stanbol.commons.solr.web;version=${project.version},
-              org.apache.stanbol.commons.solr.web.*;version=${project.version},
+              
org.apache.stanbol.commons.solr.web.dispatch;version=${project.version}
             </Export-Package>
             <Import-Package>
               *
             </Import-Package>
             <Private-Package>
               
org.apache.stanbol.commons.solr.web.impl;version=${project.version},
-              
org.apache.stanbol.commons.solr.web.impl.*;version=${project.version}
+              
org.apache.stanbol.commons.solr.web.utils;version=${project.version}
             </Private-Package>
             <Embed-Dependency>
             </Embed-Dependency>
@@ -100,6 +100,39 @@
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.scr.annotations</artifactId>
     </dependency>
+    <!-- Web dependencies -->
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.base</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-server</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.freemarker</groupId>
+      <artifactId>freemarker</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jettison</groupId>
+      <artifactId>jettison</artifactId>
+    </dependency>
+    <dependency>
+      <!-- required for ExtHttpService that supports Servlet Filters within 
Felix -->
+         <groupId>org.apache.felix</groupId>
+         <artifactId>org.apache.felix.http.api</artifactId>
+      <version>2.2.0</version>
+      <scope>provided</scope>
+    </dependency>
+
     <!-- Logging -->
     <dependency>
       <groupId>org.slf4j</groupId>

Added: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java
 (added)
+++ 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,112 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.commons.solr.web.dispatch;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.core.CoreContainer.Initializer;
+import org.apache.solr.servlet.SolrDispatchFilter;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+
+/**
+ * A {@link SolrDispatchFilter} that does not create a new {@link 
CoreContainer}
+ * on initialisation, but instead delegates to a already existing instance.<p>
+ * Users of this Class MUST implement two methods <ul>
+ * <li> {@link #getCoreContainer()}: Called during 
+ * {@link Filter#init(javax.servlet.FilterConfig)} to get the {@link 
CoreContainer}
+ * instance to be used for the Servlet filter.
+ * <li> {@link #ungetCoreContainer()}: Called during the {@link 
Filter#destroy()}
+ * method to indicate the the delegate is no longer needed by this Filter
+ * {@link ServiceReference} provided by {@link #getCoreContainerReference()}
+ * @author Rupert Westenthaler
+ *
+ */
+public abstract class DelegatingSolrDispatchFilter extends 
org.apache.solr.servlet.SolrDispatchFilter {
+    
+    private final Logger log = 
LoggerFactory.getLogger(DelegatingSolrDispatchFilter.class);
+    /**
+     * The delegate (used to call {@link #ungetCoreContainer()} in case of
+     * multiple calls to init)
+     */
+    private CoreContainer delegate = null;
+    /**
+     * {@link Initializer} implementation that calls the abstract
+     * {@link #getCoreContainerReference()} method to lookup the {@link 
ServiceReference}
+     * to the {@link CoreContainer} used for this dispatch filter
+     * 
+     */
+    private Initializer initialiser = new Initializer() {
+        @Override
+        public CoreContainer initialize() throws IOException, 
ParserConfigurationException, SAXException {
+            //support multiple calls
+            if(delegate != null){
+                ungetCoreContainer(); //cleanup current
+            }
+            delegate = getCoreContainer();
+            if(delegate != null){
+                return delegate;
+            } else {
+                throw new IllegalStateException("CoreContainer currently not 
available");
+            }
+        }
+    };
+    
+    
+    /**
+     * Protected Constructor intended to be overwritten by sub classes
+     */
+    public DelegatingSolrDispatchFilter(){
+        super();
+    }
+
+    @Override
+    protected Initializer createInitializer() {
+        //we do not need to initialise a new CoreContaine. Just get the service
+        //via the OSGI environment
+        return initialiser;
+    }
+    
+    @Override
+    public void destroy() {
+        //we need NOT do shutdown the CoreContainer! Just release the
+        //OSGI service!
+        try {
+            ungetCoreContainer();
+        } catch (RuntimeException e) {
+            log.error("RuntimeException during ungetCoreContainer ... 
ignored",e);
+        }
+    }
+    /**
+     * Getter for the {@link CoreContainer} used for the Solr dispatch filter
+     * @return
+     */
+    protected abstract CoreContainer getCoreContainer();
+    /**
+     * Releases the {@link CoreContainer} no longer needed by the Solr dispatch
+     * filter.
+     */
+    protected abstract void ungetCoreContainer();
+    
+}

Propchange: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/DelegatingSolrDispatchFilter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java
 (added)
+++ 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,107 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.commons.solr.web.dispatch;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.core.CoreContainer.Initializer;
+import org.apache.solr.servlet.SolrDispatchFilter;
+import org.apache.stanbol.commons.solr.ManagedSolrServer;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+import org.xml.sax.SAXException;
+
+/**
+ * Special version of the {@link SolrDispatchFilter} (implemented based on the
+ * {@link DelegatingSolrDispatchFilter} abstract class) that does NOT create a
+ * new {@link CoreContainer}, but retrieves it via a OSGI {@link 
ServiceReference}
+ * from a {@link BundleContext}. This implementation also ensures that removing
+ * the FIlter does NOT {@link CoreContainer#shutdown() shutdown} the 
+ * {@link CoreContainer} but instead.
+ * {@link BundleContext#ungetService(ServiceReference) releases} the 
reference.<p>
+ * This does make is save to use this {@link Filter} in combination with a 
+ * {@link CoreContainer} that is managed as a {@link ManagedSolrServer}.<p>
+ * See <a href="">TODO</a> to see how to use {@link Filter}s in combination 
with
+ * the OSGI {@link HttpService}.
+ * @author Rupert Westenthaler
+ *
+ */
+public class ReferencedSolrDispatchFilter extends DelegatingSolrDispatchFilter 
{
+    
+    private BundleContext context;
+    private ServiceReference coreContainerRef;
+    
+    /**
+     * Creates a new referenced Solr server dispatch filter. Referenced because
+     * the {@link CoreContainer} is not created (as by the normal
+     * {@link SolrDispatchFilter} implementation)
+     * but looked up via the parsed {@link BundleContext} based on the
+     * {@link ServiceReference}.
+     * @param context the BundleContext used to get/unget the CoreContainer 
service
+     * @param serviceReference A {@link ServiceReference} to a CoreContainer
+     * registered as OSGI service.
+     */
+    public ReferencedSolrDispatchFilter(BundleContext context, 
ServiceReference serviceReference){
+        super();
+        if(context == null){
+            throw new IllegalArgumentException("The parsed BundleContext MUST 
NOT be NULL!");
+        }
+        if(serviceReference != null){
+            throw new IllegalArgumentException("The parsed SerivceReference 
MUST NOT be NULL!");
+        }
+        this.context = context;
+        this.coreContainerRef = serviceReference;
+    }
+    
+    @Override
+    protected CoreContainer getCoreContainer() {
+        if(coreContainerRef != null){
+            Object service = context.getService(coreContainerRef);
+            if(service instanceof CoreContainer){
+                return (CoreContainer) service;
+            } else if(service != null){ //incompatible service
+                context.ungetService(coreContainerRef); //clean up
+                coreContainerRef = null;
+                throw new IllegalStateException("Service" +service+" returned 
by ServiceReference "+
+                    coreContainerRef+" is not compatible to 
"+CoreContainer.class.getSimpleName());
+            } else {
+                String msg = "Unable to get Service for ServiceReference 
"+coreContainerRef;
+                coreContainerRef = null; //clean up
+                throw new IllegalStateException(msg);
+            }
+        } else {
+            throw new IllegalStateException("ServiceRegerence was NULL. This 
indicated" +
+                       "that this filter was already destroyed! Reusage of 
this filter" +
+                       "is currently not supported by this implementation. If 
you need this" +
+                       "please report to the Stanbol Development team.");
+        }
+    }
+    
+    @Override
+    protected void ungetCoreContainer(){
+        if(coreContainerRef != null){
+            context.ungetService(coreContainerRef);
+        }
+        coreContainerRef = null;
+    }
+    
+}

Propchange: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/ReferencedSolrDispatchFilter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
 (added)
+++ 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,163 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.commons.solr.web.dispatch;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+import javax.naming.Context;
+
+import org.apache.solr.core.CoreContainer;
+import org.apache.stanbol.commons.solr.SolrConstants;
+import org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent;
+import 
org.apache.stanbol.commons.solr.web.utils.ServiceReferenceRankingComparator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+
+/**
+ * Rather than using directly a {@link ServiceReference} to parse the
+ * {@link CoreContainer} to be used for the dispatch filter this allows to
+ * parse the {@link SolrConstants#PROPERTY_CORE_NAME name} or an own
+ * {@link Filter} that is used to {@link ServiceTracker track} {@link 
CoreContainer}
+ * instances registered in the OSGI environment. In case of the empty
+ * Constructor a simple Class filter is used to track for CoreContainer 
services.<p>
+ * The CoreContainer to be used for the dispatch filter is searched during the
+ * the execution of the Servlets 
+ * {@link javax.servlet.Filter#init(javax.servlet.FilterConfig)}.<p>
+ * This implementation does NOT remove the Filter or change the {@link 
CoreContainer}
+ * on any change in the OSGI environment. See {@link 
SolrDispatchFilterComponent}
+ * if you need this functionality.
+ * @author Rupert Westenthaler
+ */
+public class SolrServiceDispatchFilter extends DelegatingSolrDispatchFilter {
+
+    private static final Comparator<ServiceReference> 
SERVICE_REFERENCE_COMPARATOR = 
+        ServiceReferenceRankingComparator.INSTANCE;
+    
+    private BundleContext context;
+    
+    private ServiceReference coreContainerRef;
+    
+    private Filter filter;
+    
+    /**
+     * Creates a tracking Solr dispatch filter for the CoreContainer with the
+     * parsed {@link SolrConstants#PROPERTY_SERVER_NAME} value
+     * @param context the context
+     * @param solrServerName the name of the CoreContainer (value of the 
{@link SolrConstants#PROPERTY_SERVER_NAME})
+     * @param stc An optional {@link ServiceTrackerCustomizer} used for the 
tracking
+     * the {@link CoreContainer}
+     * @throws InvalidSyntaxException if the created {@link Filter} for the 
parsed name is invalid
+     */
+    public SolrServiceDispatchFilter(BundleContext context, String 
solrServerName,ServiceTrackerCustomizer stc) throws InvalidSyntaxException{
+        super();
+        if(context == null){
+            throw new IllegalArgumentException("The parsed BundleContext MUST 
NOT be NULL!");
+        }
+        this.context = context;
+        if(solrServerName == null || solrServerName.isEmpty()){
+            throw new IllegalArgumentException("The parsed SolrServer name 
MUST NOT be NULL nor empty!");
+        }
+        String filterString = String.format("(&(%s=%s)(%s=%s))",
+            Constants.OBJECTCLASS,CoreContainer.class.getName(),
+            SolrConstants.PROPERTY_SERVER_NAME,solrServerName);
+        filter = context.createFilter(filterString);
+    }
+    /**
+     * Creates a tracking Solr dispatch filter using the parsed filter to 
select
+     * services. Note that the filter MUST assure that all tracked services are
+     * {@link CoreContainer} instances!
+     * @param context the context
+     * @param filter the Filter that selects the {@link CoreContainer} service
+     * to be used for Request dispatching.
+     * the {@link CoreContainer}
+     */
+    public SolrServiceDispatchFilter(BundleContext context, Filter filter){
+        super();
+        if(context == null){
+            throw new IllegalArgumentException("The parsed BundleContext MUST 
NOT be NULL!");
+        }
+        this.context = context;
+        if(filter == null){
+            throw new IllegalArgumentException("The parsed Filter for tracking 
CoreContainer instances MUST NOT be NULL!");
+        }
+        this.filter = filter;
+    }
+    /**
+     * Creates a Dispatch filter for CoreContainer registered as OSGI services.
+     * In case more than one {@link CoreContainer} is available the one with 
the
+     * highest {@link Constants#SERVICE_RANKING} will be used. Instances with 
+     * no or the same Service rank are not sorted.
+     * @param context the context used to look for the CoreContainer
+     */
+    public SolrServiceDispatchFilter(BundleContext context){
+        super();
+        if(context == null){
+            throw new IllegalArgumentException("The parsed BundleContext MUST 
NOT be NULL!");
+        }
+        this.context = context;
+        this.filter = null;
+    }
+    @Override
+    protected CoreContainer getCoreContainer() {
+        ungetCoreContainer(); //unget the previouse used service
+        ServiceReference[] references;
+        try {
+            references = filter == null ? 
+                    
context.getServiceReferences(CoreContainer.class.getName(), null) :
+                        context.getServiceReferences(null, filter.toString());
+        } catch (InvalidSyntaxException e) {
+            references = null;
+            //can not be happen, because we created the filter already in the
+            //constructor and only need to parse it again because BundleContext
+            //is missing a Method to parse a Filter object when getting
+            //ServiceReferences
+        }
+        if(references == null || references.length == 0){
+            throw new IllegalStateException("Unable to find CoreContainer 
instance "+
+                (filter != null ? ("for filter"+filter.toString()) : "")+"!");
+        } else {
+            if(references.length > 1){
+                Arrays.sort(references, 
ServiceReferenceRankingComparator.INSTANCE);
+            }
+            this.coreContainerRef = references[0];
+        }
+        Object service = context.getService(coreContainerRef);
+        if(service instanceof CoreContainer){
+            return (CoreContainer)service;
+        } else {
+            throw new IllegalStateException("The parsed Filter '"+
+                filter.toString()+" selected a service '"+service+"'(class: "+
+                service.getClass().getName()+") that is not compatiple with "+
+                CoreContainer.class.getName()+"!");
+        }
+    }
+    @Override
+    protected void ungetCoreContainer() {
+        if(coreContainerRef != null){
+            context.ungetService(coreContainerRef);
+        }
+        coreContainerRef = null;
+    }
+
+}

Propchange: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/dispatch/SolrServiceDispatchFilter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java
 (added)
+++ 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,258 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.commons.solr.web.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.servlet.Filter;
+import javax.servlet.ServletException;
+
+import org.apache.felix.http.api.ExtHttpService;
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.servlet.SolrDispatchFilter;
+import org.apache.stanbol.commons.solr.SolrConstants;
+import 
org.apache.stanbol.commons.solr.web.dispatch.DelegatingSolrDispatchFilter;
+import 
org.apache.stanbol.commons.solr.web.utils.ServiceReferenceRankingComparator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Component that allows to configuer a {@link SolrDispatchFilter} for a 
+ * Solr {@link CoreContainer} running as OSGI service.
+ * @author Rupert Westenthaler
+ *
+ */
+@Component(
+    configurationFactory=true,
+    policy=ConfigurationPolicy.REQUIRE, //this requires the CoreContainer name
+    specVersion="1.1",
+    metatype = true,
+    immediate = true
+    )
+@Service(value=SolrDispatchFilterComponent.class)
+public class SolrDispatchFilterComponent {
+    
+    private final Logger log = 
LoggerFactory.getLogger(SolrDispatchFilterComponent.class);
+
+    @Property
+    public static final String PROPERTY_SERVER_NAME = 
"org.apache.stanbl.commons.solr.web.dispatchfilter.name";
+    
+    @Property
+    public static final String PROPERTY_PREFIX_PATH = 
"org.apache.stanbl.commons.solr.web.dispatchfilter.prefix";
+    
+    /**
+     * Will only work within Felix!
+     */
+    @Reference
+    protected ExtHttpService extHttpService;
+    
+    private ComponentContext context;
+    
+    private SolrDispatchFilter dispatchFilter;
+    private ServiceTracker tracker;
+    
+    private List<ServiceReference> coreContainerRefs = 
Collections.synchronizedList(new ArrayList<ServiceReference>());
+    
+    private CoreContainer coreContainer;
+    
+    private ServiceTrackerCustomizer trackerCustomizer = new 
ServiceTrackerCustomizer() {
+        
+        @Override
+        public void removedService(ServiceReference ref, Object service) {
+            synchronized (coreContainerRefs) {
+                coreContainerRefs.remove(ref);
+                if(service.equals(coreContainer)){
+                    if(!coreContainerRefs.isEmpty()){
+                        coreContainer = 
(CoreContainer)tracker.getService(coreContainerRefs.get(0));
+                    } else {
+                        coreContainer = null;
+                    }
+                    updateFilter(coreContainer);
+                } //else the remove does not affect the currently used 
CoreContainer
+            }
+            context.getBundleContext().ungetService(ref);
+        }
+        
+        @Override
+        public void modifiedService(ServiceReference ref, Object service) {
+            //maybe the serviceRanking was modified
+            if(coreContainerRefs.size()>1){
+                
Collections.sort(coreContainerRefs,SERVICE_REFERENCE_COMPARATOR);
+                Object bestService = 
tracker.getService(coreContainerRefs.get(0));
+                if(!bestService.equals(coreContainer)){
+                    coreContainer = (CoreContainer) bestService;
+                    updateFilter(coreContainer);
+                } //else ... no change needed
+            }// else -> property changes to the only registered CoreContainer
+            //are of no interest
+        }
+        
+        @Override
+        public Object addingService(ServiceReference ref) {
+            Object service = context.getBundleContext().getService(ref);
+            if(service instanceof CoreContainer){
+                coreContainerRefs.add(ref);
+                if(coreContainerRefs.size() > 1){
+                    
Collections.sort(coreContainerRefs,SERVICE_REFERENCE_COMPARATOR);
+                }
+                if(ref.equals(coreContainerRefs.get(0))){
+                    coreContainer = (CoreContainer)service;
+                    updateFilter(coreContainer);
+                }
+                return service;
+            } else { //wrong Filter used to track CoreConatiners!
+                throw new IllegalStateException("ServiceTracker selected 
Service "+
+                    service+" that is no instanceof CoreContainer! " +
+                    "Please report this on the STANBOL issue tracker of the " +
+                    "stanbol-dev mailing list or ");
+            }
+        }
+    };
+
+    /**
+     * This is the prefix the Servlet {@link Filter} is registerd (e.g. 
+     * '/solr/.*'
+     */
+    private String prefix;
+
+    /**
+     * The properties to be used when registering the Servlet {@link Filter}.
+     */
+    private Dictionary<String,Object> filterPrpoerties;
+
+    private static final Comparator<ServiceReference> 
SERVICE_REFERENCE_COMPARATOR = 
+        ServiceReferenceRankingComparator.INSTANCE;
+
+    protected String serverName;
+   
+    @Activate
+    protected void activate(ComponentContext context) throws 
ConfigurationException, ServletException {
+        this.context = context;
+        BundleContext bc = context.getBundleContext();
+        Object value = context.getProperties().get(PROPERTY_SERVER_NAME);
+        if(value == null || value.toString().isEmpty()) {
+            throw new ConfigurationException(PROPERTY_SERVER_NAME, "The 
configured CoreContainer name MUST NOT be NULL nor empty!");
+        }
+        serverName = value.toString();
+        String filterString = String.format("(&(%s=%s)(%s=%s))",
+            Constants.OBJECTCLASS,CoreContainer.class.getName(),
+            SolrConstants.PROPERTY_SERVER_NAME,serverName);
+        try {
+            tracker = new ServiceTracker(bc, bc.createFilter(filterString), 
trackerCustomizer);
+        } catch (InvalidSyntaxException e) {
+            throw new ConfigurationException(PROPERTY_SERVER_NAME, 
+                "Unable to build Filter for parsed CoreContainer name 
'"+serverName+"'",e);
+        }
+        value = context.getProperties().get(PROPERTY_PREFIX_PATH);
+        final String prefixPath;
+        if(value != null){
+            prefix = value.toString();
+            if(prefix.charAt(0) != '/'){
+                prefix = '/'+prefix;
+            }
+            prefixPath = prefix;
+            if(!prefix.endsWith("*")){ //TODO: check if this is a good idea
+                prefix = prefix+"/.*";
+            }
+        } else {
+            prefixPath = null;
+            prefix = "/.*";
+        }
+        filterPrpoerties = new Hashtable<String,Object>();
+        if(prefixPath != null){
+            filterPrpoerties.put("path-prefix", prefixPath);
+        }
+        //now start tracking! ...
+        //  ... as soon as the first CoreContainer is tracked the Filter will
+        //      be created and added to the ExtHttpService
+        tracker.open();
+    }
+    
+    /**
+     * A change was made to the tracked CoreContainer (adding ,removal, 
ranking change).
+     * This removes and re-add the Servlet filter to apply such changes.
+     */
+    protected void updateFilter(CoreContainer service) {
+        if(dispatchFilter != null){
+            extHttpService.unregisterFilter(dispatchFilter);
+            dispatchFilter = null;
+        }
+        if(service != null){
+            dispatchFilter = new SolrFilter(service);
+            try {
+                extHttpService.registerFilter(dispatchFilter, prefix, 
filterPrpoerties, 0, null);
+            } catch (ServletException e) {
+                throw new IllegalStateException("Unable to register 
SolrDispatchFilter for" +
+                               "CoreContainer with name"+serverName+" (prefix: 
"+
+                               prefix+"| properties: 
"+filterPrpoerties+").",e);
+            }
+            log.info("Add ServletFilter for SolrServer {} and prefix {}",
+                serverName,prefix);
+        }
+    }
+
+    @Deactivate
+    protected void deactivate(ComponentContext context){
+        updateFilter(null); //removes the filter
+        coreContainer = null;
+        serverName = null;
+        prefix = null;
+        filterPrpoerties = null;
+        
+        
+    }
+
+    private class SolrFilter extends DelegatingSolrDispatchFilter {
+
+        private CoreContainer server;
+        protected SolrFilter(CoreContainer server) {
+            super();
+            this.server = server;
+        }
+        @Override
+        protected CoreContainer getCoreContainer() {
+            return server;
+        }
+        @Override
+        protected void ungetCoreContainer() {
+            server = null;
+        }
+
+        
+    }
+    
+}

Propchange: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/impl/SolrDispatchFilterComponent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java
 (added)
+++ 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,44 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.stanbol.commons.solr.web.utils;
+
+import java.util.Comparator;
+
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Compares {@link ServiceReference}s based on the {@link 
Constants#SERVICE_RANKING}
+ * property value. Highest Rank will be listed first.
+ */
+public class ServiceReferenceRankingComparator implements 
Comparator<ServiceReference> {
+    
+    /**
+     * Singelton instance
+     */
+    public static ServiceReferenceRankingComparator INSTANCE = new 
ServiceReferenceRankingComparator();
+    @Override
+    public int compare(ServiceReference r1, ServiceReference r2) {
+        int ranking1,ranking2;
+        Integer tmp = (Integer)r1.getProperty(Constants.SERVICE_RANKING);
+        ranking1 = tmp != null ? tmp : 0;
+        tmp = (Integer)r2.getProperty(Constants.SERVICE_RANKING);
+        ranking2 = tmp != null ? tmp : 0;
+        return ranking2-ranking1; //highest rank first
+    }
+
+}

Propchange: 
incubator/stanbol/trunk/commons/solr/web/src/main/java/org/apache/stanbol/commons/solr/web/utils/ServiceReferenceRankingComparator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: 
incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml 
(original)
+++ incubator/stanbol/trunk/launchers/basebundlelist/src/main/bundles/list.xml 
Mon Oct 31 13:28:49 2011
@@ -338,11 +338,11 @@
       <artifactId>org.apache.stanbol.commons.solr.install</artifactId>
       <version>0.9.0-incubating-SNAPSHOT</version>
     </bundle>
-    <!-- bundle> See progress of STANBOL-353
+    <bundle>
       <groupId>org.apache.stanbol</groupId>
       <artifactId>org.apache.stanbol.commons.solr.web</artifactId>
       <version>0.9.0-incubating-SNAPSHOT</version>
-    </bundle -->
+    </bundle>
     <!-- support for JSON-LD -->
     <bundle>
       <groupId>org.apache.stanbol</groupId>

Modified: incubator/stanbol/trunk/launchers/full-war/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/pom.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full-war/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full-war/pom.xml Mon Oct 31 13:28:49 2011
@@ -111,6 +111,7 @@
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>
                                                
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config</exclude>
+                        
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config</exclude>
                                        </excludes>
                                </configuration>
                        </plugin>

Modified: 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README 
(original)
+++ incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/README 
Mon Oct 31 13:28:49 2011
@@ -20,4 +20,4 @@ resources/config/org.apache.stanbol.exam
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
 
resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config
 
resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config
-
+resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config

Added: 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/full-war/src/main/webapp/WEB-INF/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,2 @@
+org.apache.stanbl.commons.solr.web.dispatchfilter.prefix="/solr/default"
+org.apache.stanbl.commons.solr.web.dispatchfilter.name="default"

Modified: incubator/stanbol/trunk/launchers/full/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/pom.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/full/pom.xml Mon Oct 31 13:28:49 2011
@@ -116,6 +116,7 @@
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config</exclude>
+            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config</exclude>
           </excludes>
         </configuration>
       </plugin>      

Modified: incubator/stanbol/trunk/launchers/full/src/main/resources/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/src/main/resources/README?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/full/src/main/resources/README (original)
+++ incubator/stanbol/trunk/launchers/full/src/main/resources/README Mon Oct 31 
13:28:49 2011
@@ -16,6 +16,7 @@ limitations under the License.
 The following files are provided under the Apache License, Version 2.0:
 
 
resources/config/org.apache.stanbol.commons.solr.impl.DefaultSolrDirectoryManager.cfg
+resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 resources/config/org.apache.stanbol.examples.ExampleBootstrapConfig.cfg
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
 
resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config

Added: 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/full/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,2 @@
+org.apache.stanbl.commons.solr.web.dispatchfilter.prefix="/solr/default"
+org.apache.stanbl.commons.solr.web.dispatchfilter.name="default"

Added: 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/kres/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,2 @@
+org.apache.stanbl.commons.solr.web.dispatchfilter.prefix="/solr/default"
+org.apache.stanbl.commons.solr.web.dispatchfilter.name="default"

Modified: incubator/stanbol/trunk/launchers/stable/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/pom.xml?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/stable/pom.xml (original)
+++ incubator/stanbol/trunk/launchers/stable/pom.xml Mon Oct 31 13:28:49 2011
@@ -115,6 +115,7 @@
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config</exclude>
             
<exclude>src/main/resources/resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config</exclude>
+            
<exclude>src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config</exclude>
           </excludes>
         </configuration>
       </plugin>      

Modified: incubator/stanbol/trunk/launchers/stable/src/main/resources/README
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/src/main/resources/README?rev=1195450&r1=1195449&r2=1195450&view=diff
==============================================================================
--- incubator/stanbol/trunk/launchers/stable/src/main/resources/README 
(original)
+++ incubator/stanbol/trunk/launchers/stable/src/main/resources/README Mon Oct 
31 13:28:49 2011
@@ -20,4 +20,4 @@ resources/config/org.apache.stanbol.exam
 
resources/config/org.apache.stanbol.entityhub.core.impl.EntityhubConfigurationImpl.config
 
resources/config/org.apache.stanbol.enhancer.engines.entitytagging.impl.NamedEntityTaggingEngine-local.config
 
resources/config/org.apache.stanbol.entityhub.yard.solr.impl.SolrYard-entityhub.config
-
+resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
\ No newline at end of file

Added: 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config?rev=1195450&view=auto
==============================================================================
--- 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 (added)
+++ 
incubator/stanbol/trunk/launchers/stable/src/main/resources/resources/config/org.apache.stanbol.commons.solr.web.impl.SolrDispatchFilterComponent-default.config
 Mon Oct 31 13:28:49 2011
@@ -0,0 +1,2 @@
+org.apache.stanbl.commons.solr.web.dispatchfilter.prefix="/solr/default"
+org.apache.stanbl.commons.solr.web.dispatchfilter.name="default"


Reply via email to