cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r648331 - in /cocoon/trunk/subprojects/cocoon-jnet: ./ src/main/java/org/apache/cocoon/ src/main/java/org/apache/excalibur/source/ src/main/java/org/apache/excalibur/sourceresolve/jnet/ src/main/java/org/apache/excalibur/sourceresolve/jnet/...
Date Tue, 15 Apr 2008 17:04:11 GMT
Author: reinhard
Date: Tue Apr 15 10:04:02 2008
New Revision: 648331

URL: http://svn.apache.org/viewvc?rev=648331&view=rev
Log:
. remove everything but the JNet stuff
. Java 5 -> 1.4
. pom.xml updated
. svn:ignore

Removed:
    cocoon/trunk/subprojects/cocoon-jnet/rcl.properties
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/cocoon/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/source/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/xml/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/COB-INF/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/META-INF/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/aggregation/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/corona-servlet-1.0.xsd
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/error-handling/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/overview.html
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/read/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/sax-pipeline/
    cocoon/trunk/subprojects/cocoon-jnet/src/main/resources/xslt/
    cocoon/trunk/subprojects/cocoon-jnet/src/test/java/org/
Modified:
    cocoon/trunk/subprojects/cocoon-jnet/   (props changed)
    cocoon/trunk/subprojects/cocoon-jnet/pom.xml
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryInstaller.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
    cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java

Propchange: cocoon/trunk/subprojects/cocoon-jnet/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Apr 15 10:04:02 2008
@@ -2,3 +2,5 @@
 target
 .classpath
 .project
+.externalToolBuilders
+maven-eclipse.xml

Modified: cocoon/trunk/subprojects/cocoon-jnet/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/pom.xml?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/pom.xml (original)
+++ cocoon/trunk/subprojects/cocoon-jnet/pom.xml Tue Apr 15 10:04:02 2008
@@ -26,116 +26,61 @@
 
   <parent>
     <groupId>org.apache.cocoon</groupId>
-    <artifactId>corona-parent</artifactId>
-    <version>1-SNAPSHOT</version>
-    <relativePath>../parent/pom.xml</relativePath>
+    <artifactId>cocoon</artifactId>
+    <version>6-SNAPSHOT</version>
+    <relativePath>../../parent/pom.xml</relativePath>
   </parent>
 
-  <artifactId>corona-servlet</artifactId>
+  <artifactId>cocoon-jnet</artifactId>
   <version>1.0.0-SNAPSHOT</version>
-  <name>Cocoon Corona: Servlet [jar]</name>
-  <description>Using Cocoon Corona within the Servlet Service framework.</description>
+  <name>Cocoon: JNet</name>
+  <description>Dynamically register URLStreamHandler factories with your JVM.</description>
 
   <dependencies>
     <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>corona-sitemap</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>corona-controller</artifactId>
-    </dependency>
-
-<!-- 
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>corona-image</artifactId>
+      <groupId>org.apache.excalibur.components</groupId>
+      <artifactId>excalibur-sourceresolve</artifactId>
+      <optional>true</optional>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.avalon.framework</groupId>
+          <artifactId>avalon-framework-impl</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.avalon.logkit</groupId>
+          <artifactId>avalon-logkit</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
- -->
-
     <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-servlet-service-impl</artifactId>
+      <groupId>org.apache.excalibur.components</groupId>
+      <artifactId>excalibur-xmlutil</artifactId>
+      <optional>true</optional>
       <exclusions>
         <exclusion>
           <groupId>org.apache.excalibur.components</groupId>
-          <artifactId>excalibur-sourceresolve</artifactId>
+          <artifactId>excalibur-pool-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.excalibur.components</groupId>
+          <artifactId>excalibur-pool-impl</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.excalibur.components</groupId>
+          <artifactId>excalibur-store</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.excalibur.containerkit</groupId>
+          <artifactId>excalibur-instrument-api</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-spring-configurator</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjrt</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjweaver</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- Excalibur dependencies (Source Resolving) -->
-    <!-- tbd -->
-
+    <!-- Test dependencies -->
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.cocoon</groupId>
-        <artifactId>cocoon-maven-plugin</artifactId>
-        <configuration>
-          <webappProfile>ssf</webappProfile>
-          <!-- reloadingClassLoaderEnabled>false</reloadingClassLoaderEnabled-->
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.mortbay.jetty</groupId>
-        <artifactId>maven-jetty-plugin</artifactId>
-        <configuration>
-          <connectors>
-            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-              <port>8888</port>
-              <maxIdleTime>30000</maxIdleTime>
-            </connector>
-          </connectors>
-          <webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
-          <contextPath>/</contextPath>
-          <systemProperties>
-            <systemProperty>
-              <name>org.apache.cocoon.mode</name>
-              <value>dev</value>
-            </systemProperty>
-          </systemProperties>
-        </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestEntries>
-              <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
-            </manifestEntries>
-          </archive>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 
 </project>

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java
Tue Apr 15 10:04:02 2008
@@ -18,12 +18,13 @@
 
 import java.net.URLStreamHandler;
 import java.net.URLStreamHandlerFactory;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
 public class DynamicURLStreamHandlerFactory implements URLStreamHandlerFactory {
 
-    private static final ThreadLocal<List<URLStreamHandlerFactory>> FACTORIES
= new InheritableThreadLocal<List<URLStreamHandlerFactory>>();
+    private static final ThreadLocal FACTORIES = new InheritableThreadLocal();
 
     public static void pop() {
         getList().remove(0);
@@ -33,11 +34,11 @@
         getList().add(0, factory);
     }
 
-    private static List<URLStreamHandlerFactory> getList() {
-        List<URLStreamHandlerFactory> list = FACTORIES.get();
+    private static List getList() {
+        List list = (List) FACTORIES.get();
 
         if (list == null) {
-            list = new LinkedList<URLStreamHandlerFactory>();
+            list = new LinkedList();
             FACTORIES.set(list);
         }
 
@@ -46,16 +47,14 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see java.net.URLStreamHandlerFactory#createURLStreamHandler(java.lang.String)
      */
     public URLStreamHandler createURLStreamHandler(String protocol) {
-        System.out.println("DynamicURLStreamHandlerFactory.createURLStreamHandler(" + protocol
+ ")");
-        List<URLStreamHandlerFactory> list = getList();
+        List list = getList();
 
-        for (URLStreamHandlerFactory urlStreamHandlerFactory : list) {
-            System.out.println("DynamicURLStreamHandlerFactory calling " + urlStreamHandlerFactory);
-            URLStreamHandler handler = urlStreamHandlerFactory.createURLStreamHandler(protocol);
+        for (Iterator i = list.iterator(); i.hasNext();) {
+            URLStreamHandler handler = ((URLStreamHandlerFactory)i.next()).createURLStreamHandler(protocol);
 
             if (handler != null) {
                 return handler;

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryInstaller.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryInstaller.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryInstaller.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryInstaller.java
Tue Apr 15 10:04:02 2008
@@ -52,7 +52,8 @@
         // let's use reflection to get the field holding the factory
         final Field[] fields = URL.class.getDeclaredFields();
 
-        for (Field current : fields) {
+        for (int i = 0; i < fields.length; i++) {
+            Field current = fields[i];
             if (Modifier.isStatic(current.getModifiers()) && current.getType().equals(URLStreamHandlerFactory.class))
{
                 current.setAccessible(true);
                 return current;

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java
Tue Apr 15 10:04:02 2008
@@ -21,7 +21,7 @@
 
 public abstract class SourceFactoriesManager {
 
-    protected static final ThreadLocal<CompositeMap> FACTORIES = new InheritableThreadLocal<CompositeMap>();
+    protected static final ThreadLocal FACTORIES = new InheritableThreadLocal();
 
     protected static Map GLOBAL_FACTORIES;
 
@@ -31,7 +31,7 @@
 
     public static void pushFactories(Map factories) {
         // no need to synchronize as we use a thread local
-        CompositeMap factoryMap = FACTORIES.get();
+        CompositeMap factoryMap = (CompositeMap) FACTORIES.get();
         if (factoryMap == null) {
             factoryMap = new CompositeMap();
             FACTORIES.set(factoryMap);
@@ -41,7 +41,7 @@
 
     public static void popFactories() {
         // no need to synchronize as we use a thread local
-        CompositeMap factoryMap = FACTORIES.get();
+        CompositeMap factoryMap = (CompositeMap) FACTORIES.get();
         if (factoryMap != null) {
             factoryMap.popMap();
             if (factoryMap.getMapCount() == 0) {
@@ -53,7 +53,7 @@
     }
 
     public static synchronized Map getCurrentFactories() {
-        Map factories = FACTORIES.get();
+        Map factories = (Map) FACTORIES.get();
         if (factories == null) {
             factories = GLOBAL_FACTORIES;
             if (factories == null) {

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java
Tue Apr 15 10:04:02 2008
@@ -40,7 +40,6 @@
         this.xmlizable = x;
     }
 
-    @Override
     public void setHandler(ContentHandler handler) {
         if (!this.closed) {
             try {

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java
Tue Apr 15 10:04:02 2008
@@ -51,7 +51,6 @@
     /**
      * @see java.net.URLConnection#connect()
      */
-    @Override
     public void connect() throws IOException {
         if (this.source != null) {
             this.factory.release(this.source);
@@ -69,7 +68,6 @@
     /**
      * @see java.net.URLConnection#getInputStream()
      */
-    @Override
     public InputStream getInputStream() throws IOException {
         if (!this.connected) {
             this.connect();
@@ -83,7 +81,6 @@
      * @see java.net.URLConnection#addRequestProperty(java.lang.String,
      *      java.lang.String)
      */
-    @Override
     public void addRequestProperty(String arg0, String arg1) {
         this.setRequestProperty(arg0, arg1);
     }
@@ -91,7 +88,6 @@
     /**
      * @see java.net.URLConnection#getRequestProperties()
      */
-    @Override
     public Map getRequestProperties() {
         if (this.connected) {
             throw new IllegalStateException("Already connected");
@@ -105,7 +101,6 @@
     /**
      * @see java.net.URLConnection#getRequestProperty(java.lang.String)
      */
-    @Override
     public String getRequestProperty(String key) {
         if (this.connected) {
             throw new IllegalStateException("Already connected");
@@ -123,7 +118,6 @@
      * @see java.net.URLConnection#setRequestProperty(java.lang.String,
      *      java.lang.String)
      */
-    @Override
     public void setRequestProperty(String key, String value) {
         if (this.connected) {
             throw new IllegalStateException("Already connected");
@@ -144,12 +138,10 @@
     /**
      * @see java.net.URLConnection#getContentType()
      */
-    @Override
     public String getContentType() {
         return this.contentType;
     }
 
-    @Override
     public Object getContent(Class[] classes) throws IOException {
         if (!this.connected) {
             this.connect();

Modified: cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java?rev=648331&r1=648330&r2=648331&view=diff
==============================================================================
--- cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
(original)
+++ cocoon/trunk/subprojects/cocoon-jnet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java
Tue Apr 15 10:04:02 2008
@@ -21,7 +21,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.source.impl.FileSourceFactory;
 import org.apache.excalibur.sourceresolve.jnet.URLStreamHandlerFactoryInstaller;
 import org.apache.excalibur.sourceresolve.jnet.source.SourceFactoriesManager;
 import org.apache.excalibur.sourceresolve.jnet.source.SourceURLStreamHandlerFactory;
@@ -32,7 +32,7 @@
         try {
             URLStreamHandlerFactoryInstaller.setURLStreamHandlerFactory(new SourceURLStreamHandlerFactory());
             URLStreamHandlerFactoryInstaller.setURLStreamHandlerFactory(new SourceURLStreamHandlerFactory());
-            final Map<String, SourceFactory> factories = new HashMap<String, SourceFactory>();
+            final Map factories = new HashMap();
             factories.put("test", new FileSourceFactory());
             SourceFactoriesManager.setGlobalFactories(factories);
             final URL url = new URL("test:///F:/os/cocoon/trunk/pom.xml");



Mime
View raw message