You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2007/02/21 19:17:35 UTC
svn commit: r510133 - in
/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo: ./
src/main/java/demo/ src/main/resources/COB-INF/
src/main/resources/COB-INF/config/ src/main/resources/COB-INF/config/spring/
src/main/resources/META-INF/cocoon/spring/
Author: reinhard
Date: Wed Feb 21 10:17:34 2007
New Revision: 510133
URL: http://svn.apache.org/viewvc?view=rev&rev=510133
Log:
- create a scenario (injecting a global bean into a local bean and
than do a Spring context reload) that fails :-(
- better names for files
Added:
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java (with props)
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/LocalBean.java
- copied, changed from r509570, cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyBean.java
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml (with props)
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/global-application-context.xml
- copied, changed from r509570, cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml
Removed:
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyBean.java
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml
Modified:
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/pom.xml
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyGenerator.java
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/demo.js
cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/sitemap.xmap
Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/pom.xml?view=diff&rev=510133&r1=510132&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/pom.xml (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/pom.xml Wed Feb 21 10:17:34 2007
@@ -84,11 +84,11 @@
<artifactId>cocoon-servlet-service-components</artifactId>
<version>1.0.0-RC1-SNAPSHOT</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-forms-impl</artifactId>
<version>1.0.0-RC1-SNAPSHOT</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-template-impl</artifactId>
Added: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java?view=auto&rev=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java (added)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java Wed Feb 21 10:17:34 2007
@@ -0,0 +1,23 @@
+/*
+ * 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 demo;
+
+public class GlobalBean {
+
+ public String message = "This is a message coming from the global Bean!";
+
+}
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/GlobalBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/LocalBean.java (from r509570, cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyBean.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/LocalBean.java?view=diff&rev=510133&p1=cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyBean.java&r1=509570&p2=cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/LocalBean.java&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyBean.java (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/LocalBean.java Wed Feb 21 10:17:34 2007
@@ -16,9 +16,10 @@
*/
package demo;
-public class MyBean {
+public class LocalBean {
- public String message = "This is a message coming from a Spring bean!";
+ public String message = "This is a message coming from a local Spring bean!";
+ private GlobalBean globalBean;
public void setMessage(String message) {
this.message = message;
@@ -27,4 +28,9 @@
public String getMessage() {
return this.message;
}
+
+ public void setGlobalBean(GlobalBean globalBean) {
+ this.globalBean = globalBean;
+ }
+
}
Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyGenerator.java?view=diff&rev=510133&r1=510132&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyGenerator.java (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/java/demo/MyGenerator.java Wed Feb 21 10:17:34 2007
@@ -32,7 +32,7 @@
contentHandler.startElement("","body","body", new AttributesImpl());
//Change message to see the Reloading classloader working
- final char[] message = "generator!".toCharArray();
+ final char[] message = "generator!!!".toCharArray();
contentHandler.characters(message, 0, message.length);
contentHandler.endElement("","body","body");
Added: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml?view=auto&rev=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml (added)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml Wed Feb 21 10:17:34 2007
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
+ "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
+<!--
+ 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>
+ <bean id="local-bean" class="demo.LocalBean" scope="singleton">
+ <property name="message" value="This is a message coming from a Spring bean."/>
+ <property name="globalBean" ref="global-bean"/>
+ </bean>
+</beans>
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/config/spring/local-application-context.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/demo.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/demo.js?view=diff&rev=510133&r1=510132&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/demo.js (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/demo.js Wed Feb 21 10:17:34 2007
@@ -14,15 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-//
-// @version $Id: demo.js 448451 2006-09-21 04:04:16Z crossley $
-//
+/*
+ * @version $Id: demo.js 448451 2006-09-21 04:04:16Z crossley $
+ */
+
function demo() {
- var demoBean = cocoon.getComponent("demo");
+ var demoBean = cocoon.getComponent("local-bean");
cocoon.sendPage("screens/demo",
{
"message" : demoBean.message
}
);
-}
+}
\ No newline at end of file
Modified: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=510133&r1=510132&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/COB-INF/sitemap.xmap Wed Feb 21 10:17:34 2007
@@ -16,14 +16,11 @@
limitations under the License.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
- <map:components>
- <map:generators default="file">
- <map:generator logger="sitemap.generator.mygenerator" name="mygenerator" src="demo.MyGenerator"/>
- </map:generators>
- </map:components>
+
<map:flow language="javascript">
<map:script src="demo.js"/>
</map:flow>
+
<map:pipelines>
<map:pipeline>
<map:match pattern="demo">
@@ -39,4 +36,5 @@
</map:match>
</map:pipeline>
</map:pipelines>
+
</map:sitemap>
Copied: cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/global-application-context.xml (from r509570, cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/global-application-context.xml?view=diff&rev=510133&p1=cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml&r1=509570&p2=cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/global-application-context.xml&r2=510133
==============================================================================
--- cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/demo-application-context.xml (original)
+++ cocoon/trunk/tools/cocoon-rcl/cocoon-rcl-plugin-demo/src/main/resources/META-INF/cocoon/spring/global-application-context.xml Wed Feb 21 10:17:34 2007
@@ -18,7 +18,9 @@
limitations under the License.
-->
<beans>
- <bean id="demo" class="demo.MyBean" scope="singleton">
- <property name="message" value="This is a message coming from a Spring bean."/>
- </bean>
+
+ <bean name="org.apache.cocoon.generation.Generator/mygenerator" class="demo.MyGenerator"/>
+
+ <bean id="global-bean" class="demo.GlobalBean" scope="singleton"/>
+
</beans>