ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r225561 - in /webservices/wsrf/trunk/src: examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/ java/org/apache/ws/resource/impl/ java/org/apache/ws/resource/properties/query/impl/ java/org/apache/ws/util/jndi/
Date Wed, 27 Jul 2005 18:09:58 GMT
Author: ips
Date: Wed Jul 27 11:09:54 2005
New Revision: 225561

URL: http://svn.apache.org/viewcvs?rev=225561&view=rev
Log:
JNDI fix

Modified:
    webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java
    webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/JNDIUtils.java
    webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java

Modified: webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java?rev=225561&r1=225560&r2=225561&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
(original)
+++ webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
Wed Jul 27 11:09:54 2005
@@ -55,7 +55,7 @@
     {
         super.init();
         add( createInstance( LVOL1_ID ) );
-        add( createInstance( LVOL1_ID ) );
+        add( createInstance( LVOL2_ID ) );
     }
 
     public QName getServiceName()

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java?rev=225561&r1=225560&r2=225561&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
(original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
Wed Jul 27 11:09:54 2005
@@ -523,7 +523,6 @@
     {
         LOG.debug( MSG.getMessage( Keys.TIMER_LOOKUP_WITH_JNDI_NAME, JndiConstants.KEY_NAME_DEFAULT_TIMER
) );
         TimerManager timerManager = (TimerManager) initialContext.lookup( JndiConstants.KEY_NAME_DEFAULT_TIMER
);
-
         // TimerManager timerManager = new TimerManagerImpl();
         m_sweeper = new Sweeper( this, m_resources, timerManager, m_sweeperDelay );
     }

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java?rev=225561&r1=225560&r2=225561&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java
(original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java
Wed Jul 27 11:09:54 2005
@@ -31,7 +31,7 @@
 import org.apache.ws.resource.properties.query.UnknownQueryExpressionDialectException;
 import org.apache.ws.resource.properties.query.xpath.impl.XalanXPathExpressionEvaluator;
 import org.apache.ws.util.i18n.Messages;
-import org.apache.ws.util.jndi.JNDIUtils;
+import org.apache.ws.util.jndi.XmlBeanJndiUtils;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -144,7 +144,7 @@
                 {
                     NameClassPair pair = (NameClassPair) list.next();
                     ExpressionEvaluator evaluator =
-                            (ExpressionEvaluator) JNDIUtils.lookup( initialContext,
+                            (ExpressionEvaluator) XmlBeanJndiUtils.lookup( initialContext,
                                     QUERY_EVALUATOR_CONTEXT + "/" + pair.getName(),
                                     ExpressionEvaluator.class );
                     registerEvaluator( evaluator );

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/JNDIUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/JNDIUtils.java?rev=225561&r1=225560&r2=225561&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/JNDIUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/JNDIUtils.java Wed Jul 27 11:09:54
2005
@@ -115,56 +115,6 @@
         return result;
     }
 
-    /**
-     * Parse the given JNDI configuration and populate the JNDI registry using the parsed
configuration
-     *
-     * @param configInput The configuration stream to parse
-     *
-     * @throws Exception
-     */
-    public static void parseJNDIConfig( InputStream configInput )
-            throws Exception
-    {
-        parseJNDIConfig( new InitialContext(), configInput, null );
-    }
-
-    /**
-     * Parse the given JNDI configuration and populate the JNDI registry using the parsed
configuration
-     *
-     * @param configInput The configuration stream to parse
-     *
-     * @throws Exception
-     */
-    public static void parseJNDIConfig( Context initContext,
-                                        InputStream configInput,
-                                        AxisEngine engine )
-            throws Exception
-    {
-
-        if ( configInput == null )
-        {
-            throw new IllegalArgumentException( "nullJNDIConfigInput" );
-        }
-
-        if ( initContext == null )
-        {
-            throw new IllegalArgumentException();
-        }
-
-        Context envContext = (Context) initContext.lookup( "java:comp/env" );
-        Digester digester = new Digester();
-
-        // Don't do any validation for now
-        // TODO: look into getting rid of this stuff!
-
-        digester.setNamespaceAware( true );
-        digester.setValidating( false );
-        digester.addRuleSet( new JNDIConfigRuleSet( "jndiConfig/" ) );
-
-        digester.push( new NamingContext( envContext, engine ) );
-        digester.parse( configInput );
-        digester.clear();
-    }
 
     /**
      * Retrieves the named object on the specified context. The object returned must be of
assignable from the type

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java?rev=225561&r1=225560&r2=225561&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java Wed Jul
27 11:09:54 2005
@@ -15,6 +15,7 @@
  *=============================================================================*/
 package org.apache.ws.util.jndi;
 
+import org.apache.axis.AxisEngine;
 import org.apache.axis.components.logger.LogFactory;
 import org.apache.commons.logging.Log;
 import org.apache.ws.resource.JndiConstants;
@@ -58,7 +59,6 @@
  * @author Sal Campana
  */
 public class XmlBeanJndiUtils
-        extends JNDIUtils
 {
     private static Log LOG = LogFactory.getLog(XmlBeanJndiUtils.class.getName());
 
@@ -79,11 +79,6 @@
     public static final String JNDI_CONFIG_FILENAME = "jndi-config.xml";
     private static final String PROP_FACTORY = "factory";
 
-    /**
-     * Singleton instance of the JNDI Context.
-     */
-    private static Context s_wsrfContext;
-
     private static boolean s_configLoaded;
     private static boolean s_jndiInitialized;
 
@@ -199,15 +194,12 @@
             try
             {
                 LOG.debug("Trying to load JNDI configuration from file: " + configFilename);
-
                 configInput = new FileInputStream(configFilename);
             }
             catch (FileNotFoundException fnfe)
             {
                 LOG.debug("Trying to load JNDI configuration from classloader resource: "
+ configFilename);
-
-                configInput = JNDIUtils.class.getClassLoader().getResourceAsStream(configFilename);
-
+                configInput = XmlBeanJndiUtils.class.getClassLoader().getResourceAsStream(configFilename);
                 if (configInput == null)
                 {
                     throw new IOException("jndiConfigNotFound");
@@ -620,4 +612,56 @@
         }
         return defaultParams;
     }
+
+    /**
+     * Parse the given JNDI configuration and populate the JNDI registry using the parsed
configuration
+     *
+     * @param configInput The configuration stream to parse
+     *
+     * @throws Exception
+     */
+    public static void parseJNDIConfig( InputStream configInput )
+            throws Exception
+    {
+        parseJNDIConfig( new InitialContext(), configInput, null );
+    }
+
+    /**
+     * Parse the given JNDI configuration and populate the JNDI registry using the parsed
configuration
+     *
+     * @param configInput The configuration stream to parse
+     *
+     * @throws Exception
+     */
+    public static void parseJNDIConfig( Context initContext,
+                                        InputStream configInput,
+                                        AxisEngine engine )
+            throws Exception
+    {
+
+        if ( configInput == null )
+        {
+            throw new IllegalArgumentException( "config input stream was null." );
+        }
+
+        if ( initContext == null )
+        {
+            throw new IllegalArgumentException( "initial context was null." );
+        }
+
+        /*Context envContext = (Context) initContext.lookup( "java:comp/env" );
+        Digester digester = new Digester();
+
+        // Don't do any validation for now
+        // TODO: look into getting rid of this stuff!
+
+        digester.setNamespaceAware( true );
+        digester.setValidating( false );
+        digester.addRuleSet( new JNDIConfigRuleSet( "jndiConfig/" ) );
+
+        digester.push( new NamingContext( envContext, engine ) );
+        digester.parse( configInput );
+        digester.clear();*/
+    }
+
 }



Mime
View raw message