You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by bl...@apache.org on 2010/02/01 14:43:17 UTC

svn commit: r905282 - in /incubator/wink/trunk/wink-guice-server: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/wink/ src/main/java/org/apache/wink/guice/ src/main/java/org/apache/wink/guice/serv...

Author: bluk
Date: Mon Feb  1 13:43:17 2010
New Revision: 905282

URL: http://svn.apache.org/viewvc?rev=905282&view=rev
Log:
Add Google Guice enabled Apache Wink server

Initial implementation should be
functionally equivilant to the regular
Apache Wink server module except uses
Google Guice to do the injections of
resources.

See [WINK-250]

Added:
    incubator/wink/trunk/wink-guice-server/
    incubator/wink/trunk/wink-guice-server/pom.xml   (with props)
    incubator/wink/trunk/wink-guice-server/src/
    incubator/wink/trunk/wink-guice-server/src/main/
    incubator/wink/trunk/wink-guice-server/src/main/java/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java   (with props)
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java   (with props)
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java   (with props)
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/
    incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java   (with props)

Added: incubator/wink/trunk/wink-guice-server/pom.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/pom.xml?rev=905282&view=auto
==============================================================================
--- incubator/wink/trunk/wink-guice-server/pom.xml (added)
+++ incubator/wink/trunk/wink-guice-server/pom.xml Mon Feb  1 13:43:17 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>wink</artifactId>
+        <groupId>org.apache.wink</groupId>
+        <version>1.1-incubating-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.wink</groupId>
+    <artifactId>wink-guice-server</artifactId>
+    <name>Apache Wink Guice Server</name>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.wink</groupId>
+            <artifactId>wink-server</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject</groupId>
+            <artifactId>guice</artifactId>
+            <version>2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-j2ee_1.4_spec</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Propchange: incubator/wink/trunk/wink-guice-server/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java?rev=905282&view=auto
==============================================================================
--- incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java (added)
+++ incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java Mon Feb  1 13:43:17 2010
@@ -0,0 +1,39 @@
+/*
+ * 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.wink.guice.server.internal;
+
+import org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry;
+import org.apache.wink.guice.server.internal.lifecycle.GuiceInjectorLifeCycleManager;
+import org.apache.wink.guice.server.internal.lifecycle.WinkGuiceModule;
+import org.apache.wink.server.internal.DeploymentConfiguration;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class GuiceDeploymentConfiguration extends DeploymentConfiguration {
+
+    @SuppressWarnings("unchecked")
+    public GuiceDeploymentConfiguration() {
+        LifecycleManagersRegistry lifecycleManagersRegistry = new LifecycleManagersRegistry();
+        setOfFactoryRegistry(lifecycleManagersRegistry);
+        Injector injector = Guice.createInjector(new WinkGuiceModule());
+        lifecycleManagersRegistry.addFactoryFactory(new GuiceInjectorLifeCycleManager(injector));
+    }
+}

Propchange: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/GuiceDeploymentConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java?rev=905282&view=auto
==============================================================================
--- incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java (added)
+++ incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java Mon Feb  1 13:43:17 2010
@@ -0,0 +1,227 @@
+/*
+ * 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.wink.guice.server.internal.lifecycle;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.apache.wink.common.RuntimeContext;
+import org.apache.wink.common.internal.lifecycle.LifecycleManager;
+import org.apache.wink.common.internal.lifecycle.ObjectCreationException;
+import org.apache.wink.common.internal.lifecycle.ObjectFactory;
+import org.apache.wink.common.internal.registry.Injectable;
+import org.apache.wink.common.internal.registry.InjectableFactory;
+import org.apache.wink.common.internal.registry.metadata.ClassMetadata;
+import org.apache.wink.common.internal.registry.metadata.ConstructorMetadata;
+import org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector;
+import org.apache.wink.common.internal.registry.metadata.ResourceMetadataCollector;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.ProvisionException;
+
+public class GuiceInjectorLifeCycleManager<T> implements LifecycleManager<T> {
+
+    private final Injector injector;
+
+    public GuiceInjectorLifeCycleManager(Injector injector) {
+        this.injector = injector;
+    }
+
+    // private Logger logger =
+    // LoggerFactory.getLogger(GuiceInjectorLifeCycleManager.class);
+
+    public ObjectFactory<T> createObjectFactory(final T object) throws ObjectCreationException {
+        injector.injectMembers(object);
+        return new ObjectFactory<T>() {
+            public T getInstance(RuntimeContext context) {
+                return object;
+            }
+
+            @SuppressWarnings("unchecked")
+            public Class<T> getInstanceClass() {
+                return (Class<T>)object.getClass();
+            }
+        };
+    }
+
+    public ObjectFactory<T> createObjectFactory(final Class<T> clazz)
+        throws ObjectCreationException {
+        if (clazz == null) {
+            throw new NullPointerException("cls");
+        }
+
+        if (ResourceMetadataCollector.isDynamicResource(clazz)) {
+            // default factory cannot create instance of DynamicResource
+            throw new IllegalArgumentException(String
+                .format("Cannot create default factory for DynamicResource: %s", String
+                    .valueOf(clazz)));
+        }
+
+        if (ProviderMetadataCollector.isProvider(clazz)) {
+            // by default providers are singletons
+            return new GuiceSingletonObjectFactory<T>(clazz, injector);
+        }
+
+        if (ResourceMetadataCollector.isStaticResource(clazz)) {
+            // by default resources are prototypes (created per request)
+            return new GuicePrototypeObjectFactory<T>(clazz, injector);
+        }
+
+        // unknown object, should never reach this code
+        throw new IllegalArgumentException(String
+            .format("Cannot create default factory for class: %s", String.valueOf(clazz)));
+    }
+
+    private static class GuiceSingletonObjectFactory<T> implements ObjectFactory<T> {
+
+        private final ClassMetadata classMetadata;
+        private final boolean       isConstructorNoArgumentOrInject;
+        private final Injector      injector;
+        private final Class<T>      clazz;
+        private T                   instance;
+
+        public GuiceSingletonObjectFactory(Class<T> clazz, Injector injector) {
+            classMetadata = collectClassMetadata(clazz);
+            ConstructorMetadata constructorMetadata = classMetadata.getConstructor();
+            Constructor<?> constructor = constructorMetadata.getConstructor();
+            List<Injectable> formalParameters = constructorMetadata.getFormalParameters();
+            isConstructorNoArgumentOrInject =
+                formalParameters.size() == 0 || constructor.getAnnotation(Inject.class) != null;
+            this.injector = injector;
+            this.clazz = clazz;
+        }
+
+        @SuppressWarnings("unchecked")
+        public T getInstance(RuntimeContext context) {
+            if (instance != null) {
+                return instance;
+            }
+            try {
+                if (isConstructorNoArgumentOrInject) {
+                    try {
+                        instance = (T)injector.getInstance(clazz);
+                        return instance;
+                    } catch (ProvisionException e) {
+                        throw (Exception)e.getCause();
+                    }
+                }
+                instance = (T)createObject(classMetadata, context);
+                injector.injectMembers(instance);
+
+                return instance;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new ObjectCreationException(e);
+            }
+        }
+
+        public Class<T> getInstanceClass() {
+            return clazz;
+        }
+    }
+
+    private static class GuicePrototypeObjectFactory<T> implements ObjectFactory<T> {
+
+        private final ClassMetadata classMetadata;
+        private final boolean       isConstructorNoArgumentOrInject;
+        private final Injector      injector;
+        private final Class<T>      clazz;
+
+        public GuicePrototypeObjectFactory(Class<T> clazz, Injector injector) {
+            classMetadata = collectClassMetadata(clazz);
+            ConstructorMetadata constructorMetadata = classMetadata.getConstructor();
+            Constructor<?> constructor = constructorMetadata.getConstructor();
+            List<Injectable> formalParameters = constructorMetadata.getFormalParameters();
+            isConstructorNoArgumentOrInject =
+                formalParameters.size() == 0 || constructor.getAnnotation(Inject.class) != null;
+            this.injector = injector;
+            this.clazz = clazz;
+        }
+
+        @SuppressWarnings("unchecked")
+        public T getInstance(RuntimeContext context) {
+            try {
+                if (isConstructorNoArgumentOrInject) {
+                    try {
+                        return (T)injector.getInstance(clazz);
+                    } catch (ProvisionException e) {
+                        throw (Exception)e.getCause();
+                    }
+                }
+                T instance = (T)createObject(classMetadata, context);
+                injector.injectMembers(instance);
+
+                return instance;
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new ObjectCreationException(e);
+            }
+        }
+
+        public Class<T> getInstanceClass() {
+            return clazz;
+        }
+    }
+
+    private static <T> ClassMetadata collectClassMetadata(final Class<T> cls) {
+        ClassMetadata classMetadata = null;
+        if (ProviderMetadataCollector.isProvider(cls)) {
+            classMetadata = ProviderMetadataCollector.collectMetadata(cls);
+        } else if (ResourceMetadataCollector.isResource(cls)) {
+            classMetadata = ResourceMetadataCollector.collectMetadata(cls);
+        }
+
+        return classMetadata;
+    }
+
+    /**
+     * creates object (StaticResource or Provider) based on its ClassMetadata
+     * 
+     * @param metadata
+     * @param runtimeContext
+     * @return created object
+     */
+    static Object createObject(ClassMetadata metadata, RuntimeContext runtimeContext) {
+        try {
+            // use constructor to create a prototype
+            ConstructorMetadata constructorMetadata = metadata.getConstructor();
+            Constructor<?> constructor = constructorMetadata.getConstructor();
+            List<Injectable> formalParameters = constructorMetadata.getFormalParameters();
+            Object[] params =
+                InjectableFactory.getInstance().instantiate(formalParameters, runtimeContext);
+            Object object = constructor.newInstance(params);
+            return object;
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (InvocationTargetException e) {
+            Throwable targetException = e.getTargetException();
+            if (targetException instanceof RuntimeException) {
+                throw (RuntimeException)targetException;
+            }
+            throw new ObjectCreationException(targetException);
+        } catch (Exception e) {
+            throw new ObjectCreationException(e);
+        }
+    }
+}

Propchange: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/GuiceInjectorLifeCycleManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java?rev=905282&view=auto
==============================================================================
--- incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java (added)
+++ incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java Mon Feb  1 13:43:17 2010
@@ -0,0 +1,93 @@
+/*
+ * 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.wink.guice.server.internal.lifecycle;
+
+import java.io.IOException;
+import java.security.PrivilegedActionException;
+
+import org.apache.wink.common.internal.i18n.Messages;
+import org.apache.wink.common.internal.lifecycle.CreationUtils;
+import org.apache.wink.common.internal.lifecycle.ObjectCreationException;
+import org.apache.wink.common.internal.registry.metadata.ClassMetadata;
+import org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector;
+import org.apache.wink.common.internal.registry.metadata.ResourceMetadataCollector;
+import org.apache.wink.common.internal.runtime.RuntimeContextTLS;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.MembersInjector;
+import com.google.inject.TypeLiteral;
+import com.google.inject.matcher.Matchers;
+import com.google.inject.spi.TypeEncounter;
+import com.google.inject.spi.TypeListener;
+
+public class WinkGuiceModule extends AbstractModule {
+
+    @Override
+    protected void configure() {
+        bindListener(Matchers.any(), new TypeListener() {
+
+            public <I> void hear(TypeLiteral<I> typeLiteral, TypeEncounter<I> encounter) {
+                ClassMetadata classMetaData = collectClassMetadata(typeLiteral.getRawType());
+                if (classMetaData == null) {
+                    return;
+                }
+                if (classMetaData.getInjectableFields().size() > 0) {
+                    encounter.register(new JAXRSInjector<I>(classMetaData));
+                }
+            }
+        });
+    }
+
+    static class JAXRSInjector<T> implements MembersInjector<T> {
+        private final Logger        logger = LoggerFactory.getLogger(JAXRSInjector.class);
+
+        private final ClassMetadata classMetaData;
+
+        public JAXRSInjector(ClassMetadata classMetaData) {
+            this.classMetaData = classMetaData;
+        }
+
+        public void injectMembers(T instance) {
+            try {
+                CreationUtils.injectFields(instance, classMetaData, RuntimeContextTLS.getRuntimeContext());
+            } catch (IOException e) {
+                logger.error(Messages.getMessage("injectionFailureSingleton"), instance.getClass());
+                throw new ObjectCreationException(e);
+            } catch (PrivilegedActionException e) {
+                logger.error(Messages.getMessage("injectionFailureSingleton"), instance.getClass());
+                throw new ObjectCreationException(e);
+            }
+        }
+    }
+
+    private static <T> ClassMetadata collectClassMetadata(final Class<T> cls) {
+        ClassMetadata classMetadata = null;
+        if (ProviderMetadataCollector.isProvider(cls)) {
+            classMetadata = ProviderMetadataCollector.collectMetadata(cls);
+        } else if (ResourceMetadataCollector.isResource(cls)) {
+            classMetadata = ResourceMetadataCollector.collectMetadata(cls);
+        }
+
+        return classMetadata;
+    }
+
+}

Propchange: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/lifecycle/WinkGuiceModule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java?rev=905282&view=auto
==============================================================================
--- incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java (added)
+++ incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java Mon Feb  1 13:43:17 2010
@@ -0,0 +1,56 @@
+/*
+ * 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.wink.guice.server.internal.servlet;
+
+import org.apache.wink.common.internal.i18n.Messages;
+import org.apache.wink.common.internal.utils.ClassUtils;
+import org.apache.wink.guice.server.internal.GuiceDeploymentConfiguration;
+import org.apache.wink.server.internal.DeploymentConfiguration;
+import org.apache.wink.server.internal.servlet.RestServlet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GuiceRestServlet extends RestServlet {
+
+    private static final String DEPLYMENT_CONF_PARAM = "deploymentConfiguration";
+
+    private static final Logger logger               =
+                                                         LoggerFactory
+                                                             .getLogger(GuiceRestServlet.class);
+
+    private static final long   serialVersionUID     = -1920970727031271538L;
+
+    @Override
+    protected DeploymentConfiguration createDeploymentConfiguration()
+        throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+        String initParameter = getInitParameter(DEPLYMENT_CONF_PARAM);
+        if (initParameter != null) {
+            logger.info(Messages.getMessage("restServletUseDeploymentConfigurationParam"),
+                        initParameter,
+                        DEPLYMENT_CONF_PARAM);
+            // use ClassUtils.loadClass instead of Class.forName so we have
+            // classloader visibility into the Web module in J2EE environments
+            Class<?> confClass = ClassUtils.loadClass(initParameter);
+            return (DeploymentConfiguration)confClass.newInstance();
+        }
+        return new GuiceDeploymentConfiguration();
+    }
+
+}

Propchange: incubator/wink/trunk/wink-guice-server/src/main/java/org/apache/wink/guice/server/internal/servlet/GuiceRestServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native