You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by gp...@apache.org on 2012/02/28 21:03:26 UTC

git commit: DELTASPIKE-99 minor example refactoring

Updated Branches:
  refs/heads/master 2a7ebf908 -> de859888d


DELTASPIKE-99 minor example refactoring


Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/de859888
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/de859888
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/de859888

Branch: refs/heads/master
Commit: de859888d774f0b6ba686b7f578f4c47704053d5
Parents: 2a7ebf9
Author: gpetracek <gp...@apache.org>
Authored: Tue Feb 28 20:54:25 2012 +0100
Committer: gpetracek <gp...@apache.org>
Committed: Tue Feb 28 21:02:23 2012 +0100

----------------------------------------------------------------------
 deltaspike/examples/jse-examples/pom.xml           |  137 +++++++++++++++
 .../beanmanagement/SimpleBeanLookupExample.java    |  104 +++++++++++
 .../example/echo/DefaultEchoService.java           |   40 +++++
 .../deltaspike/example/echo/EchoService.java       |   33 ++++
 .../deltaspike/example/echo/NoEchoService.java     |   37 ++++
 .../example/echo/ToLowerCaseEchoService.java       |   37 ++++
 .../example/echo/ToUpperCaseEchoService.java       |   37 ++++
 .../NamingConventionAwareMetadataFilter.java       |   55 ++++++
 .../example/optional/OptionalService.java          |   26 +++
 .../src/main/resources/META-INF/beans.xml          |   23 +++
 .../services/javax.enterprise.inject.spi.Extension |   20 ++
 deltaspike/examples/jse-owb-examples/pom.xml       |  115 ------------
 .../beanmanagement/SimpleBeanLookupExample.java    |   97 ----------
 .../example/echo/DefaultEchoService.java           |   40 -----
 .../deltaspike/example/echo/EchoService.java       |   33 ----
 .../deltaspike/example/echo/NoEchoService.java     |   37 ----
 .../example/echo/ToLowerCaseEchoService.java       |   37 ----
 .../example/echo/ToUpperCaseEchoService.java       |   37 ----
 .../NamingConventionAwareMetadataFilter.java       |   55 ------
 .../example/optional/OptionalService.java          |   26 ---
 .../src/main/resources/META-INF/beans.xml          |   26 ---
 .../services/javax.enterprise.inject.spi.Extension |   20 --
 deltaspike/examples/pom.xml                        |    2 +-
 23 files changed, 550 insertions(+), 524 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/pom.xml b/deltaspike/examples/jse-examples/pom.xml
new file mode 100644
index 0000000..e57d929
--- /dev/null
+++ b/deltaspike/examples/jse-examples/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+<!--
+    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.
+-->
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.deltaspike.examples</groupId>
+        <artifactId>jse-examples-project</artifactId>
+        <version>0.2-incubating-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.deltaspike.examples</groupId>
+    <artifactId>deltaspike-jse-example</artifactId>
+
+    <name>Apache DeltaSpike Java-SE Examples</name>
+
+    <packaging>jar</packaging>
+
+    <profiles>
+        <profile>
+            <id>OWB</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>openwebbeans-impl</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>openwebbeans-spi</artifactId>
+                    <scope>compile</scope>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.apache.deltaspike.cdise</groupId>
+                    <artifactId>deltaspike-cdise-owb</artifactId>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>Weld</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.deltaspike.cdise</groupId>
+                    <artifactId>deltaspike-cdise-weld</artifactId>
+                    <scope>runtime</scope>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.jboss.weld.se</groupId>
+                    <artifactId>weld-se</artifactId>
+                    <version>${weld.version}</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- DeltaSpike modules -->
+        <dependency>
+            <groupId>org.apache.deltaspike.core</groupId>
+            <artifactId>deltaspike-core-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.deltaspike.core</groupId>
+            <artifactId>deltaspike-core-impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.deltaspike.modules</groupId>
+            <artifactId>deltaspike-security-module-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.deltaspike.modules</groupId>
+            <artifactId>deltaspike-security-module-impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Dependencies for Java-SE -->
+        <dependency>
+            <groupId>org.apache.deltaspike.cdise</groupId>
+            <artifactId>deltaspike-cdise-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+        <!-- TODO refactoring - this dependency shouldn't be needed -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
+

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
new file mode 100644
index 0000000..ffe224d
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
@@ -0,0 +1,104 @@
+/*
+ * 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.deltaspike.example.beanmanagement;
+
+import org.apache.deltaspike.cdise.api.CdiContainer;
+import org.apache.deltaspike.cdise.api.CdiContainerLoader;
+import org.apache.deltaspike.core.api.provider.BeanProvider;
+import org.apache.deltaspike.example.echo.DefaultEchoService;
+import org.apache.deltaspike.example.echo.EchoService;
+import org.apache.deltaspike.example.optional.OptionalService;
+
+import javax.enterprise.context.ApplicationScoped;
+import java.util.List;
+import java.util.logging.Logger;
+
+/**
+ * Example which illustrates the usage of {@inheritDoc BeanProvider}
+ */
+public class SimpleBeanLookupExample
+{
+    private static final Logger LOG = Logger.getLogger(SimpleBeanLookupExample.class.getName());
+
+    private SimpleBeanLookupExample()
+    {
+    }
+
+    /**
+     * Entry point
+     *
+     * @param args currently not used
+     */
+    public static void main(String[] args)
+    {
+
+        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
+        cdiContainer.bootContainer();
+        cdiContainer.startContext(ApplicationScoped.class);
+        //containerControl.startContexts();
+
+        //or:
+        //cdiContainer.start();
+
+        List<EchoService> echoServiceList = BeanProvider.getContextualReferences(EchoService.class, false);
+
+        for (EchoService echoService : echoServiceList)
+        {
+            LOG.info(echoService.echo("Hello CDI bean!"));
+        }
+
+        LOG.info("---");
+
+        echoServiceList = BeanProvider.getContextualReferences(EchoService.class, false, false);
+
+        for (EchoService echoService : echoServiceList)
+        {
+            LOG.info(echoService.echo("Hello non dependent CDI scoped bean!"));
+        }
+
+        LOG.info("---");
+
+        EchoService defaultEchoService = BeanProvider.getContextualReference(DefaultEchoService.class, false);
+
+        LOG.info(defaultEchoService.echo("Hello explicitly resolved CDI bean!"));
+
+        defaultEchoService = BeanProvider.getContextualReference("defaultEchoService", false, EchoService.class);
+
+        LOG.info(defaultEchoService.echo("Hello CDI bean resolved by name!"));
+
+        OptionalService optionalService = BeanProvider.getContextualReference(OptionalService.class, true);
+
+        if (optionalService == null)
+        {
+            LOG.info("No (optional) implementation found for " + OptionalService.class.getName());
+        }
+        else
+        {
+            LOG.severe("Unexpected implementation found: " + optionalService.getClass().getName());
+        }
+
+        cdiContainer.stop();
+
+        //or:
+        //containerControl.stopContexts();
+        //cdiContainer.shutdownContainer();
+
+        //cdiContainer.stopContext(ApplicationScoped.class); //doesn't work with weld right now - see WELD-1072
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
new file mode 100644
index 0000000..f111723
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
@@ -0,0 +1,40 @@
+/*
+ * 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.deltaspike.example.echo;
+
+import javax.enterprise.context.Dependent;
+import javax.inject.Named;
+
+/**
+ * Default implementation
+ */
+@Dependent
+@Named("DefaultEchoService")
+//will be changed to defaultEchoService by org.apache.deltaspike.example.metadata.NamingConventionAwareMetadataFilter
+public class DefaultEchoService implements EchoService
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String echo(String message)
+    {
+        return message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
new file mode 100644
index 0000000..7333e58
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
@@ -0,0 +1,33 @@
+/*
+ * 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.deltaspike.example.echo;
+
+/**
+ * Interface for the different kinds of echo-services
+ */
+public interface EchoService
+{
+    /**
+     * Returns the given text again - the format might change
+     *
+     * @param message given message
+     * @return message text
+     */
+    String echo(String message);
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
new file mode 100644
index 0000000..6a916b9
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
@@ -0,0 +1,37 @@
+/*
+ * 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.deltaspike.example.echo;
+
+import org.apache.deltaspike.core.api.exclude.Exclude;
+
+/**
+ * This implementation can't be used as CDI bean
+ */
+@Exclude
+public class NoEchoService implements EchoService
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String echo(String message)
+    {
+        return message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
new file mode 100644
index 0000000..2d123ad
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
@@ -0,0 +1,37 @@
+/*
+ * 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.deltaspike.example.echo;
+
+import javax.enterprise.context.ApplicationScoped;
+
+/**
+ * Implementation of {@link EchoService} which returns the given text in lower-case format
+ */
+@ApplicationScoped
+public class ToLowerCaseEchoService implements EchoService
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String echo(String message)
+    {
+        return message.toLowerCase();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
new file mode 100644
index 0000000..b9a20b7
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
@@ -0,0 +1,37 @@
+/*
+ * 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.deltaspike.example.echo;
+
+import javax.enterprise.context.ApplicationScoped;
+
+/**
+ * Implementation of {@link EchoService} which returns the given text in upper-case format
+ */
+@ApplicationScoped
+public class ToUpperCaseEchoService implements EchoService
+{
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String echo(String message)
+    {
+        return message.toUpperCase();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
new file mode 100644
index 0000000..18cd501
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
@@ -0,0 +1,55 @@
+/*
+ * 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.deltaspike.example.metadata;
+
+import org.apache.deltaspike.core.api.literal.NamedLiteral;
+import org.apache.deltaspike.core.api.metadata.builder.AnnotatedTypeBuilder;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+import javax.inject.Named;
+
+/**
+ * Just a test filter to show the basic functionality provided by {@link AnnotatedTypeBuilder}
+ */
+public class NamingConventionAwareMetadataFilter implements Extension
+{
+    public void ensureNamingConvention(@Observes ProcessAnnotatedType processAnnotatedType)
+    {
+        Class<?> beanClass = processAnnotatedType.getAnnotatedType().getJavaClass();
+
+        Named namedAnnotation = beanClass.getAnnotation(Named.class);
+        if (namedAnnotation != null &&
+                namedAnnotation.value().length() > 0 &&
+                Character.isUpperCase(namedAnnotation.value().charAt(0)))
+        {
+            AnnotatedTypeBuilder builder = new AnnotatedTypeBuilder();
+            builder.readFromType(beanClass);
+
+            String beanName = namedAnnotation.value();
+            String newBeanName = beanName.substring(0, 1).toLowerCase() + beanName.substring(1);
+
+            builder.removeFromClass(Named.class)
+                    .addToClass(new NamedLiteral(newBeanName));
+
+            processAnnotatedType.setAnnotatedType(builder.create());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
new file mode 100644
index 0000000..dc8ef6a
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.deltaspike.example.optional;
+
+/**
+ * Interface without implementation to show the lookup of optional implementations
+ */
+public interface OptionalService
+{
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/resources/META-INF/beans.xml b/deltaspike/examples/jse-examples/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..4070730
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/deltaspike/examples/jse-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
new file mode 100644
index 0000000..ea3d1f7
--- /dev/null
+++ b/deltaspike/examples/jse-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
@@ -0,0 +1,20 @@
+#####################################################################################
+# 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.
+#####################################################################################
+
+org.apache.deltaspike.example.metadata.NamingConventionAwareMetadataFilter
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/pom.xml b/deltaspike/examples/jse-owb-examples/pom.xml
deleted file mode 100644
index 10b72b6..0000000
--- a/deltaspike/examples/jse-owb-examples/pom.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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">
-<!--
-    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.
--->
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.deltaspike.examples</groupId>
-        <artifactId>jse-examples-project</artifactId>
-        <version>0.2-incubating-SNAPSHOT</version>
-    </parent>
-
-    <groupId>org.apache.deltaspike.examples</groupId>
-    <artifactId>deltaspike-jse-owb-example</artifactId>
-
-    <name>Apache DeltaSpike Java-SE/OpenWebBeans Examples</name>
-
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-impl</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-spi</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.deltaspike.core</groupId>
-            <artifactId>deltaspike-core-api</artifactId>
-            <version>0.2-incubating-SNAPSHOT</version>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.deltaspike.core</groupId>
-            <artifactId>deltaspike-core-impl</artifactId>
-            <version>0.2-incubating-SNAPSHOT</version>
-            <scope>runtime</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.deltaspike.modules</groupId>
-            <artifactId>deltaspike-security-module-api</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.deltaspike.modules</groupId>
-            <artifactId>deltaspike-security-module-impl</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- Dependencies for Java-SE -->
-        <dependency>
-            <groupId>org.apache.deltaspike.cdise</groupId>
-            <artifactId>deltaspike-cdise-api</artifactId>
-            <scope>compile</scope>
-        </dependency>
-
-        <!-- TODO Add profiles -->
-        <dependency>
-            <groupId>org.apache.deltaspike.cdise</groupId>
-            <artifactId>deltaspike-cdise-owb</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- TODO refactoring - this dependency shouldn't be needed -->
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-    </dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
deleted file mode 100644
index 2271310..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/beanmanagement/SimpleBeanLookupExample.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.deltaspike.example.beanmanagement;
-
-import org.apache.deltaspike.cdise.api.CdiContainer;
-import org.apache.deltaspike.cdise.api.CdiContainerLoader;
-import org.apache.deltaspike.core.api.provider.BeanProvider;
-import org.apache.deltaspike.example.echo.DefaultEchoService;
-import org.apache.deltaspike.example.echo.EchoService;
-import org.apache.deltaspike.example.optional.OptionalService;
-
-import javax.enterprise.context.ApplicationScoped;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Example which illustrates the usage of {@inheritDoc BeanProvider}
- */
-public class SimpleBeanLookupExample
-{
-    private static final Logger LOG = Logger.getLogger(SimpleBeanLookupExample.class.getName());
-
-    private SimpleBeanLookupExample()
-    {
-    }
-
-    /**
-     * Entry point
-     *
-     * @param args currently not used
-     */
-    public static void main(String[] args)
-    {
-
-        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
-        cdiContainer.bootContainer();
-        //containerControl.startContexts();
-        cdiContainer.startContext(ApplicationScoped.class);
-
-        List<EchoService> echoServiceList = BeanProvider.getContextualReferences(EchoService.class, false);
-
-        for (EchoService echoService : echoServiceList)
-        {
-            LOG.info(echoService.echo("Hello CDI bean!"));
-        }
-
-        LOG.info("---");
-
-        echoServiceList = BeanProvider.getContextualReferences(EchoService.class, false, false);
-
-        for (EchoService echoService : echoServiceList)
-        {
-            LOG.info(echoService.echo("Hello non dependent CDI scoped bean!"));
-        }
-
-        LOG.info("---");
-
-        EchoService defaultEchoService = BeanProvider.getContextualReference(DefaultEchoService.class, false);
-
-        LOG.info(defaultEchoService.echo("Hello explicitly resolved CDI bean!"));
-
-        defaultEchoService = BeanProvider.getContextualReference("defaultEchoService", false, EchoService.class);
-
-        LOG.info(defaultEchoService.echo("Hello CDI bean resolved by name!"));
-
-        OptionalService optionalService = BeanProvider.getContextualReference(OptionalService.class, true);
-
-        if (optionalService == null)
-        {
-            LOG.info("No (optional) implementation found for " + OptionalService.class.getName());
-        }
-        else
-        {
-            LOG.severe("Unexpected implementation found: " + optionalService.getClass().getName());
-        }
-
-        cdiContainer.stopContext(ApplicationScoped.class);
-        //containerControl.stopContexts();
-        cdiContainer.shutdownContainer();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
deleted file mode 100644
index f111723..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/DefaultEchoService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.deltaspike.example.echo;
-
-import javax.enterprise.context.Dependent;
-import javax.inject.Named;
-
-/**
- * Default implementation
- */
-@Dependent
-@Named("DefaultEchoService")
-//will be changed to defaultEchoService by org.apache.deltaspike.example.metadata.NamingConventionAwareMetadataFilter
-public class DefaultEchoService implements EchoService
-{
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String echo(String message)
-    {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
deleted file mode 100644
index 7333e58..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/EchoService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.deltaspike.example.echo;
-
-/**
- * Interface for the different kinds of echo-services
- */
-public interface EchoService
-{
-    /**
-     * Returns the given text again - the format might change
-     *
-     * @param message given message
-     * @return message text
-     */
-    String echo(String message);
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
deleted file mode 100644
index 6a916b9..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/NoEchoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.deltaspike.example.echo;
-
-import org.apache.deltaspike.core.api.exclude.Exclude;
-
-/**
- * This implementation can't be used as CDI bean
- */
-@Exclude
-public class NoEchoService implements EchoService
-{
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String echo(String message)
-    {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
deleted file mode 100644
index 2d123ad..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToLowerCaseEchoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.deltaspike.example.echo;
-
-import javax.enterprise.context.ApplicationScoped;
-
-/**
- * Implementation of {@link EchoService} which returns the given text in lower-case format
- */
-@ApplicationScoped
-public class ToLowerCaseEchoService implements EchoService
-{
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String echo(String message)
-    {
-        return message.toLowerCase();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
deleted file mode 100644
index b9a20b7..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/echo/ToUpperCaseEchoService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.deltaspike.example.echo;
-
-import javax.enterprise.context.ApplicationScoped;
-
-/**
- * Implementation of {@link EchoService} which returns the given text in upper-case format
- */
-@ApplicationScoped
-public class ToUpperCaseEchoService implements EchoService
-{
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String echo(String message)
-    {
-        return message.toUpperCase();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
deleted file mode 100644
index 18cd501..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/metadata/NamingConventionAwareMetadataFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.deltaspike.example.metadata;
-
-import org.apache.deltaspike.core.api.literal.NamedLiteral;
-import org.apache.deltaspike.core.api.metadata.builder.AnnotatedTypeBuilder;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.spi.Extension;
-import javax.enterprise.inject.spi.ProcessAnnotatedType;
-import javax.inject.Named;
-
-/**
- * Just a test filter to show the basic functionality provided by {@link AnnotatedTypeBuilder}
- */
-public class NamingConventionAwareMetadataFilter implements Extension
-{
-    public void ensureNamingConvention(@Observes ProcessAnnotatedType processAnnotatedType)
-    {
-        Class<?> beanClass = processAnnotatedType.getAnnotatedType().getJavaClass();
-
-        Named namedAnnotation = beanClass.getAnnotation(Named.class);
-        if (namedAnnotation != null &&
-                namedAnnotation.value().length() > 0 &&
-                Character.isUpperCase(namedAnnotation.value().charAt(0)))
-        {
-            AnnotatedTypeBuilder builder = new AnnotatedTypeBuilder();
-            builder.readFromType(beanClass);
-
-            String beanName = namedAnnotation.value();
-            String newBeanName = beanName.substring(0, 1).toLowerCase() + beanName.substring(1);
-
-            builder.removeFromClass(Named.class)
-                    .addToClass(new NamedLiteral(newBeanName));
-
-            processAnnotatedType.setAnnotatedType(builder.create());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java b/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
deleted file mode 100644
index dc8ef6a..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/java/org/apache/deltaspike/example/optional/OptionalService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.deltaspike.example.optional;
-
-/**
- * Interface without implementation to show the lookup of optional implementations
- */
-public interface OptionalService
-{
-}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/beans.xml b/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index ec7e07b..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-    <interceptors>
-        <class>org.apache.deltaspike.security.impl.SecurityInterceptor</class>
-    </interceptors>
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
----------------------------------------------------------------------
diff --git a/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
deleted file mode 100644
index ea3d1f7..0000000
--- a/deltaspike/examples/jse-owb-examples/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
+++ /dev/null
@@ -1,20 +0,0 @@
-#####################################################################################
-# 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.
-#####################################################################################
-
-org.apache.deltaspike.example.metadata.NamingConventionAwareMetadataFilter
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/de859888/deltaspike/examples/pom.xml
----------------------------------------------------------------------
diff --git a/deltaspike/examples/pom.xml b/deltaspike/examples/pom.xml
index c77f78f..957b89a 100644
--- a/deltaspike/examples/pom.xml
+++ b/deltaspike/examples/pom.xml
@@ -34,7 +34,7 @@
     <name>Apache DeltaSpike Examples</name>
 
     <modules>
-        <module>jse-owb-examples</module>
+        <module>jse-examples</module>
     </modules>
 
 </project>