cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r524407 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon: components/web3/ components/web3/impl/ transformation/
Date Sat, 31 Mar 2007 10:59:29 GMT
Author: joerg
Date: Sat Mar 31 03:59:28 2007
New Revision: 524407

URL: http://svn.apache.org/viewvc?view=rev&rev=524407
Log:
clean ups (should not change anything in behaviour)

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Client.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3DataSource.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Streamer.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/DefaultWeb3StreamerImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3ClientImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/transformation/Web3RfcTransformer.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -24,13 +24,13 @@
  * @version CVS $Id$
  */
 public interface Web3 {
-    
+
     String URI                 = "http://apache.org/cocoon/Web3-Rfc/1.0";
 
     String INCLUDE_ELEM        = "include";
     String INCLUDE_NAME_ATTR   = "name";
     String INCLUDE_CLASS_ATTR  = "streamer";
-    
+
     String IMPORT_ELEM         = "import";
     String EXPORT_ELEM         = "export";
     String TABLES_ELEM         = "tables";

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Client.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Client.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Client.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Client.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -30,24 +30,24 @@
  * @version CVS $Id$
  */
 public interface Web3Client extends Component {
-    
-    String ROLE = "org.apache.cocoon.components.web3.Web3Client";
-    
+
+    String ROLE = Web3Client.class.getName();
+
     /**
      * Releases the Connection to the backend
      */
     void releaseClient ();
-    
+
     /**
      * Initialize the client
      */
     void initClient (Client client);
-    
+
     /**
      * Get a Client Repository
      */
     IRepository getRepository ();
-    
+
     /**
      * Execute an Abab function
      */

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3DataSource.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3DataSource.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3DataSource.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3DataSource.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -33,12 +33,12 @@
 public interface Web3DataSource extends Configurable, Initializable, Disposable,
                                         Serviceable {
         
-    String ROLE = "org.apache.cocoon.components.web3.Web3DataSource";
-    
+    String ROLE = Web3DataSource.class.getName();
+
     /**
      * Gets the Connection to the backend
      */
     Web3Client getWeb3Client() throws Exception;
-    
+
     void releaseWeb3Client( Web3Client client );
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Streamer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Streamer.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Streamer.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/Web3Streamer.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -32,8 +32,8 @@
  */
 public interface Web3Streamer extends Component {
 
-    String ROLE = "org.apache.cocoon.components.web3.Web3Streamer";
-    
+    String ROLE = Web3Streamer.class.getName();
+
     void stream(JCO.Function function, 
         ContentHandler contentHandler) throws SAXException;
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/DefaultWeb3StreamerImpl.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/DefaultWeb3StreamerImpl.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/DefaultWeb3StreamerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/DefaultWeb3StreamerImpl.java
Sat Mar 31 03:59:28 2007
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.cocoon.components.web3.impl;
 
 import com.sap.mw.jco.JCO;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3ClientImpl.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3ClientImpl.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3ClientImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3ClientImpl.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -16,22 +16,22 @@
  */
 package org.apache.cocoon.components.web3.impl;
 
-import org.apache.cocoon.components.web3.Web3Client;
+import java.net.URL;
+import java.util.Date;
+import java.util.Properties;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.excalibur.pool.Recyclable;
 import org.apache.avalon.excalibur.pool.Poolable;
+import org.apache.avalon.excalibur.pool.Recyclable;
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
 
-import com.sap.mw.jco.JCO;
-import com.sap.mw.jco.IRepository;
+import org.apache.cocoon.components.web3.Web3Client;
 
-import java.net.URL;
-import java.util.Properties;
-import java.util.Date;
+import com.sap.mw.jco.IRepository;
+import com.sap.mw.jco.JCO;
 
 /**
- * The standard interface for R3Clients in Web3.
+ * TBD
  *
  * @author <a href="mailto:michael.gerzabek@at.efp.cc">Michael Gerzabek</a>
  * @since 2.1
@@ -40,23 +40,23 @@
 public class Web3ClientImpl extends AbstractLogEnabled 
 implements Web3Client, Disposable, Recyclable, Poolable {
 
-    protected JCO.Client client = null;
-    protected String repository = null;
-        
+    protected JCO.Client client;
+    protected String repository;
+
     public void initClient(JCO.Client client) {
         this.client = client;
         this.repository = "" + (new Date ()).getTime();
     }
-    
+
     public void releaseClient() {
         JCO.releaseClient(this.client);
         this.client = null;
-    }
-    
-    public void dispose() {
-        this.client = null;
         this.repository = null;
     }
+
+    public void recycle() { }
+    
+    public void dispose() { }
     
     public IRepository getRepository() {
         if (null != this.repository) {
@@ -64,15 +64,15 @@
         }
         return null;
     }
-    
+
     public void abort(String message) {
         this.client.abort (message);
     }
-    
+
     public Object clone() {
         return null;
     }
-    
+
     public void confirmTID(String tid) {
         this.client.confirmTID (tid);
     }
@@ -80,11 +80,11 @@
     public void connect() {
         this.client.connect ();
     }
-    
+
     public String createTID() {
         return this.client.createTID ();
     }
-    
+
     public void disconnect() {
         this.client.disconnect ();
     }
@@ -92,51 +92,51 @@
     public void execute(JCO.Function function) {
         this.client.execute (function);
     }
-    
+
     public void execute(JCO.Function function, String tid) {
         this.client.execute (function, tid);
     }
-    
+
     public void execute(JCO.Function function, String tid, String queue_name) { 
         this.client.execute (function, tid, queue_name);
     }
-    
+
     public void execute(JCO.Function function, String tid, 
                         String queue_name, int queue_pos) {
         this.client.execute (function, tid, queue_name, queue_pos);
     }
-    
+
     public void execute(String name, JCO.ParameterList input, 
                         JCO.ParameterList output) {
         this.client.execute (name, input, output);
     }
-    
+
     public void execute(String name, JCO.ParameterList input, 
                         JCO.ParameterList output, JCO.ParameterList tables) {
         this.client.execute (name, input, output, tables);
     }
-    
+
     public void execute(String name, JCO.ParameterList input, 
                         JCO.ParameterList tables, String tid) {
         this.client.execute (name, input, tables, tid);
     }
-    
+
     public void execute(java.lang.String name, JCO.ParameterList input, 
                         JCO.ParameterList tables, String tid, 
                         String queue_name) {
         this.client.execute (name, input, tables, tid, queue_name);
     }
-    
+
     public void execute(java.lang.String name, JCO.ParameterList input, 
                         JCO.ParameterList tables, String tid, 
                         String queue_name, int queue_pos) {
         this.client.execute (name, input, tables, tid, queue_name, queue_pos);
     }
-    
+
     public boolean getAbapDebug() {
         return this.client.getAbapDebug ();
     }
-    
+
     public String getASHost() {
         return this.client.getASHost ();
     }
@@ -144,15 +144,15 @@
     public JCO.Attributes getAttributes() {
         return this.client.getAttributes ();
     }
-    
+
     public String getClient() {
         return this.client.getClient ();
     }
-    
+
     public String getGroup() {
         return this.client.getGroup ();
     }
-    
+
     public String getGWHost() {
         return this.client.getGWHost ();
     }
@@ -160,15 +160,15 @@
     public String getGWServ() {
         return this.client.getGWServ ();
     }
-    
+
     public String getLanguage() {
         return this.client.getLanguage ();
     }
-    
+
     public String getMSHost() {
         return this.client.getMSHost ();
     }
-    
+
     public String[][] getPropertyInfo() {
         return this.client.getPropertyInfo ();
     }
@@ -244,10 +244,5 @@
     public void setThroughput(JCO.Throughput throughput) {
         this.client.setThroughput (throughput);
     }   
-    
-    public void recycle() {
-        this.client = null;
-        this.repository = null;
-    }
     
 }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceImpl.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceImpl.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceImpl.java
Sat Mar 31 03:59:28 2007
@@ -5,9 +5,9 @@
  * 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.
@@ -41,10 +41,10 @@
 public class Web3DataSourceImpl extends AbstractLogEnabled
 implements Web3DataSource, ThreadSafe {
 
-    protected Web3Properties properties = null;
+    protected Web3Properties properties;
     protected int            poolsize = 0;
     protected int            current_clients = 0;
-    protected String         mySID = null;
+    protected String         mySID;
 
     protected boolean        trace = false;
     protected int            level = 0;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3DataSourceSelectorImpl.java
Sat Mar 31 03:59:28 2007
@@ -24,21 +24,20 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.LogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 
+import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.components.web3.Web3DataSource;
 import org.apache.cocoon.util.ClassUtils;
 
 import EDU.oswego.cs.dl.util.concurrent.Mutex;
 
 /**
- * The Default implementation for R3DataSources in Web3.  This uses the
- * normal <code>com.sap.mw.jco.JCO</code> classes.
+ * TBD
  *
  * @author <a href="mailto:michael.gerzabek@at.efp.cc">Michael Gerzabek</a>
  * @since 2.1
@@ -113,12 +112,7 @@
                             true,
                             ClassUtils.getClassLoader());
                     pool = (Web3DataSource) theClass.newInstance();
-                    if (pool instanceof LogEnabled) {
-                        ((LogEnabled) pool).enableLogging(getLogger());
-                    }
-                    pool.service(this.manager);
-                    pool.configure(c);
-                    pool.initialize();
+                    LifecycleHelper.setupComponent(pool, getLogger(), null, this.manager,
c);
                     Web3DataSourceSelectorImpl.pools.put(obj, pool);
                 }
             }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java
Sat Mar 31 03:59:28 2007
@@ -5,16 +5,15 @@
  * 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.cocoon.components.web3.impl;
 
 import java.util.Properties;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/transformation/Web3RfcTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/transformation/Web3RfcTransformer.java?view=diff&rev=524407&r1=524406&r2=524407
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/transformation/Web3RfcTransformer.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/transformation/Web3RfcTransformer.java
Sat Mar 31 03:59:28 2007
@@ -5,16 +5,15 @@
  * 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.cocoon.transformation;
 
 import java.util.HashMap;
@@ -27,6 +26,7 @@
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
@@ -53,52 +53,46 @@
 implements Serviceable, Disposable, Configurable, Poolable, Recyclable {
     
     /** The service manager instance */
-    protected ServiceManager  manager             = null;
-    protected Web3DataSource    web3source          = null;
+    protected ServiceManager    manager;
+    protected Web3DataSource    web3source;
     
-    protected Web3Client        connection          = null;
-    protected JCO.Repository    repository          = null;
-    protected IFunctionTemplate functionT           = null;
-    protected JCO.Function      function            = null;
-    protected JCO.ParameterList importParameterList = null;
-    protected JCO.ParameterList tablesParameterList = null;
-    protected JCO.Record        theRecord           = null;
-    protected JCO.Field         fillMe              = null;
+    protected Web3Client        connection;
+    protected JCO.Repository    repository;
+    protected IFunctionTemplate functionT;
+    protected JCO.Function      function;
+    protected JCO.ParameterList importParameterList;
+    protected JCO.ParameterList tablesParameterList;
+    protected JCO.Record        theRecord;
+    protected JCO.Field         fillMe;
     
     protected AttributesImpl    attributes          = new AttributesImpl();
     protected int               startcount          = 0;
     protected boolean           error               = false;
-    protected String            backend             = null;
-    protected String            default_backend     = null;
-    protected String            streamer            = null;
+    protected String            backend;
+    protected String            default_backend;
+    protected String            streamer;
     protected HashMap           tags                = new HashMap();
-    
+
+    public void configure(final Configuration configuration) throws ConfigurationException
{
+        this.default_backend = configuration.getChild("system").getValue(null);
+    }
+
+    public void service(ServiceManager manager) throws ServiceException {
+        this.manager = manager;
+        initTags();
+    }
+
     public void setup(SourceResolver resolver, Map objectModel,
-                    String source, Parameters parameters) 
-    throws SAXException {
-        
+                      String source, Parameters parameters) throws SAXException {
         try {
-            backend = parameters.getParameter("system");
+            this.backend = parameters.getParameter("system");
         }
         catch (Exception x) {
-            if ( null == backend ) {
-                getLogger().warn("No backend configured! Try to use configuration");
-                backend = default_backend;
-            }
+            getLogger().warn("No backend configured! Try to use configuration");
+            this.backend = this.default_backend;
         }
     }
 
-    public void service(ServiceManager manager) {
-        this.manager = manager;
-        initTags();
-    }
-    
-    public void configure(final Configuration configuration)
-        throws ConfigurationException {
-            
-        this.default_backend = configuration.getChild("system").getValue(null);
-    }
-     
     public void recycle() {
         this.connection            = null;
         this.repository            = null;
@@ -123,33 +117,10 @@
     }
     
     /**
-    * Receive notification of the beginning of a document.
-    */
-    public void startDocument() 
-    throws SAXException {
-        
-        if ( null != super.contentHandler ) {
-            super.contentHandler.startDocument();
-        }    
-    }
-
-    /**
-    * Receive notification of the end of a document.
-    */
-    public void endDocument() 
-    throws SAXException {
-
-        if ( null != super.contentHandler) {
-            super.contentHandler.endDocument();
-        }  
-    }
-
-    /**
     * Receive notification of the beginning of an element.
     */
     public void startElement(String uri, String loc, String raw, Attributes a)
-        throws SAXException {    
-            
+        throws SAXException {
         if ( Web3.URI.equals( uri ) && !this.error ) { 
             switch ( Integer.parseInt( (String) this.tags.get( loc ))) {
                 case INCLUDE_ELEM: 
@@ -172,13 +143,13 @@
                         getLogger().error (error, ex);   
                         
                         error = ex.getMessage();
-                        attributes.clear();
-                        super.contentHandler.startElement(uri, loc, raw, a);            
   
-                        super.contentHandler.startElement(uri, Web3.PROCESSING_X_ELEM, 
-                            Web3.PROCESSING_X_ELEM, attributes);
-                        super.contentHandler.characters(error.toCharArray(), 0, 
+                        this.attributes.clear();
+                        super.startElement(uri, loc, raw, a);                
+                        super.startElement(uri, Web3.PROCESSING_X_ELEM, 
+                            Web3.PROCESSING_X_ELEM, this.attributes);
+                        super.characters(error.toCharArray(), 0, 
                             error.length());
-                        super.contentHandler.endElement(uri, Web3.PROCESSING_X_ELEM, 
+                        super.endElement(uri, Web3.PROCESSING_X_ELEM, 
                             Web3.PROCESSING_X_ELEM);
                         this.error = true;
                     } 
@@ -220,16 +191,15 @@
                     getLogger().error("Invalid element " + loc);
             }
         } 
-        else if (super.contentHandler != null) {
-            super.contentHandler.startElement(uri, loc, raw, a);
+        else {
+            super.startElement(uri, loc, raw, a);
         }
     }
 
     /**
     * Receive notification of the end of an element.
     */
-    public void characters(char c[], int start, int len)
-    throws SAXException {
+    public void characters(char c[], int start, int len) throws SAXException {
         String theValue = new String(c, start, len).trim();
         if ( null != this.fillMe ) {
             if ( "".equals( theValue )) {
@@ -247,18 +217,14 @@
             }
         } 
         else {
-            if (super.contentHandler != null) {
-                super.contentHandler.characters(c, start, len);
-            }
+            super.characters(c, start, len);
         }
     }
 
     /**
     * Receive notification of the end of an element.
     */
-    public void endElement(String uri, String loc, String raw)
-        throws SAXException 
-    {
+    public void endElement(String uri, String loc, String raw) throws SAXException {
         if ( Web3.URI.equals(uri) && !this.error ) {
             switch ( Integer.parseInt( (String) this.tags.get( loc ))) {
                 case INCLUDE_ELEM: 
@@ -270,15 +236,15 @@
                             (ServiceSelector) 
                             this.manager.lookup( Web3Streamer.ROLE + "Selector" );
                         w3s = (Web3Streamer) streamerSelector.select( this.streamer );
-                        w3s.stream( this.function,  super.contentHandler );
+                        w3s.stream( this.function,  this.contentHandler );
                     } 
                     catch (Exception x) {
                         this.attributes.clear();
-                        super.contentHandler.startElement(uri, Web3.ABAP_EXCEPTION_ELEM,

+                        super.startElement(uri, Web3.ABAP_EXCEPTION_ELEM, 
                             Web3.ABAP_EXCEPTION_ELEM, this.attributes);
-                        super.contentHandler.characters(x.getMessage ().toCharArray(), 
+                        super.characters(x.getMessage ().toCharArray(), 
                             0, x.getMessage ().length());
-                        super.contentHandler.endElement(uri, Web3.ABAP_EXCEPTION_ELEM, 
+                        super.endElement(uri, Web3.ABAP_EXCEPTION_ELEM, 
                             Web3.ABAP_EXCEPTION_ELEM);                    
                         getLogger().error(x.getMessage(), x);
                     } 
@@ -287,7 +253,7 @@
                         if ( null != streamerSelector ) {
                             streamerSelector.release( w3s );
                         }
-                        manager.release( streamerSelector );
+                        this.manager.release( streamerSelector );
                     }
                     this.connection = null;
                     this.repository = null;
@@ -302,8 +268,8 @@
                 break;
             } 
         }
-        else if (super.contentHandler != null) {
-            super.contentHandler.endElement(uri,loc,raw);
+        else {
+            super.endElement(uri,loc,raw);
         }
     }
 
@@ -317,7 +283,6 @@
     protected final static int TABLE_ELEM       = 8;
     
     protected void initTags() {
-        
         this.tags.put( Web3.INCLUDE_ELEM,   "1" );
         this.tags.put( Web3.IMPORT_ELEM,    "2" );        
         this.tags.put( Web3.EXPORT_ELEM,    "3" );        
@@ -327,5 +292,5 @@
         this.tags.put( Web3.STRUCTURE_ELEM, "7" );     
         this.tags.put( Web3.TABLE_ELEM,     "8" );         
     }
-}
 
+}



Mime
View raw message