Author: indika
Date: Tue Oct 16 03:57:06 2007
New Revision: 585110

URL: http://svn.apache.org/viewvc?rev=585110&view=rev
Log:
improve the logs

Modified:
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java
    
webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/xquery/XQueryMediator.java
    webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_700.xml
    webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_701.xml

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java?rev=585110&r1=585109&r2=585110&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java
 Tue Oct 16 03:57:06 2007
@@ -280,8 +280,8 @@
                     o = registry.getResource(entry);
                 } else {
                     if (log.isDebugEnabled()) {
-                        log.debug("Will not  evaluate the value of the remote 
entry,  because" +
-                                " the registry is not available");
+                        log.debug("Will not  evaluate the value of the remote 
entry with a key "
+                            + key + ",  because the registry is not 
available");
                     }
                     return null; // otherwise will return an entry with a 
value null
                     // (method expects return  a value not an entry )

Modified: 
webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/xquery/XQueryMediator.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/xquery/XQueryMediator.java?rev=585110&r1=585109&r2=585110&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/xquery/XQueryMediator.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/xquery/XQueryMediator.java
 Tue Oct 16 03:57:06 2007
@@ -190,7 +190,7 @@
                     || (cachedConnection != null && 
cachedConnection.isClosed())) {
                     //get the Connection to XML DataBase
                     if (traceOrDebugOn) {
-                        traceOrDebug(traceOn, "Creating a connection from 
XQDataSource ");
+                        traceOrDebug(traceOn, "Creating a connection from the 
XQDataSource ");
                     }
                     cachedConnection = cachedXQDataSource.getConnection();
                 }
@@ -229,7 +229,7 @@
                         //if the value has changed or need binding because the 
expression has recreated
                         if (hasValueChanged || needBind) {
                             //Binds the external variable to the DynamicContext
-                            bindVariable(cachedPreparedExpression, variable);
+                            bindVariable(cachedPreparedExpression, 
variable,traceOrDebugOn, traceOn);
                         }
                     }
                 }
@@ -321,13 +321,24 @@
      * @param xqDynamicContext The Dynamic Context  to which the variable will 
be binded
      * @param variable         The variable which contains the name and vaule 
for binding
      * @throws XQException throws if any error occurs when binding the variable
+     * @param traceOrDebugOn is tracing or debbug on
+     * @param traceOn        indicate whether trace is ON or OF
      */
-    private void bindVariable(XQDynamicContext xqDynamicContext, 
MediatorVariable variable) throws XQException {
+    private void bindVariable(XQDynamicContext xqDynamicContext, 
MediatorVariable variable, boolean traceOrDebugOn, boolean traceOn) throws 
XQException {
+
         if (variable != null) {
+
             QName name = variable.getName();
             int type = variable.getType();
             Object value = variable.getValue();
+
             if (value != null && type != -1) {
+
+                if (traceOrDebugOn) {
+                    traceOrDebug(traceOn, "Binding a variable to the 
DynamicContext with a name : "
+                        + name + " and a value : " + value);
+                }
+
                 switch (type) {
                     //Binding the basic type As-Is and XML element as an 
InputSource
                     case(XQItemType.XQBASETYPE_BOOLEAN): {

Modified: 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_700.xml
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_700.xml?rev=585110&r1=585109&r2=585110&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_700.xml 
(original)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_700.xml 
Tue Oct 16 03:57:06 2007
@@ -34,7 +34,6 @@
             <inSequence>
                 <xquery key="xquery-key-req">
                     <variable name="payload" type="ELEMENT"/>
-
                 </xquery>
                 <send>
                     <endpoint>
@@ -49,7 +48,6 @@
                     </xquery>
                      <send/>
                 </out>
-
             </outSequence>
         </target>
         <publishWSDL 
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>

Modified: 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_701.xml
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_701.xml?rev=585110&r1=585109&r2=585110&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_701.xml 
(original)
+++ 
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_701.xml 
Tue Oct 16 03:57:06 2007
@@ -40,12 +40,10 @@
                 <out>
                     <xquery key="xquery/xquery_commisson.xq">
                         <variable name="payload" type="ELEMENT"></variable>
-                            <variable name="commission" type="ELEMENT"
-                                    key="misc/commission.xml"></variable>      
                    
+                            <variable name="commission" type="ELEMENT" 
key="misc/commission.xml"></variable>
                     </xquery>
                     <send/>
                 </out>
-
             </outSequence>
         </target>
         <publishWSDL 
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to