You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2005/07/05 20:44:53 UTC

svn commit: r209303 - in /cocoon/whiteboard/osgi: README bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java cocoon.sh init.xargs props.xargs

Author: danielf
Date: Tue Jul  5 11:44:52 2005
New Revision: 209303

URL: http://svn.apache.org/viewcvs?rev=209303&view=rev
Log:
At last got the cocoon_servlet to run, see README for the various limitations.

Added:
    cocoon/whiteboard/osgi/README   (with props)
Modified:
    cocoon/whiteboard/osgi/bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java
    cocoon/whiteboard/osgi/cocoon.sh   (contents, props changed)
    cocoon/whiteboard/osgi/init.xargs
    cocoon/whiteboard/osgi/props.xargs

Added: cocoon/whiteboard/osgi/README
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/osgi/README?rev=209303&view=auto
==============================================================================
--- cocoon/whiteboard/osgi/README (added)
+++ cocoon/whiteboard/osgi/README Tue Jul  5 11:44:52 2005
@@ -0,0 +1,84 @@
+To test the bundles here the following needs to be done:
+
+Building Cocoon trunk
+=====================
+
+The build system in whiteboard/osgi is not integrated with the build
+system in the trunk. As the OSGi bundles use results from building the
+trunk, the trunk must be build first. Furthermore the bundles
+currently has a number of shortcommings that requires some
+modification to trunk and care while building to get everyting to
+work.
+
+* The Cocoon trunk must be build without blocks,
+  "exclude.all.blocks=true", in local.blocks.properties, to avoid
+  class not found errors when trying the system.
+
+* The Cocoon bundle doesn't support directory access to sources due to
+  limitations in the bundle: protocol. To get the cocoon_webapp to
+  start the include patterns with wildecards must be commented away
+  from src/webapp/WEB-INF/cocoon.xconf and
+  src/webapp/WEB-INF/logkit.xconf. In cocoon.xconf the following line
+  must also be added:
+
+    <include src="context://WEB-INF/xconf/cocoon-blocks.xconf"/>
+
+  In  src/webapp/sitemap.xmap the mount-table match must be removed,
+  as the mount table isn't included in the webapp bundle.
+
+Building the bundles
+====================
+
+* Cocoon trunk is supposed to be at .../trunk, otherwise the
+  cocoon.trunk property must be changed in bundles/*/build.xml. (This
+  would better be handles with a COCOON_HOME environment variable).
+
+* All the bundles can be compiles by
+
+  $ ant
+
+  in the top directory, the bundles can also be build separetly by
+  running ant in the bundle/* sub directories. Ant must be version 1.6
+  or later, the ant bundled with trunk will do. The build scripts
+  require jakarta-bcel.jar to be present in $ANT_HOME/lib. The library
+  can be found in e.g. trunk/lib/endorsed.
+
+The Cocoon servlet
+==================
+
+* For testing the Cocoon servlet, execute "./cocoon.sh" which loads
+  (over http) and starts all needed bundles and start a OSGi
+  console. The options can be listed with "help". Point your browser
+  at http://localhost:8080.
+
+* If it doesn't work the Cocoon logs can be found in the work
+  directory. The startup logs and the bundle logs can be looked at in
+  the console: "enter log", "show", and "leave" to get back to the
+  main part of the console.
+
+* One exit the framework by writing "shutdown" in the console. OSGi
+  is supposed to be persistant after shutdown, so next time uyou start
+  it all the bundlles will allready be loaded and started. To reset
+  the framework the directory fwdir must be removed.
+
+* During bundle development one have to be carefull about respecting
+  the dependencies while stopping, updating andd starting bundles.
+
+The Junit testcases
+===================
+
+* Can be started by "enter junit", "run
+  org.apache.cocoon.test.components.blocks.BlocksManagerTestCase", but
+  it produces a painfull amount of debug messages and stacktraces, so
+  it can not be recomended ;)
+
+Bundles
+=======
+
+cocoon - contains cocoon.jar and all libraries it depnds on
+cocoon_webapp - contains the webapp samples from trunk
+cocoon_servlet - looks for the webapp bundle, creates the
+  CocoonServlet and register it in the http service.
+cocoon_testcase - creates the BlocksManager testcase and register it
+  in the junit service.
+

Propchange: cocoon/whiteboard/osgi/README
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/whiteboard/osgi/bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/osgi/bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java?rev=209303&r1=209302&r2=209303&view=diff
==============================================================================
--- cocoon/whiteboard/osgi/bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java (original)
+++ cocoon/whiteboard/osgi/bundles/cocoon_servlet/src/org/apache/cocoon/service/servlet/impl/Activator.java Tue Jul  5 11:44:52 2005
@@ -149,6 +149,7 @@
     
         try {
             Hashtable parameters = new Hashtable();
+            parameters.put("init-classloader", "true");
             parameters.put("work-directory", "work");
             http.registerServlet(SERVLET_ALIAS, new CocoonServlet(), parameters, context);
 

Modified: cocoon/whiteboard/osgi/cocoon.sh
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/osgi/cocoon.sh?rev=209303&r1=209302&r2=209303&view=diff
==============================================================================
--- cocoon/whiteboard/osgi/cocoon.sh (original)
+++ cocoon/whiteboard/osgi/cocoon.sh Tue Jul  5 11:44:52 2005
@@ -1,58 +1,58 @@
-#!/bin/sh
-#  Copyright 1999-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-# -----------------------------------------------------------------------------
-# Cocoon Unix Shell Script
-#
-# $Id$
-# -----------------------------------------------------------------------------
-
-# Configuration variables
-#
-# COCOON_HOME
-#   The root of the Cocoon distribution
-#
-# JAVA_HOME
-#   Home of Java installation.
-
-# ----- Verify and Set Required Environment Variables -------------------------
-
-if [ "$JAVA_HOME" = "" ] ; then
-  echo You must set JAVA_HOME to point at your Java Development Kit installation
-  exit 1
-fi
-
-if [ "$COCOON_HOME" = "" ] ; then
-  COCOON_HOME='../trunk'
-fi
-
-# ----- Set platform specific variables
-
-PATHSEP=":";
-case "`uname`" in
-   CYGWIN*) PATHSEP=";" ;;
-esac
-
-# ----- Set Local Variables ( used to minimize cut/paste) ---------------------
-
-JAVA="$JAVA_HOME/bin/java"
-ENDORSED_LIBS="$COCOON_HOME/lib/endorsed"
-ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
-
-# ----- Do the action ----------------------------------------------------------
-
-$JAVA $ENDORSED -jar framework.jar
-
-exit 0
+#!/bin/sh
+#  Copyright 1999-2004 The Apache Software Foundation
+#
+#  Licensed 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.
+#
+# -----------------------------------------------------------------------------
+# Cocoon Unix Shell Script
+#
+# $Id$
+# -----------------------------------------------------------------------------
+
+# Configuration variables
+#
+# COCOON_HOME
+#   The root of the Cocoon distribution
+#
+# JAVA_HOME
+#   Home of Java installation.
+
+# ----- Verify and Set Required Environment Variables -------------------------
+
+if [ "$JAVA_HOME" = "" ] ; then
+  echo You must set JAVA_HOME to point at your Java Development Kit installation
+  exit 1
+fi
+
+if [ "$COCOON_HOME" = "" ] ; then
+  COCOON_HOME='../trunk'
+fi
+
+# ----- Set platform specific variables
+
+PATHSEP=":";
+case "`uname`" in
+   CYGWIN*) PATHSEP=";" ;;
+esac
+
+# ----- Set Local Variables ( used to minimize cut/paste) ---------------------
+
+JAVA="$JAVA_HOME/bin/java"
+ENDORSED_LIBS="$COCOON_HOME/lib/endorsed"
+ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
+
+# ----- Do the action ----------------------------------------------------------
+
+$JAVA $ENDORSED -jar framework.jar
+
+exit 0

Propchange: cocoon/whiteboard/osgi/cocoon.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/osgi/cocoon.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: cocoon/whiteboard/osgi/init.xargs
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/osgi/init.xargs?rev=209303&r1=209302&r2=209303&view=diff
==============================================================================
--- cocoon/whiteboard/osgi/init.xargs (original)
+++ cocoon/whiteboard/osgi/init.xargs Tue Jul  5 11:44:52 2005
@@ -56,5 +56,4 @@
 -start http://www.knopflerfish.org/releases/1.3.3/jars/http/http_all-1.1.0.jar
 -start ../jars-external/junit/junit_all-1.0.0.jar
 -start cocoon_testcase/cocoon_testcase-1.0.0.jar
-
-
+-start cocoon_servlet/cocoon_servlet-1.0.0.jar

Modified: cocoon/whiteboard/osgi/props.xargs
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/osgi/props.xargs?rev=209303&r1=209302&r2=209303&view=diff
==============================================================================
--- cocoon/whiteboard/osgi/props.xargs (original)
+++ cocoon/whiteboard/osgi/props.xargs Tue Jul  5 11:44:52 2005
@@ -16,7 +16,7 @@
 # Various debug flags
 -Dorg.knopflerfish.framework.debug.packages=false
 -Dorg.knopflerfish.framework.debug.errors=true
--Dorg.knopflerfish.framework.debug.classloader=true
+-Dorg.knopflerfish.framework.debug.classloader=false
 -Dorg.knopflerfish.framework.debug.startlevel=false
 -Dorg.knopflerfish.framework.debug.ldap=false