OWB now working in the example

git-svn-id: https://svn.apache.org/repos/asf/myfaces/extensions/scripting/trunk@1309352 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/extscript-examples/cdi-example/pom.xml b/extscript-examples/cdi-example/pom.xml
index b9881e3..4055175 100644
--- a/extscript-examples/cdi-example/pom.xml
+++ b/extscript-examples/cdi-example/pom.xml
@@ -124,18 +124,33 @@
         </dependency>
 
         <dependency>
-           <groupId>org.apache.geronimo.specs</groupId>
-           <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-           <version>1.0</version>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+            <version>1.0</version>
 
-       </dependency>
+        </dependency>
 
-       <!-- javax.inject jsr 330 -->
-       <dependency>
-           <groupId>org.apache.geronimo.specs</groupId>
-           <artifactId>geronimo-atinject_1.0_spec</artifactId>
-           <version>1.0</version>
-       </dependency>
+        <!-- javax.inject jsr 330 -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
+            <version>1.0</version>
+            <!--scope>runtime</scope -->
+        </dependency>
+
+        <!-- apache compatible jta spec replacement jar -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>1.1.1</version>
+            <scope>compile</scope>
+        </dependency>
 
     </dependencies>
 </project>
diff --git a/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java b/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java
new file mode 100644
index 0000000..09810d3
--- /dev/null
+++ b/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java
@@ -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.myfaces.extension.scripting.cdi;
+
+import javax.inject.Named;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * Hello world CDI Java Bean for testing purposes
+ */
+@Named
+public class JavaHello
+{
+    String helloWorld = "Hello world from Java Bean";
+
+    public String getHelloWorld()
+    {
+        return helloWorld;
+    }
+
+    public void setHelloWorld(String helloWorld)
+    {
+        this.helloWorld = helloWorld;
+    }
+}
diff --git a/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
index 40e5079..0beb8c3 100644
--- a/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
+++ b/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
@@ -130,6 +130,10 @@
     Note, this servlet filter is vital without it Ext-Scripting will not work,
     if you do not set it you will get an appropriate warning in the command line
     -->
+    <listener>
+        <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    </listener>
+
 
     <!-- Listener, to allow Jetty serving MyFaces apps -->
     <listener>
diff --git a/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml b/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml
new file mode 100644
index 0000000..08e26b4
--- /dev/null
+++ b/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+        >
+<h:head>
+    <title>Hello World</title>
+</h:head>
+<h:body>
+    aaa
+    <h:outputText value="#{javaHello.helloWorld}" />
+    aaa
+</h:body>
+</html>