You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/04/05 10:00:56 UTC

svn commit: r1309685 - in /myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main: java/org/apache/myfaces/extensions/scripting/cdi/api/ java/org/apache/myfaces/extensions/scripting/cdi/owb/ java/org/apache/myfaces/extensions/scr...

Author: werpu
Date: Thu Apr  5 08:00:56 2012
New Revision: 1309685

URL: http://svn.apache.org/viewvc?rev=1309685&view=rev
Log:
EXTSCRIPT-107: CDI Integration work started

Added:
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupExtension.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupServletContextListener.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Modified:
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainer.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/ContextControl.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContainerControl.java
    myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContextControl.java

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainer.java?rev=1309685&r1=1309684&r2=1309685&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainer.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainer.java Thu Apr  5 08:00:56 2012
@@ -1,21 +1,22 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   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
+ * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.myfaces.extensions.scripting.cdi.api;
 
 

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java?rev=1309685&r1=1309684&r2=1309685&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java Thu Apr  5 08:00:56 2012
@@ -1,21 +1,22 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   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
+ * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.myfaces.extensions.scripting.cdi.api;
 
 

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/ContextControl.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/ContextControl.java?rev=1309685&r1=1309684&r2=1309685&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/ContextControl.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/ContextControl.java Thu Apr  5 08:00:56 2012
@@ -1,21 +1,22 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   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
+ * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.myfaces.extensions.scripting.cdi.api;
 
 import javax.servlet.ServletContext;

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContainerControl.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContainerControl.java?rev=1309685&r1=1309684&r2=1309685&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContainerControl.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContainerControl.java Thu Apr  5 08:00:56 2012
@@ -1,21 +1,22 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   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
+ * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.myfaces.extensions.scripting.cdi.owb;
 
 import org.apache.myfaces.extensions.scripting.cdi.api.CdiContainer;

Modified: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContextControl.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContextControl.java?rev=1309685&r1=1309684&r2=1309685&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContextControl.java (original)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/owb/OpenWebBeansContextControl.java Thu Apr  5 08:00:56 2012
@@ -1,21 +1,22 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   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
+ * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
+
 package org.apache.myfaces.extensions.scripting.cdi.owb;
 
 import org.apache.myfaces.extensions.scripting.cdi.api.ContextControl;

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupExtension.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupExtension.java?rev=1309685&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupExtension.java (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupExtension.java Thu Apr  5 08:00:56 2012
@@ -0,0 +1,45 @@
+/*
+ * 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.extensions.scripting.cdi.startup;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
+import javax.enterprise.inject.spi.Extension;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *          <p/>
+ *          An extension for cdi which does the initial lifecycle
+ *          trigger from CDI instead of JSF since CDI is enabled
+ *          before JSF we have to do it that way
+ */
+
+public class StartupExtension implements Extension
+{
+    void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd)
+    {
+    }
+
+    void afterBeanDiscovery(@Observes AfterBeanDiscovery abd)
+    {
+    }
+}

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupServletContextListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupServletContextListener.java?rev=1309685&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupServletContextListener.java (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/startup/StartupServletContextListener.java Thu Apr  5 08:00:56 2012
@@ -0,0 +1,42 @@
+/*
+ * 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.extensions.scripting.cdi.startup;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+@WebListener
+public class StartupServletContextListener implements ServletContextListener
+{
+
+    public void contextInitialized(ServletContextEvent sce)
+    {
+    }
+
+    public void contextDestroyed(ServletContextEvent sce)
+    {
+    }
+}

Added: myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension?rev=1309685&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension (added)
+++ myfaces/extensions/scripting/trunk/extscript-core-root/extscript-cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension Thu Apr  5 08:00:56 2012
@@ -0,0 +1 @@
+org.apache.myfaces.extensions.scripting.cdi.startup.StartupExtension
\ No newline at end of file