You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by da...@apache.org on 2006/12/15 06:33:34 UTC

svn commit: r487452 [1/2] - in /webservices/sandesha/trunk/c: ./ include/ samples/rm_1_1_echo/ samples/rm_echo/ samples/rm_mtom/ samples/rm_ping/ src/core/ src/msgprocessors/ src/polling/ src/storage/ src/storage/beans/ src/storage/inmemory/ src/util/ ...

Author: damitha
Date: Thu Dec 14 21:33:32 2006
New Revision: 487452

URL: http://svn.apache.org/viewvc?view=rev&rev=487452
Log:
More work on storage abstraction. A permanant storage is introduced using
sqlite3.

Added:
    webservices/sandesha/trunk/c/samples/rm_1_1_echo/
    webservices/sandesha/trunk/c/samples/rm_1_1_echo/Makefile.am
    webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.c
    webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.h
    webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c
Modified:
    webservices/sandesha/trunk/c/configure.ac
    webservices/sandesha/trunk/c/include/sandesha2_constants.h
    webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h
    webservices/sandesha/trunk/c/include/sandesha2_error.h
    webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h
    webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h
    webservices/sandesha/trunk/c/include/sandesha2_property_bean.h
    webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h
    webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h
    webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
    webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
    webservices/sandesha/trunk/c/samples/rm_mtom/Makefile.am
    webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am
    webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
    webservices/sandesha/trunk/c/src/core/Makefile.am
    webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
    webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/polling/polling_mgr.c
    webservices/sandesha/trunk/c/src/storage/Makefile.am
    webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
    webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c
    webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c
    webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c
    webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c
    webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
    webservices/sandesha/trunk/c/src/util/ack_mgr.c
    webservices/sandesha/trunk/c/src/util/error.c
    webservices/sandesha/trunk/c/src/util/fault_mgr.c
    webservices/sandesha/trunk/c/src/util/property_bean.c
    webservices/sandesha/trunk/c/src/util/property_mgr.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c
    webservices/sandesha/trunk/c/src/workers/in_order_invoker.c
    webservices/sandesha/trunk/c/src/workers/sender.c
    webservices/sandesha/trunk/c/src/workers/sender_worker.c

Modified: webservices/sandesha/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/configure.ac?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/configure.ac (original)
+++ webservices/sandesha/trunk/c/configure.ac Thu Dec 14 21:33:32 2006
@@ -78,6 +78,7 @@
     src/storage/Makefile\
     src/storage/beans/Makefile\
     src/storage/inmemory/Makefile\
+    src/storage/permanent/Makefile\
     src/client/Makefile \
     src/core/Makefile \
     src/polling/Makefile 

Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Thu Dec 14 21:33:32 2006
@@ -409,9 +409,9 @@
 
 	#define SANDESHA2_INVOKER_SLEEP_TIME  2
 
-	#define SANDESHA2_SENDER_SLEEP_TIME  3
+	#define SANDESHA2_SENDER_SLEEP_TIME  4
 
-    #define SANDESHA2_POLLING_MANAGER_WAIT_TIME 6
+    #define SANDESHA2_POLLING_MANAGER_WAIT_TIME 4
 
 	#define SANDESHA2_CLIENT_SLEEP_TIME  32
 
@@ -462,7 +462,7 @@
 	
 	#define SANDESHA2_PERMANENT_STORAGE_MGR  "persistent"
 	
-	#define SANDESHA2_DEFAULT_STORAGE_MGR "inmemory"
+	#define SANDESHA2_DEFAULT_STORAGE_MGR "persistent"
 	
 	#define SANDESHA2_SENDER  "Sender"
 	

Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h Thu Dec 14 21:33:32 2006
@@ -67,7 +67,7 @@
 
 axis2_char_t* AXIS2_CALL 
 sandesha2_create_seq_bean_get_create_seq_msg_id  (
-    sandesha2_create_seq_bean_t *create_seq_bean,
+    sandesha2_rm_bean_t *create_seq_bean,
     const axis2_env_t *env);
 
 void AXIS2_CALL 

Modified: webservices/sandesha/trunk/c/include/sandesha2_error.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_error.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_error.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_error.h Thu Dec 14 21:33:32 2006
@@ -202,6 +202,10 @@
         SANDESHA2_ERROR_MAKE_CONNECTION_IS_NOT_SUPPORTED_IN_THIS_RM_VERSION,
         /* Invalid MakeConnection message. Either Address or Identifier must be present */
         SANDESHA2_ERROR_INVALID_MAKE_CONNECTION_MSG,
+        /* Database cannot be opened */
+        SANDESHA2_ERROR_CANNOT_OPEN_DATABASE,
+        /* There is an sql error. Please refer logs */
+        SANDESHA2_ERROR_SQL_ERROR,
         SANDESHA2_ERROR_LAST
     };
         

Modified: webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h Thu Dec 14 21:33:32 2006
@@ -66,11 +66,11 @@
 
 axis2_char_t* AXIS2_CALL 
 sandesha2_invoker_bean_get_msg_ctx_ref_key(
-    sandesha2_invoker_bean_t *invoker_bean,
+    sandesha2_rm_bean_t *invoker_bean,
     const axis2_env_t *env);
 
 void AXIS2_CALL 
-sandesha2_invoker_bean_set_msg_context_ref_key(
+sandesha2_invoker_bean_set_msg_ctx_ref_key(
     sandesha2_invoker_bean_t *invoker_bean,
 	const axis2_env_t *env, axis2_char_t* context_ref_id) ;
 

Modified: webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h Thu Dec 14 21:33:32 2006
@@ -66,7 +66,7 @@
 
 axis2_char_t* AXIS2_CALL
 sandesha2_next_msg_bean_get_seq_id(
-    sandesha2_next_msg_bean_t *next_msg_bean,
+    sandesha2_rm_bean_t *next_msg_bean,
     const axis2_env_t *env);
 
 void AXIS2_CALL

Modified: webservices/sandesha/trunk/c/include/sandesha2_property_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_property_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_property_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_property_bean.h Thu Dec 14 21:33:32 2006
@@ -105,12 +105,12 @@
     axis2_char_t *manager);
             
 axis2_char_t* AXIS2_CALL
-sandesha2_property_bean_get_permanant_storage_mgr( 
+sandesha2_property_bean_get_permanent_storage_mgr( 
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env);
             
 axis2_status_t AXIS2_CALL
-sandesha2_property_bean_set_permanant_storage_mgr(
+sandesha2_property_bean_set_permanent_storage_mgr(
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, 
     axis2_char_t *manager);

Modified: webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h Thu Dec 14 21:33:32 2006
@@ -64,6 +64,11 @@
             get_transaction) ( 
                 sandesha2_rm_bean_t *rm_bean,
                 const axis2_env_t *env);
+    
+    axis2_char_t *(AXIS2_CALL *
+            get_key) ( 
+                sandesha2_rm_bean_t *rm_bean,
+                const axis2_env_t *env);
 };
 
 AXIS2_DECLARE_DATA struct sandesha2_rm_bean
@@ -106,6 +111,11 @@
 
 struct sandesha2_transaction *AXIS2_CALL
 sandesha2_rm_bean_get_transaction( 
+    sandesha2_rm_bean_t *rm_bean,
+	const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+sandesha2_rm_bean_get_key( 
     sandesha2_rm_bean_t *rm_bean,
 	const axis2_env_t *env);
 

Modified: webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h Thu Dec 14 21:33:32 2006
@@ -79,7 +79,7 @@
 
 axis2_char_t* AXIS2_CALL
 sandesha2_sender_bean_get_msg_id (
-    sandesha2_sender_bean_t *sender,
+    sandesha2_rm_bean_t *sender,
     const axis2_env_t *env);
 
 void AXIS2_CALL 

Added: webservices/sandesha/trunk/c/samples/rm_1_1_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_1_1_echo/Makefile.am?view=auto&rev=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_1_1_echo/Makefile.am (added)
+++ webservices/sandesha/trunk/c/samples/rm_1_1_echo/Makefile.am Thu Dec 14 21:33:32 2006
@@ -0,0 +1,29 @@
+prgbindir=$(prefix)/bin/samples
+prgbin_PROGRAMS = rm_1_1_echo
+samplesdir=$(prefix)/samples/client/rm_1_1_echo
+samples_DATA=rm_echo_client.c Makefile.am Makefile.in
+rm_1_1_echo_SOURCES = rm_echo_client.c echo_util.c
+
+rm_1_1_echo_LDADD   =  \
+                    -L$(AXIS2C_HOME)/lib \
+					-laxis2_util \
+                    -laxis2_axiom \
+                    -laxis2_wsdl \
+                    -laxis2_engine \
+                    -laxis2_parser \
+                    -lpthread \
+                    -laxis2_http_sender \
+                    -laxis2_http_receiver \
+					-lwoden \
+					-laxis2_xml_schema \
+                    -L$(AXIS2C_HOME)/modules/sandesha2 \
+					-lsandesha2_client \
+					-lsandesha2 \
+					-lsqlite \
+                    $(GUTHTHILA_LIBS) \
+                    $(LIBXML2_LIBS)
+
+INCLUDES = -I$(AXIS2C_HOME)/include \
+			-I$(AXIS2C_HOME)/modules/sandesha2 \
+			@UTILINC@ \
+			@AXIOMINC@

Added: webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.c?view=auto&rev=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.c (added)
+++ webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.c Thu Dec 14 21:33:32 2006
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+
+#include "echo_util.h"
+
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_payload_for_echo_svc(
+   const axis2_env_t *env,
+   axis2_char_t *text,
+   axis2_char_t *seq)
+{
+    axiom_node_t *echo_om_node = NULL;
+    axiom_element_t* echo_om_ele = NULL;
+    axiom_node_t* text_om_node = NULL;
+    axiom_element_t * text_om_ele = NULL;
+    axiom_node_t* seq_om_node = NULL;
+    axiom_element_t * seq_om_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+    axis2_char_t *om_str = NULL;
+    axis2_char_t *ns = NULL;
+
+    ns = "http://tempuri.org/";
+    
+    ns1 = axiom_namespace_create (env, ns, "ns1");
+    echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node);
+    text_om_ele = axiom_element_create(env, echo_om_node, "Text", ns1, &text_om_node);
+    seq_om_ele = axiom_element_create(env, echo_om_node, "Sequence", ns1, &seq_om_node);
+    AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, text, text_om_node);
+    AXIOM_ELEMENT_SET_TEXT(text_om_ele, env, seq, seq_om_node);
+    
+    om_str = AXIOM_NODE_TO_STRING(echo_om_node, env);
+    if (om_str)
+        printf("\nSending OM : %s\n", om_str);
+
+    return echo_om_node;
+}

Added: webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.h?view=auto&rev=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.h (added)
+++ webservices/sandesha/trunk/c/samples/rm_1_1_echo/echo_util.h Thu Dec 14 21:33:32 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+
+#ifndef AXIS2_UG_ECHO_UTIL_H
+#define AXIS2_UG_ECHO_UTIL_H
+
+#include <stdio.h>
+#include <axiom.h>
+
+axiom_node_t *
+build_om_payload_for_echo_svc(
+   const axis2_env_t *env,
+   axis2_char_t *text,
+   axis2_char_t *seq);
+
+#endif

Added: webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c?view=auto&rev=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c (added)
+++ webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c Thu Dec 14 21:33:32 2006
@@ -0,0 +1,336 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+
+#include "echo_util.h"
+#include <axis2_util.h>
+#include <axiom_soap.h>
+#include <axis2_client.h>
+#include <axis2_svc_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_op_client.h>
+#include <axis2_listener_manager.h>
+#include <axis2_callback_recv.h>
+#include <axis2_svc_client.h>
+#include <sandesha2_client_constants.h>
+#include <sandesha2_constants.h>
+#include <sandesha2_client.h>
+#include <axis2_addr.h>
+
+/* on_complete callback function */
+axis2_status_t AXIS2_CALL
+rm_echo_callback_on_complete(
+    struct axis2_callback *callback,
+    const axis2_env_t *env);
+
+/* on_error callback function */
+axis2_status_t AXIS2_CALL
+rm_echo_callback_on_error(
+    struct axis2_callback *callback,
+    const axis2_env_t *env,
+    int exception);
+
+void wait_on_callback(
+    const axis2_env_t *env,
+    axis2_callback_t *callback);
+
+static void 
+usage(
+    axis2_char_t *prog_name);
+
+int main(int argc, char** argv)
+{
+    const axis2_env_t *env = NULL;
+    const axis2_char_t *address = NULL;
+    axis2_endpoint_ref_t* endpoint_ref = NULL;
+    axis2_endpoint_ref_t* reply_to = NULL;
+    axis2_options_t *options = NULL;
+    const axis2_char_t *client_home = NULL;
+    axis2_svc_client_t* svc_client = NULL;
+    axiom_node_t *payload = NULL;
+    axis2_callback_t *callback = NULL;
+    axis2_callback_t *callback2 = NULL;
+    axis2_callback_t *callback3 = NULL;
+    axis2_callback_t *callback4 = NULL;
+    axis2_property_t *property = NULL;
+    axis2_listener_manager_t *listener_manager = NULL;
+    axis2_char_t *offered_seq_id = NULL;
+    axis2_bool_t offer = AXIS2_FALSE;
+    axis2_bool_t single_channel = AXIS2_TRUE;
+    int c;
+   
+    /* Set up the environment */
+    /*env = axis2_env_create_all("echo_non_blocking_dual.log", 
+            AXIS2_LOG_LEVEL_DEBUG);*/
+    /*env = axis2_env_create_all("echo_non_blocking_dual.log", 
+            AXIS2_LOG_LEVEL_ERROR);*/
+    env = axis2_env_create_all("echo_non_blocking_dual.log", 
+            AXIS2_LOG_LEVEL_CRITICAL);
+
+    /* Set end point reference of echo service */
+    /*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
+    address = "http://127.0.0.1:5555/axis2/services/RMSampleService";
+    while ((c = AXIS2_GETOPT(argc, argv, ":a:o:v:")) != -1)
+    {
+
+        switch (c)
+        {
+            case 'a':
+                address = optarg;
+                break;
+            case 'o': /* Sequence Offer */
+                offer = AXIS2_ATOI(optarg);
+                break;
+            case 'm': /* RM Version */
+                single_channel = AXIS2_ATOI(optarg);
+                break;
+            case ':':
+                fprintf(stderr, "\nOption -%c requires an operand\n", optopt);
+                usage(argv[0]);
+                return -1;
+            case '?':
+                if (isprint(optopt))
+                    fprintf(stderr, "\nUnknown option `-%c'.\n", optopt);
+                usage(argv[0]);
+                return -1;
+        }
+    }
+    printf("offer:%d\n", offer);
+    if (AXIS2_STRCMP(address, "-h") == 0)
+    {
+        printf("Usage : %s [endpoint_url] [offer]\n", argv[0]);
+        printf("use -h for help\n");
+        return 0;
+    }
+    printf ("Using endpoint : %s\n", address);
+    
+    /* Create EPR with given address */
+    endpoint_ref = axis2_endpoint_ref_create(env, address);
+
+    /* Setup options */
+    options = axis2_options_create(env);
+    AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref);
+    AXIS2_OPTIONS_SET_USE_SEPARATE_LISTENER(options, env, AXIS2_TRUE);
+    
+    /* Seperate listner needs addressing, hence addressing stuff in options */
+    AXIS2_OPTIONS_SET_ACTION(options, env,
+        "http://127.0.0.1:8080/axis2/services/RMSampleService/anonOutInOp");
+    reply_to = axis2_endpoint_ref_create(env, 
+            "http://localhost:7777/axis2/services/__ANONYMOUS_SERVICE__/"\
+                "__OPERATION_OUT_IN__");
+    if(single_channel)
+    {
+        reply_to = axis2_endpoint_ref_create(env, AXIS2_WSA_ANONYMOUS_URL);
+        offer = AXIS2_TRUE;
+    }
+    AXIS2_OPTIONS_SET_REPLY_TO(options, env, reply_to);
+
+    /* Set up deploy folder. It is from the deploy folder, the configuration is 
+     * picked up using the axis2.xml file.
+     * In this sample client_home points to the Axis2/C default deploy folder. 
+     * The client_home can be different from this folder on your system. For 
+     * example, you may have a different folder (say, my_client_folder) with its 
+     * own axis2.xml file. my_client_folder/modules will have the modules that 
+     * the client uses
+     */
+    client_home = AXIS2_GETENV("AXIS2C_HOME");
+    if (!client_home)
+        client_home = "../../deploy";
+
+    /* Create service client */
+    svc_client = axis2_svc_client_create(env, client_home);
+    if (!svc_client)
+    {
+        printf("Error creating service client\n");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+                  " %d :: %s", env->error->error_number,
+                        AXIS2_ERROR_GET_MESSAGE(env->error));
+        return -1;
+    }
+
+    /* Set service client options */
+    AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options);    
+    
+    AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING);  
+    AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, "sandesha2");
+
+    listener_manager = axis2_listener_manager_create(env);
+    if (!listener_manager)
+    {
+        return AXIS2_FAILURE;
+    }
+    /* Offer sequence */
+    if(offer)
+    {
+        offered_seq_id = axis2_uuid_gen(env);
+        property = axis2_property_create(env);
+        if(property)
+        {
+            AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(offered_seq_id, 
+                env));
+            AXIS2_OPTIONS_SET_PROPERTY(options, env, 
+                SANDESHA2_CLIENT_OFFERED_SEQ_ID, property);
+        }
+    }
+    /* RM Version 1.1 */
+    property = axis2_property_create_with_args(env, 3, 0, 
+        SANDESHA2_SPEC_VERSION_1_1);
+    if(property)
+    {
+        AXIS2_OPTIONS_SET_PROPERTY(options, env, 
+            SANDESHA2_CLIENT_RM_SPEC_VERSION, property);
+    }
+    property = axis2_property_create_with_args(env, 3, 0, "sequence1");
+    if(property)
+    {
+        AXIS2_OPTIONS_SET_PROPERTY(options, env, SANDESHA2_CLIENT_SEQ_KEY, 
+            property);
+    }
+    
+    payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+    callback = axis2_callback_create(env);
+    AXIS2_CALLBACK_SET_ON_COMPLETE(callback, rm_echo_callback_on_complete);
+    AXIS2_CALLBACK_SET_ON_ERROR(callback, rm_echo_callback_on_error);
+    sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
+        callback, payload, listener_manager);
+
+    wait_on_callback(env, callback);
+
+    payload = build_om_payload_for_echo_svc(env, "echo2", "sequence1");
+    callback2 = axis2_callback_create(env);
+    AXIS2_CALLBACK_SET_ON_COMPLETE(callback2, rm_echo_callback_on_complete);
+    AXIS2_CALLBACK_SET_ON_ERROR(callback2, rm_echo_callback_on_error);
+    sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
+        callback2, payload, listener_manager);
+    wait_on_callback(env, callback2);
+
+    payload = build_om_payload_for_echo_svc(env, "echo3", "sequence1");
+    callback3 = axis2_callback_create(env);
+    AXIS2_CALLBACK_SET_ON_COMPLETE(callback3, rm_echo_callback_on_complete);
+    AXIS2_CALLBACK_SET_ON_ERROR(callback3, rm_echo_callback_on_error);
+    sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
+        callback3, payload, listener_manager);
+    wait_on_callback(env, callback3);
+    AXIS2_SLEEP(2 * SANDESHA2_CLIENT_SLEEP_TIME); 
+    callback4 = axis2_callback_create(env);
+    AXIS2_CALLBACK_SET_ON_COMPLETE(callback4, rm_echo_callback_on_complete);
+    AXIS2_CALLBACK_SET_ON_ERROR(callback4, rm_echo_callback_on_error);
+    sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4, 
+        listener_manager);
+    AXIS2_SLEEP(SANDESHA2_CLIENT_SLEEP_TIME); 
+    if (svc_client)
+    {
+        /*AXIS2_SVC_CLIENT_FREE(svc_client, env);*/
+        svc_client = NULL;
+    }
+    
+    return 0;
+}
+
+axis2_status_t AXIS2_CALL
+rm_echo_callback_on_complete(
+    struct axis2_callback *callback,
+    const axis2_env_t *env)
+{
+   /** SOAP response has arrived here; get the soap envelope 
+     from the callback object and do whatever you want to do with it */
+   
+   axiom_soap_envelope_t *soap_envelope = NULL;
+   axiom_node_t *ret_node = NULL;
+   axis2_status_t status = AXIS2_SUCCESS;
+   
+   soap_envelope = AXIS2_CALLBACK_GET_ENVELOPE(callback, env);
+   
+   if (!soap_envelope)
+   {
+       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:"
+                     " %d :: %s", env->error->error_number,
+                     AXIS2_ERROR_GET_MESSAGE(env->error));
+      printf("echo stub invoke FAILED!\n");
+      status = AXIS2_FAILURE;
+   }
+    else
+    {
+        ret_node = AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(soap_envelope, env);
+    
+        if(!ret_node)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Stub invoke FAILED: Error code:%d :: %s", 
+                    env->error->error_number, 
+                    AXIS2_ERROR_GET_MESSAGE(env->error));
+            printf("echo stub invoke FAILED!\n");
+            status = AXIS2_FAILURE;
+        }
+        else
+        {
+            axis2_char_t *om_str = NULL;
+            om_str = AXIOM_NODE_TO_STRING(ret_node, env);
+            if (om_str)
+                printf("\nReceived OM : %s\n", om_str);
+            printf("\necho client invoke SUCCESSFUL!\n");
+        }
+    }    
+    return status;
+}
+
+axis2_status_t AXIS2_CALL
+rm_echo_callback_on_error(
+    struct axis2_callback *callback,
+    const axis2_env_t *env,
+    int exception)
+{
+   /** take necessary action on error */
+   printf("\nEcho client invoke FAILED. Error code:%d ::%s", exception, 
+         AXIS2_ERROR_GET_MESSAGE(env->error));
+   return AXIS2_SUCCESS;
+}
+
+void wait_on_callback(
+    const axis2_env_t *env,
+    axis2_callback_t *callback)
+{
+    /** Wait till callback is complete. Simply keep the parent thread running
+       until our on_complete or on_error is invoked */
+    while(1)
+    {
+        if (AXIS2_CALLBACK_GET_COMPLETE(callback, env))
+        {
+            /* We are done with the callback */
+            break;
+        }
+    }
+    return;
+}
+
+static void 
+usage(
+    axis2_char_t *prog_name)
+{
+    fprintf(stdout, "\n Usage : %s", prog_name);
+    fprintf(stdout, " [-a ADDRESS]");
+    fprintf(stdout, " [-o OFFER]");
+    fprintf(stdout, " [-m SINGLE CHANNEL]");
+    fprintf(stdout, " Options :\n");
+    fprintf(stdout, "\t-v SINGLE CHANNEL \t single channel.. The" \
+        " default behaviour is single channel \n");
+    fprintf(stdout, "\t-o OFFER \t seq offer value.. Type 1 for sequence offer" \
+        "feature. The default behaviour is no offer. \n");
+    fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The" \
+        " default is http://127.0.0.1:5555/axis2/services/RMSampleService \n");
+    fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
+}
+
+

Modified: webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am Thu Dec 14 21:33:32 2006
@@ -19,6 +19,7 @@
                     -L$(AXIS2C_HOME)/modules/sandesha2 \
 					-lsandesha2_client \
 					-lsandesha2 \
+					-lsqlite \
                     $(GUTHTHILA_LIBS) \
                     $(LIBXML2_LIBS)
 

Modified: webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c Thu Dec 14 21:33:32 2006
@@ -28,7 +28,7 @@
 #include <sandesha2_constants.h>
 #include <sandesha2_client.h>
 
-#define MAX_COUNT  20
+#define SANDESHA2_MAX_COUNT 30
 
 /* on_complete callback function */
 axis2_status_t AXIS2_CALL
@@ -64,6 +64,7 @@
     axis2_callback_t *callback = NULL;
     axis2_callback_t *callback2 = NULL;
     axis2_callback_t *callback3 = NULL;
+    axis2_callback_t *callback4 = NULL;
     axis2_property_t *property = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
     axis2_char_t *offered_seq_id = NULL;
@@ -72,8 +73,10 @@
     int c;
    
     /* Set up the environment */
+    /*env = axis2_env_create_all("echo_non_blocking_dual.log", 
+            AXIS2_LOG_LEVEL_TRACE);*/
     env = axis2_env_create_all("echo_non_blocking_dual.log", 
-            AXIS2_LOG_LEVEL_TRACE);
+            AXIS2_LOG_LEVEL_CRITICAL);
 
     /* Set end point reference of echo service */
     /*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
@@ -197,6 +200,12 @@
             AXIS2_OPTIONS_SET_PROPERTY(options, env, 
                 SANDESHA2_CLIENT_RM_SPEC_VERSION, property);
         }
+        property = axis2_property_create_with_args(env, 3, 0, "sequence1");
+        if(property)
+        {
+            AXIS2_OPTIONS_SET_PROPERTY(options, env, SANDESHA2_CLIENT_SEQ_KEY,
+                property);
+        }
     }
     payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
     callback = axis2_callback_create(env);
@@ -219,18 +228,31 @@
     AXIS2_CALLBACK_SET_ON_COMPLETE(callback3, rm_echo_callback_on_complete);
     AXIS2_CALLBACK_SET_ON_ERROR(callback3, rm_echo_callback_on_error);
     payload = build_om_payload_for_echo_svc(env, "echo3", "sequence1");
-    property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
-    AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_VALUE_TRUE);
-    AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage", 
+    if(version == 0)
+    {
+        property = axis2_property_create(env);
+        AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
+        AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_VALUE_TRUE);
+        AXIS2_OPTIONS_SET_PROPERTY(options, env, "Sandesha2LastMessage", 
             property);
+    }
     sandesha2_client_send_non_blocking(env, svc_client, options, NULL, callback3, payload, 
             listener_manager);
     wait_on_callback(env, callback3);
-    AXIS2_SLEEP(MAX_COUNT); 
+    AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
+    /* RM Version 1.1 */
+    if(version == 1)
+    {
+        callback4 = axis2_callback_create(env);
+        AXIS2_CALLBACK_SET_ON_COMPLETE(callback4, rm_echo_callback_on_complete);
+        AXIS2_CALLBACK_SET_ON_ERROR(callback4, rm_echo_callback_on_error);
+        sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4,
+            listener_manager);
+        AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
+    }
     if (svc_client)
     {
-        AXIS2_SVC_CLIENT_FREE(svc_client, env);
+        /*AXIS2_SVC_CLIENT_FREE(svc_client, env);*/
         svc_client = NULL;
     }
     
@@ -324,12 +346,12 @@
     fprintf(stdout, " [-o OFFER]");
     fprintf(stdout, " [-v RM VERSION]");
     fprintf(stdout, " Options :\n");
-    fprintf(stdout, "\t-v RM VERSION \t rm version.. The"
-            " default rm version is 1.0 ../\n");
-    fprintf(stdout, "\t-o OFFER \t seq offer value.. The"
-            " default offer value is 0(false) ../\n");
-    fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The"
-            " default is http://127.0.0.1:5555/axis2/services/RMSampleService ../\n");
+    fprintf(stdout, "\t-v RM VERSION \t rm version.. Type 0 for version 1.0, " \
+        "1 for version 1.1. The default rm version is 1.1 \n");
+    fprintf(stdout, "\t-o OFFER \t seq offer value.. Type 1 for sequence offer" \
+        "feature. The default is no offer \n");
+    fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The" \
+        " default is http://127.0.0.1:5555/axis2/services/RMSampleService \n");
     fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
 }
 

Modified: webservices/sandesha/trunk/c/samples/rm_mtom/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_mtom/Makefile.am?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_mtom/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_mtom/Makefile.am Thu Dec 14 21:33:32 2006
@@ -15,6 +15,7 @@
                     -laxis2_http_sender \
                     -laxis2_http_receiver \
 					-lwoden \
+					-lsqlite \
 					-laxis2_xml_schema \
                     $(GUTHTHILA_LIBS) \
                     $(LIBXML2_LIBS)

Modified: webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping/Makefile.am Thu Dec 14 21:33:32 2006
@@ -16,6 +16,7 @@
                     -laxis2_http_receiver \
 					-lwoden \
 					-laxis2_xml_schema \
+					-lsqlite \
                     $(GUTHTHILA_LIBS) \
                     $(LIBXML2_LIBS)
 

Modified: webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping/rm_ping_client.c Thu Dec 14 21:33:32 2006
@@ -51,7 +51,8 @@
     int c;
    
     /* Set up the environment */
-    env = axis2_env_create_all("rm_ping.log", AXIS2_LOG_LEVEL_TRACE);
+    /*env = axis2_env_create_all("rm_ping.log", AXIS2_LOG_LEVEL_TRACE);*/
+    env = axis2_env_create_all("rm_ping.log", AXIS2_LOG_LEVEL_CRITICAL);
 
     /* Set end point reference of echo service */
     /*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
@@ -209,8 +210,8 @@
     fprintf(stdout, " [-a ADDRESS]");
     fprintf(stdout, " [-v RM VERSION]");
     fprintf(stdout, " Options :\n");
-    fprintf(stdout, "\t-v RM VERSION \t rm version.. The"
-            " default rm version is 1.0 ../\n");
+    fprintf(stdout, "\t-v RM VERSION \t rm version.. Type 0 for version 1.0, " \
+        "1 for version 1.1. The default rm version is 1.1 \n");
     fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The"
             " default is http://127.0.0.1:5555/axis2/services/RMSampleService ../\n");
     fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");

Modified: webservices/sandesha/trunk/c/src/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/Makefile.am?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/core/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/core/Makefile.am Thu Dec 14 21:33:32 2006
@@ -13,6 +13,7 @@
                         ../storage/beans/libsandesha2_storage_beans.la\
 						../storage/libsandesha2_storage.la\
                         ../storage/inmemory/libsandesha2_inmemory.la\
+                        ../storage/permanent/libsandesha2_permanent.la\
                         ../transport/libsandesha2_transport.la\
                         ../util/libsandesha_util.la\
                         ../workers/libsandesha2_workers.la\

Modified: webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/mod_sandesha2.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/core/mod_sandesha2.c (original)
+++ webservices/sandesha/trunk/c/src/core/mod_sandesha2.c Thu Dec 14 21:33:32 2006
@@ -100,8 +100,12 @@
     storage_mgr = sandesha2_utils_get_inmemory_storage_mgr(env, conf_ctx);
     sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);
     
+    storage_mgr = sandesha2_utils_get_permanent_storage_mgr(env, conf_ctx);
+    sandesha2_storage_mgr_init_storage(storage_mgr, env, module_desc);
+    
     /* we need to add permenent storage mgr as well */
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] module initializing completed");
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+        "[sandesha2] module initializing completed");
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Thu Dec 14 21:33:32 2006
@@ -240,7 +240,7 @@
     sandesha2_sender_bean_set_send(input_bean, env, AXIS2_TRUE);
     sandesha2_sender_bean_set_resend(input_bean, env, AXIS2_TRUE);
     retrans_list = sandesha2_sender_mgr_find_by_sender_bean(retrans_mgr, env, 
-                        input_bean);
+        input_bean);
    
     acked_list = axis2_array_list_create(env, 0);
     if(!acked_list)
@@ -268,10 +268,11 @@
             if(retrans_bean)
             {
                 sandesha2_sender_mgr_remove(retrans_mgr, env, 
-                        sandesha2_sender_bean_get_msg_id(retrans_bean, env));
-                sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
-                        sandesha2_sender_bean_get_msg_ctx_ref_key(
+                    sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
                         retrans_bean, env));
+                sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env,
+                    sandesha2_sender_bean_get_msg_ctx_ref_key(retrans_bean, 
+                        env));
             }
             add_no = AXIS2_MALLOC(env->allocator, sizeof(long));
             *add_no = (long)j;
@@ -308,7 +309,6 @@
     }
     else
     {
-        printf("came3\n");
         sandesha2_seq_property_mgr_update(seq_prop_mgr, env, 
                         no_of_msgs_acked_bean); 
     }
@@ -317,7 +317,6 @@
                         SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES);
     if(!completed_bean)
     {
-        printf("came4\n");
         completed_bean = sandesha2_seq_property_bean_create(env);
         sandesha2_seq_property_bean_set_seq_id(completed_bean, env, int_seq_id);
         sandesha2_seq_property_bean_set_name(completed_bean, env, 

Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Thu Dec 14 21:33:32 2006
@@ -355,7 +355,8 @@
                 time_to_send = sandesha2_sender_bean_get_time_to_send(
                         old_ack_bean, env);
                 sandesha2_sender_mgr_remove(retrans_mgr, env, 
-                        sandesha2_sender_bean_get_msg_id(old_ack_bean, env));
+                    sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
+                        old_ack_bean, env));
             }
         }
         sandesha2_sender_bean_set_time_to_send(ack_bean, env, time_to_send); 

Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Thu Dec 14 21:33:32 2006
@@ -757,7 +757,6 @@
     }
     if(send_create_seq)
     {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came10****************************************");
         sandesha2_seq_property_bean_t *res_create_seq_added = NULL;
         axis2_char_t *addr_ns_uri = NULL;
         axis2_char_t *anon_uri = NULL;
@@ -771,7 +770,6 @@
         anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
         if(!res_create_seq_added)
         {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came11****************************************");
             axis2_char_t *acks_to = NULL;
             
             res_create_seq_added = sandesha2_seq_property_bean_create_with_data(

Modified: webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c Thu Dec 14 21:33:32 2006
@@ -216,11 +216,14 @@
     /* Find the beans that go with the criteria of the passed sender bean */
     if(find_sender_bean)
     {
-        int i = 0, size = 0;
         retrans_list = axis2_array_list_create(env, 0);
         if(!retrans_list)
             return AXIS2_FAILURE;
-        axis2_array_list_t *retrans_list1 = NULL, *retrans_list2 = NULL;
+        /* Following code is obsolete, since in inmemory_sender_mgr_match 
+         * function we donot consider resend. Instead we can directly assign
+         * to retrans_list as follows the commented lines.
+         */
+        /*axis2_array_list_t *retrans_list1 = NULL, *retrans_list2 = NULL;
         sandesha2_sender_bean_set_resend(find_sender_bean, env, AXIS2_TRUE);
         retrans_list1 = sandesha2_sender_mgr_find_by_sender_bean(sender_bean_mgr, 
                 env, find_sender_bean);
@@ -242,7 +245,9 @@
             sandesha2_sender_bean_t *temp_bean = NULL;
             temp_bean = AXIS2_ARRAY_LIST_GET(retrans_list2, env, i);
             AXIS2_ARRAY_LIST_ADD(retrans_list, env, temp_bean);
-        }
+        }*/
+        retrans_list = sandesha2_sender_mgr_find_by_sender_bean(sender_bean_mgr, 
+                env, find_sender_bean);
     }
     /* Selecting a bean to send randomly. TODO - Should use a better mechanism */
     if(retrans_list)
@@ -306,7 +311,8 @@
      * 1. A message being sent by the Sender thread.
      * 2. A message being sent as a reply to an make_connection.
      */
-    msg_id = sandesha2_sender_bean_get_msg_id(sender_bean, env);
+    msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
+        sender_bean, env);
     if(msg_id)
     {
         sandesha2_sender_worker_t *sender_worker = NULL;

Modified: webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c Thu Dec 14 21:33:32 2006
@@ -115,7 +115,6 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
-    
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/sandesha/trunk/c/src/polling/polling_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/polling/polling_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Thu Dec 14 21:33:32 2006
@@ -297,7 +297,8 @@
         /* If no valid entry is found, try again later */
         if(!next_msg_bean)
             continue;
-        seq_id = sandesha2_next_msg_bean_get_seq_id(next_msg_bean, env);
+        seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) 
+            next_msg_bean, env);
         /* Create a MakeConnection message */
         ref_msg_key = sandesha2_next_msg_bean_get_ref_msg_key(next_msg_bean, env);
         seq_prop_key = seq_id;
@@ -350,7 +351,7 @@
             sandesha2_sender_bean_set_send(make_conn_sender_bean, env, AXIS2_TRUE);
             sandesha2_sender_bean_set_seq_id(make_conn_sender_bean, env, seq_id);
             to = sandesha2_msg_ctx_get_to(make_conn_rm_msg_ctx, env);
-            if(!to)
+            if(to)
             {
                 axis2_char_t *address = (axis2_char_t *) 
                     AXIS2_ENDPOINT_REF_GET_ADDRESS(
@@ -370,8 +371,10 @@
         sandesha2_msg_ctx_set_property(make_conn_rm_msg_ctx, env, 
             SANDESHA2_QUALIFIED_FOR_SENDING, property);
         if(sender_bean_mgr)
+        {
             sandesha2_sender_mgr_insert(sender_bean_mgr, env, 
                 make_conn_sender_bean);
+        }
         sandesha2_utils_execute_and_store(env, make_conn_rm_msg_ctx, 
             make_conn_msg_store_key);
     }

Modified: webservices/sandesha/trunk/c/src/storage/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/Makefile.am?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/storage/Makefile.am Thu Dec 14 21:33:32 2006
@@ -1,4 +1,4 @@
-SUBDIRS = beans inmemory
+SUBDIRS = beans inmemory permanent
 noinst_LTLIBRARIES = libsandesha2_storage.la
 
 libsandesha2_storage_la_SOURCES = \

Modified: webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c Thu Dec 14 21:33:32 2006
@@ -64,7 +64,8 @@
     sandesha2_create_seq_bean_set_id,
     sandesha2_create_seq_bean_get_id,
     sandesha2_create_seq_bean_set_transaction,
-    sandesha2_create_seq_bean_get_transaction
+    sandesha2_create_seq_bean_get_transaction,
+    sandesha2_create_seq_bean_get_create_seq_msg_id
 };
 
 AXIS2_EXTERN sandesha2_create_seq_bean_t * AXIS2_CALL
@@ -187,7 +188,7 @@
 
 axis2_char_t * AXIS2_CALL
 sandesha2_create_seq_bean_get_create_seq_msg_id( 
-    sandesha2_create_seq_bean_t* create_seq_bean,
+    sandesha2_rm_bean_t* create_seq_bean,
     const axis2_env_t *env)
 {
     sandesha2_create_seq_bean_impl_t *create_seq_bean_impl = NULL;

Modified: webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c Thu Dec 14 21:33:32 2006
@@ -48,7 +48,8 @@
     sandesha2_invoker_bean_set_id,
     sandesha2_invoker_bean_get_id,
     sandesha2_invoker_bean_set_transaction,
-    sandesha2_invoker_bean_get_transaction
+    sandesha2_invoker_bean_get_transaction,
+    sandesha2_invoker_bean_get_msg_ctx_ref_key
 };
 
 AXIS2_EXTERN sandesha2_invoker_bean_t* AXIS2_CALL
@@ -171,7 +172,7 @@
 
 axis2_char_t* AXIS2_CALL 
 sandesha2_invoker_bean_get_msg_ctx_ref_key(
-        sandesha2_invoker_bean_t *invoker_bean,
+        sandesha2_rm_bean_t *invoker_bean,
 		const axis2_env_t *env)
 {
     sandesha2_invoker_bean_impl_t *invoker_bean_impl = NULL;
@@ -180,7 +181,7 @@
 }
 
 void AXIS2_CALL 
-sandesha2_invoker_bean_set_msg_context_ref_key(
+sandesha2_invoker_bean_set_msg_ctx_ref_key(
     sandesha2_invoker_bean_t *invoker_bean,
     const axis2_env_t *env, axis2_char_t* context_ref_id)
 {

Modified: webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c Thu Dec 14 21:33:32 2006
@@ -42,7 +42,8 @@
     sandesha2_next_msg_bean_set_id,
     sandesha2_next_msg_bean_get_id,
     sandesha2_next_msg_bean_set_transaction,
-    sandesha2_next_msg_bean_get_transaction
+    sandesha2_next_msg_bean_get_transaction,
+    sandesha2_next_msg_bean_get_seq_id
 };
 
 AXIS2_EXTERN sandesha2_next_msg_bean_t* AXIS2_CALL
@@ -147,7 +148,7 @@
 
 axis2_char_t* AXIS2_CALL
 sandesha2_next_msg_bean_get_seq_id(
-    sandesha2_next_msg_bean_t *next_msg_bean,
+    sandesha2_rm_bean_t *next_msg_bean,
     const axis2_env_t *env)
 {
     sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;

Modified: webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c Thu Dec 14 21:33:32 2006
@@ -36,7 +36,8 @@
     sandesha2_rm_bean_set_id,
     sandesha2_rm_bean_get_id,
     sandesha2_rm_bean_set_transaction,
-    sandesha2_rm_bean_get_transaction
+    sandesha2_rm_bean_get_transaction,
+    NULL
 };
 
 AXIS2_EXTERN sandesha2_rm_bean_t* AXIS2_CALL
@@ -71,6 +72,14 @@
     const axis2_env_t *env)
 {
     return rm_bean->ops.get_base(rm_bean, env);
+}
+
+axis2_char_t *AXIS2_CALL
+sandesha2_rm_bean_get_key(
+    sandesha2_rm_bean_t *rm_bean,
+    const axis2_env_t *env)
+{
+    return rm_bean->ops.get_key(rm_bean, env);
 }
 
 void AXIS2_CALL

Modified: webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/sender_bean.c Thu Dec 14 21:33:32 2006
@@ -51,7 +51,8 @@
     sandesha2_sender_bean_set_id,
     sandesha2_sender_bean_get_id,
     sandesha2_sender_bean_set_transaction,
-    sandesha2_sender_bean_get_transaction
+    sandesha2_sender_bean_get_transaction,
+    sandesha2_sender_bean_get_msg_id
 };
 
 AXIS2_EXTERN sandesha2_sender_bean_t* AXIS2_CALL
@@ -226,7 +227,7 @@
 
 axis2_char_t* AXIS2_CALL
 sandesha2_sender_bean_get_msg_id (
-    sandesha2_sender_bean_t *sender_bean,
+    sandesha2_rm_bean_t *sender_bean,
     const axis2_env_t *env)
 {
     sandesha2_sender_bean_impl_t *sender_bean_impl = NULL;
@@ -413,8 +414,6 @@
     sender_bean_impl = SANDESHA2_INTF_TO_IMPL(sender_bean);
 	return sender_bean_impl->seq_id;
 }
-
-
 
 void AXIS2_CALL
 sandesha2_sender_bean_set_seq_id (

Modified: webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c Thu Dec 14 21:33:32 2006
@@ -35,6 +35,11 @@
 #define SANDESHA2_INTF_TO_IMPL(seq_property_bean) \
     ((sandesha2_seq_property_bean_impl_t *) seq_property_bean)
 
+static axis2_char_t *
+sandesha2_inmemory_seq_property_mgr_get_key(
+    sandesha2_rm_bean_t *seq_property_bean,
+    const axis2_env_t *env);
+
 static const sandesha2_rm_bean_ops_t rm_bean_ops =
 {
     sandesha2_seq_property_bean_free,
@@ -42,7 +47,8 @@
     sandesha2_seq_property_bean_set_id,
     sandesha2_seq_property_bean_get_id,
     sandesha2_seq_property_bean_set_transaction,
-    sandesha2_seq_property_bean_get_transaction
+    sandesha2_seq_property_bean_get_transaction,
+    sandesha2_inmemory_seq_property_mgr_get_key
 };
 
 AXIS2_EXTERN sandesha2_seq_property_bean_t* AXIS2_CALL
@@ -279,5 +285,23 @@
     seq_property_bean_impl = SANDESHA2_INTF_TO_IMPL(seq_property_bean);
     return sandesha2_rm_bean_get_transaction(seq_property_bean_impl->rm_bean_impl,
         env);
+}
+
+static axis2_char_t *
+sandesha2_inmemory_seq_property_mgr_get_key(
+    sandesha2_rm_bean_t *seq_property_bean,
+    const axis2_env_t *env)
+{
+    axis2_char_t *seq_id = NULL;
+    axis2_char_t *name = NULL;
+    axis2_char_t *id = NULL;
+
+    seq_id = sandesha2_seq_property_bean_get_seq_id(
+        (sandesha2_seq_property_bean_t *) seq_property_bean, env);
+    name = sandesha2_seq_property_bean_get_name(
+        (sandesha2_seq_property_bean_t *) seq_property_bean, env);
+    id = axis2_strcat(env, seq_id, ":", name, NULL);
+
+    return id;
 }
 

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_bean_mgr.c Thu Dec 14 21:33:32 2006
@@ -254,18 +254,13 @@
     sandesha2_rm_bean_t *bean)
 {
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_insert_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, bean); 
     axis2_thread_mutex_lock(bean_mgr_impl->mutex);
-    AXIS2_LOG_INFO(env->log, "came1*************************************");
     axis2_hash_set(bean_mgr_impl->table, key, AXIS2_HASH_KEY_STRING, bean);
     axis2_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_insert_impl");
     return AXIS2_TRUE;
 }
 
@@ -277,8 +272,6 @@
 {
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
     sandesha2_rm_bean_t *bean = NULL;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_remove_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, key, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -291,8 +284,6 @@
     axis2_thread_mutex_lock(bean_mgr_impl->mutex);
     axis2_hash_set(bean_mgr_impl->table, key, AXIS2_HASH_KEY_STRING, NULL);
     axis2_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_remove_impl");
     return AXIS2_TRUE;
 }
 
@@ -304,8 +295,6 @@
 {
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
     sandesha2_rm_bean_t *bean = NULL;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_retrieve_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, key, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -319,8 +308,6 @@
     bean = (sandesha2_rm_bean_t *) axis2_hash_get(bean_mgr_impl->table, 
             key, AXIS2_HASH_KEY_STRING);
     axis2_thread_mutex_unlock(bean_mgr_impl->mutex);
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_retrieve_impl");
     return bean;
 }
 
@@ -333,8 +320,6 @@
 {
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
     sandesha2_rm_bean_t *old_bean = NULL;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_update_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -348,8 +333,6 @@
     if(!old_bean)
         return AXIS2_FALSE;
     sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, old_bean);
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_update_impl");
     return AXIS2_TRUE;
 }
 
@@ -362,11 +345,7 @@
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
     axis2_array_list_t *beans = NULL;
     axis2_hash_index_t *index = NULL;
-    void *v = NULL;
     int i = 0, size = 0;
-    axis2_bool_t remove = AXIS2_TRUE;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_find_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
     beans = axis2_array_list_create(env, 0);
@@ -379,12 +358,14 @@
     for (index = axis2_hash_first (bean_mgr_impl->table, env); index; 
             index = axis2_hash_next (env, index))
     {
+        void *v = NULL;
+        const void *key = NULL;
         sandesha2_rm_bean_t *candidate = NULL;
-        axis2_hash_this (index, NULL, NULL, &v);
+        axis2_hash_this (index, &key, NULL, &v);
         candidate = (sandesha2_rm_bean_t *) v;
+        if(!candidate)
+            continue;
     
-        if(bean && bean == candidate)
-            remove = AXIS2_FALSE;
         if(bean && sandesha2_inmemory_bean_mgr_match(bean_mgr, env, bean, 
             candidate))
         {
@@ -396,22 +377,38 @@
     axis2_thread_mutex_unlock(bean_mgr_impl->mutex);
     /* Now we have a point-in-time view of the beans, lock them all.*/
     size = AXIS2_ARRAY_LIST_SIZE(beans, env);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "size:%d", size);
     for(i = 0; i < size; i++)
     {
         sandesha2_rm_bean_t *temp = AXIS2_ARRAY_LIST_GET(beans, env, i);
-        sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, temp);
-                
+        if(temp)
+            sandesha2_storage_mgr_enlist_bean(bean_mgr_impl->storage_mgr, env, 
+                temp);
     }
     /* Finally remove any beans that are no longer in the table */
-    if(remove && size > 0)
+    axis2_thread_mutex_lock(bean_mgr_impl->mutex);
+    size = AXIS2_ARRAY_LIST_SIZE(beans, env);
+    for(i = 0; i < size; i++)
     {
-        int idx = AXIS2_ARRAY_LIST_INDEX_OF(beans, env, bean);
-        if(idx != -1)
-            AXIS2_ARRAY_LIST_REMOVE(beans, env, idx);
+        sandesha2_rm_bean_t *temp = AXIS2_ARRAY_LIST_GET(beans, env, i);
+        if(temp)
+        {
+            axis2_char_t *key = sandesha2_rm_bean_get_key(temp, env);
+            if(axis2_hash_contains_key(bean_mgr_impl->table, env, key))
+            {
+                void *value = axis2_hash_get(bean_mgr_impl->table, key, 
+                    AXIS2_HASH_KEY_STRING);
+                if(!value)
+                {
+                    AXIS2_ARRAY_LIST_REMOVE(beans, env, i);
+                }
+            }
+            else
+            {
+                AXIS2_ARRAY_LIST_REMOVE(beans, env, i);
+            }
+        }
     }
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_find_impl");
+    axis2_thread_mutex_unlock(bean_mgr_impl->mutex);
     return beans;
 }
 
@@ -423,10 +420,8 @@
 {
     sandesha2_inmemory_bean_mgr_impl_t *bean_mgr_impl = NULL;
     axis2_array_list_t *beans = NULL;
-    int i = 0, size = 0;
+    int size = 0;
     sandesha2_rm_bean_t *ret = NULL;
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Start:sandesha2_inmemory_bean_mgr_find_unique_impl");
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     bean_mgr_impl = SANDESHA2_INTF_TO_IMPL(bean_mgr);
@@ -439,13 +434,8 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NON_UNIQUE_RESULT, AXIS2_FAILURE);
         return NULL;
     }
-    for(i = 0; i < size; i++)
-    {
-       ret = AXIS2_ARRAY_LIST_GET(beans, env, i);
-       break;
-    }
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_bean_mgr_find_unique_impl");
+    if(size == 1)
+       ret = AXIS2_ARRAY_LIST_GET(beans, env, 0);
     return ret;
 }
 

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_create_seq_mgr.c Thu Dec 14 21:33:32 2006
@@ -153,7 +153,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
 
-    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(bean, env);
+    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
+        (sandesha2_rm_bean_t *) bean, env);
     ret = sandesha2_inmemory_bean_mgr_insert(seq_mgr_impl->bean_mgr, env, 
         msg_id, (sandesha2_rm_bean_t *) bean);
     AXIS2_LOG_INFO(env->log, 
@@ -206,7 +207,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
 
-    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(bean, env);
+    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
+        (sandesha2_rm_bean_t *) bean, env);
     if(!msg_id)
     {
         return AXIS2_FALSE;
@@ -270,10 +272,9 @@
     axis2_char_t *temp_internal_seq_id = NULL;
     AXIS2_LOG_INFO(env->log, 
         "[sandesha2]Entry:sandesha2_inmemory_create_seq_mgr_match");
-    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
-        (sandesha2_create_seq_bean_t *) bean, env);
-    temp_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
-        (sandesha2_create_seq_bean_t *) candidate, env);
+    msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(bean, env);
+    temp_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(candidate, 
+        env);
     if(msg_id && temp_msg_id && 0 != AXIS2_STRCMP(msg_id, temp_msg_id))
     {
         equal = AXIS2_FALSE;

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_invoker_mgr.c Thu Dec 14 21:33:32 2006
@@ -151,7 +151,8 @@
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
 
-    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(bean, env);
+    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
+        (sandesha2_rm_bean_t *) bean, env);
     ret = sandesha2_inmemory_bean_mgr_insert(invoker_mgr_impl->bean_mgr, env,
         ref_key, (sandesha2_rm_bean_t *) bean);
     AXIS2_LOG_INFO(env->log, 
@@ -210,7 +211,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     invoker_mgr_impl = SANDESHA2_INTF_TO_IMPL(invoker_mgr);
 
-    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(bean, env);
+    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
+        (sandesha2_rm_bean_t *) bean, env);
     if(!ref_key)
     {
         return AXIS2_FALSE;
@@ -275,10 +277,8 @@
     
     AXIS2_LOG_INFO(env->log, 
         "[sandesha2]Entry:sandesha2_inmemory_create_invoker_mgr_match");
-    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
-        (sandesha2_invoker_bean_t *) bean, env);
-    temp_ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(
-        (sandesha2_invoker_bean_t *) candidate, env);
+    ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(bean, env);
+    temp_ref_key = sandesha2_invoker_bean_get_msg_ctx_ref_key(candidate, env);
     if(ref_key && temp_ref_key && 0 != AXIS2_STRCMP(ref_key, temp_ref_key))
     {
         select = AXIS2_FALSE;

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_next_msg_mgr.c Thu Dec 14 21:33:32 2006
@@ -168,7 +168,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
 
-    seq_id = sandesha2_next_msg_bean_get_seq_id(bean, env);
+    seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) bean, 
+        env);
     if(!seq_id)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_KEY_IS_NULL, AXIS2_FAILURE);
@@ -219,7 +220,8 @@
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
-    seq_id = sandesha2_next_msg_bean_get_seq_id(bean, env);
+    seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) bean, 
+        env);
     if(!seq_id)
     {
         return AXIS2_FALSE;
@@ -294,9 +296,9 @@
         equal = AXIS2_FALSE;
     }
     seq_id = sandesha2_next_msg_bean_get_seq_id(
-         (sandesha2_next_msg_bean_t *) bean, env);
+         (sandesha2_rm_bean_t *) bean, env);
     temp_seq_id = sandesha2_next_msg_bean_get_seq_id(
-        (sandesha2_next_msg_bean_t *) candidate, env);
+        (sandesha2_rm_bean_t *) candidate, env);
     if(seq_id && temp_seq_id && 0 != AXIS2_STRCMP(seq_id, temp_seq_id))
     {
         equal = AXIS2_FALSE;

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_sender_mgr.c Thu Dec 14 21:33:32 2006
@@ -167,7 +167,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
 
-    msg_id = sandesha2_sender_bean_get_msg_id(bean, env);
+    msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) bean, 
+        env);
     if(!msg_id)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_KEY_IS_NULL, AXIS2_FAILURE);
@@ -221,8 +222,8 @@
     const axis2_env_t *env,
     sandesha2_sender_bean_t *bean)
 {
-    axis2_char_t *msg_id = NULL;
-    axis2_bool_t ret = AXIS2_FALSE;
+    /*axis2_char_t *msg_id = NULL;
+    axis2_bool_t ret = AXIS2_FALSE;*/
     sandesha2_inmemory_sender_mgr_t *sender_mgr_impl = NULL;
 
     AXIS2_LOG_INFO(env->log, 
@@ -231,16 +232,8 @@
     AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
     sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
 
-    msg_id = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
-    if(!msg_id)
-    {
-        return AXIS2_FALSE;
-    }
-    ret = sandesha2_inmemory_bean_mgr_update(sender_mgr_impl->bean_mgr, env,
-        msg_id, (sandesha2_rm_bean_t *) bean);
-    AXIS2_LOG_INFO(env->log, 
-        "[sandesha2]Exit:sandesha2_inmemory_sender_mgr_update:return:%d", ret);
-    return ret;
+    /* No need to update. Being a reference does the job. */
+    return AXIS2_SUCCESS;
 }
 
 axis2_array_list_t *AXIS2_CALL
@@ -323,8 +316,6 @@
     int temp_msg_type = 0;
     axis2_bool_t is_send = AXIS2_FALSE;
     axis2_bool_t temp_is_send = AXIS2_FALSE;
-    axis2_bool_t is_resend = AXIS2_FALSE;
-    axis2_bool_t temp_is_resend = AXIS2_FALSE;
     
     AXIS2_LOG_INFO(env->log, 
         "[sandesha2]Entry:sandesha2_inmemory_sender_mgr_match");
@@ -340,14 +331,15 @@
         (sandesha2_sender_bean_t *) bean, env);
     temp_time_to_send = sandesha2_sender_bean_get_time_to_send(
         (sandesha2_sender_bean_t *) candidate, env);
-    if(time_to_send > 0 && (time_to_send < temp_time_to_send))
+    /*if(time_to_send > 0 && (time_to_send < temp_time_to_send))*/
+    if(time_to_send > 0 && (time_to_send != temp_time_to_send))
     {
         add = AXIS2_FALSE;
     }
     msg_id = sandesha2_sender_bean_get_msg_id(
-        (sandesha2_sender_bean_t *) bean, env);
+        (sandesha2_rm_bean_t *) bean, env);
     temp_msg_id = sandesha2_sender_bean_get_msg_id(
-        (sandesha2_sender_bean_t *) candidate, env);
+        (sandesha2_rm_bean_t *) candidate, env);
     if(msg_id && temp_msg_id && 0 != AXIS2_STRCMP(msg_id, temp_msg_id))
     {
         add = AXIS2_FALSE;
@@ -386,14 +378,16 @@
     {
         add = AXIS2_FALSE;
     }
-    is_resend = sandesha2_sender_bean_is_resend(
+    /* Do not use the is_resend flag to match messages, as it can stop us from
+     * detecting RM messages during 'get_next_msg_to_send'*/
+    /*is_resend = sandesha2_sender_bean_is_resend(
         (sandesha2_sender_bean_t *) bean, env);
     temp_is_resend = sandesha2_sender_bean_is_resend(
         (sandesha2_sender_bean_t *) candidate, env);
     if(is_resend != temp_is_resend)
     {
         add = AXIS2_FALSE;
-    }
+    }*/
     AXIS2_LOG_INFO(env->log, 
         "[sandesha2]Exit:sandesha2_inmemory_sender_mgr_match:add:%d", 
             add);

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_seq_property_mgr.c Thu Dec 14 21:33:32 2006
@@ -133,7 +133,7 @@
 
     seq_prop_mgr_impl->values = NULL;
     seq_prop_mgr_impl->bean_mgr = sandesha2_inmemory_bean_mgr_create(env,
-        storage_mgr, ctx, SANDESHA2_BEAN_MAP_CREATE_SEQUENCE);
+        storage_mgr, ctx, SANDESHA2_BEAN_MAP_SEQ_PROPERTY);
     seq_prop_mgr_impl->bean_mgr->ops.match = sandesha2_inmemory_seq_property_mgr_match;
     seq_prop_mgr_impl->seq_prop_mgr.ops = seq_property_mgr_ops;
     return &(seq_prop_mgr_impl->seq_prop_mgr);
@@ -239,9 +239,6 @@
     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]key:%s", key);
     ret = (sandesha2_seq_property_bean_t *) sandesha2_inmemory_bean_mgr_retrieve(
         seq_prop_mgr_impl->bean_mgr, env, key);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came30********************************");
-    if(ret)
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "came31********************************");
     AXIS2_FREE(env->allocator, key);
     AXIS2_LOG_INFO(env->log, 
         "[sandesha2]Exit:sandesha2_inmemory_seq_property_mgr_retrieve");

Modified: webservices/sandesha/trunk/c/src/util/ack_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/ack_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Thu Dec 14 21:33:32 2006
@@ -64,12 +64,12 @@
     ref_msg = sandesha2_msg_ctx_get_msg_ctx(ref_rm_msg, env);
     conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(ref_msg, env);
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr,
-                        env);
+        env);
     acks_to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
-                        seq_id, SANDESHA2_SEQ_PROP_ACKS_TO_EPR);
+        seq_id, SANDESHA2_SEQ_PROP_ACKS_TO_EPR);
     acks_to = axis2_endpoint_ref_create(env, 
-                        sandesha2_seq_property_bean_get_value(acks_to_bean, 
-                        env));
+        sandesha2_seq_property_bean_get_value(acks_to_bean, 
+            env));
     if(acks_to)
         acks_to_str = (axis2_char_t*)AXIS2_ENDPOINT_REF_GET_ADDRESS(acks_to, env);
     if(!acks_to_str)
@@ -99,11 +99,11 @@
     ack_msg_ctx = sandesha2_utils_create_new_related_msg_ctx(env, ref_rm_msg,
         ack_op);
     property = AXIS2_MSG_CTX_GET_PROPERTY(ref_msg, env, AXIS2_WSA_VERSION, 
-                        AXIS2_FALSE);
+        AXIS2_FALSE);
     if(property)
     {
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, AXIS2_WSA_VERSION, property,
-                        AXIS2_FALSE);
+            AXIS2_FALSE);
         property = NULL;
     }
     
@@ -112,32 +112,32 @@
     {
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(SANDESHA2_VALUE_TRUE, 
-                        env));
+            env));
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, 
-                        SANDESHA2_APPLICATION_PROCESSING_DONE, property,
-                        AXIS2_FALSE);
+            SANDESHA2_APPLICATION_PROCESSING_DONE, property,
+                AXIS2_FALSE);
         property = NULL;
     }
     ack_rm_msg = sandesha2_msg_init_init_msg(env, ack_msg_ctx);
     sandesha2_msg_ctx_set_rm_ns_val(ack_rm_msg, env, 
-                        sandesha2_msg_ctx_get_rm_ns_val(ref_rm_msg, env));
+        sandesha2_msg_ctx_get_rm_ns_val(ref_rm_msg, env));
     AXIS2_MSG_CTX_SET_WSA_MESSAGE_ID(ack_msg_ctx, env, axis2_uuid_gen(env));
     soap_env = axiom_soap_envelope_create_default_soap_envelope(env, 
-                        sandesha2_utils_get_soap_version(env, 
-                        AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(ref_msg, env)));
+        sandesha2_utils_get_soap_version(env, 
+        AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(ref_msg, env)));
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(ack_msg_ctx, env, soap_env);
     AXIS2_MSG_CTX_SET_TO(ack_msg_ctx, env, acks_to);
     /* Adding the sequence acknowledgement part */
     sandesha2_msg_creator_add_ack_msg(env, ack_rm_msg, seq_id, storage_mgr);
     AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL, 
-            AXIS2_FALSE);
+        AXIS2_FALSE);
     addr_ns_uri = sandesha2_utils_get_seq_property(env, seq_id, 
-                        SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, 
-                        storage_mgr);
+        SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, 
+            storage_mgr);
     if(addr_ns_uri)
     {
         property = AXIS2_MSG_CTX_GET_PROPERTY(ack_msg_ctx, env, AXIS2_WSA_VERSION, 
-                AXIS2_FALSE);
+            AXIS2_FALSE);
         if(property)
         {
             AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(addr_ns_uri, 
@@ -171,14 +171,14 @@
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP("TRUE", env));
         AXIS2_CTX_SET_PROPERTY(ref_ctx, env, AXIS2_RESPONSE_WRITTEN,
-                        property, AXIS2_FALSE);
+            property, AXIS2_FALSE);
         
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
-                        SANDESHA2_VALUE_TRUE, env));
+            SANDESHA2_VALUE_TRUE, env));
         AXIS2_MSG_CTX_SET_PROPERTY(ref_msg, env, SANDESHA2_ACK_WRITTEN, property,
-                        AXIS2_FALSE);
+            AXIS2_FALSE);
         /*AXIS2_CTX_SET_PROPERTY(ref_ctx, env, SANDESHA2_ACK_WRITTEN, property, 
                 AXIS2_FALSE);*/
         AXIS2_MSG_CTX_SET_SERVER_SIDE(ack_msg_ctx, env, AXIS2_TRUE);
@@ -204,8 +204,8 @@
         ack_bean = sandesha2_sender_bean_create(env);
         sandesha2_sender_bean_set_msg_ctx_ref_key(ack_bean, env, key);
         sandesha2_sender_bean_set_msg_id(ack_bean, env, 
-                        (axis2_char_t*)AXIS2_MSG_CTX_GET_WSA_MESSAGE_ID(
-                        ack_msg_ctx, env));
+            (axis2_char_t*)AXIS2_MSG_CTX_GET_WSA_MESSAGE_ID(
+                ack_msg_ctx, env));
         sandesha2_sender_bean_set_resend(ack_bean, env, AXIS2_FALSE);
         sandesha2_sender_bean_set_seq_id(ack_bean, env, seq_id);
         sandesha2_sender_bean_set_send(ack_bean, env, AXIS2_TRUE);
@@ -213,66 +213,67 @@
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
-                        SANDESHA2_VALUE_FALSE, env));
+            SANDESHA2_VALUE_FALSE, env));
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, 
-                        SANDESHA2_QUALIFIED_FOR_SENDING, property, AXIS2_FALSE);
+            SANDESHA2_QUALIFIED_FOR_SENDING, property, AXIS2_FALSE);
         sandesha2_sender_bean_set_msg_type(ack_bean, env, 
-                        SANDESHA2_MSG_TYPE_ACK);
+            SANDESHA2_MSG_TYPE_ACK);
 
         ack_int_bean = sandesha2_utils_get_property_bean_from_op(env,
-                        AXIS2_MSG_CTX_GET_OP(ref_msg, env));
+            AXIS2_MSG_CTX_GET_OP(ref_msg, env));
         ack_interval = sandesha2_property_bean_get_ack_interval(ack_int_bean, 
-                        env);
+            env);
         time_to_send = sandesha2_utils_get_current_time_in_millis(env) + 
-                        ack_interval;
+            ack_interval;
         find_bean = sandesha2_sender_bean_create(env);
         sandesha2_sender_bean_set_msg_type(find_bean, env, 
-                        SANDESHA2_MSG_TYPE_ACK);
+            SANDESHA2_MSG_TYPE_ACK);
         sandesha2_sender_bean_set_send(find_bean, env, AXIS2_TRUE);
         sandesha2_sender_bean_set_resend(find_bean, env, AXIS2_FALSE);
         bean_list = sandesha2_sender_mgr_find_by_sender_bean(retrans_mgr, env, 
-                        find_bean);
+            find_bean);
         
         for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(bean_list, env); i++)
         {
             sandesha2_sender_bean_t *old_ack_bean = NULL;
             old_ack_bean = AXIS2_ARRAY_LIST_GET(bean_list, env, i);
             time_to_send = sandesha2_sender_bean_get_time_to_send(old_ack_bean,
-                        env);
+                env);
             sandesha2_sender_mgr_remove(retrans_mgr, env, 
-                        sandesha2_sender_bean_get_msg_id(old_ack_bean, env));
+                sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
+                    old_ack_bean, env));
             sandesha2_storage_mgr_remove_msg_ctx(storage_mgr, env, 
-                        sandesha2_sender_bean_get_msg_ctx_ref_key(
-                        old_ack_bean, env));
+                sandesha2_sender_bean_get_msg_ctx_ref_key(
+                    old_ack_bean, env));
         }
         sandesha2_sender_bean_set_time_to_send(ack_bean, env, time_to_send);
         sandesha2_storage_mgr_store_msg_ctx(storage_mgr, env, key, ack_msg_ctx);
         sandesha2_sender_mgr_insert(retrans_mgr, env, ack_bean);
         
         orig_trans_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(ack_msg_ctx, 
-                        env);
+            env);
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
         AXIS2_PROPERTY_SET_VALUE(property, env, orig_trans_out);
         AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
             orig_trans_out->ops->free_void_arg);
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env,
-                            SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC, property,
-                            AXIS2_FALSE);
+            SANDESHA2_ORIGINAL_TRANSPORT_OUT_DESC, property,
+                AXIS2_FALSE);
         
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
-                        SANDESHA2_VALUE_TRUE, env));
+            SANDESHA2_VALUE_TRUE, env));
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, 
-                        SANDESHA2_SET_SEND_TO_TRUE, property, AXIS2_FALSE);
+            SANDESHA2_SET_SEND_TO_TRUE, property, AXIS2_FALSE);
                         
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
-                        key, env));
+            key, env));
         AXIS2_MSG_CTX_SET_PROPERTY(ack_msg_ctx, env, 
-                        SANDESHA2_MESSAGE_STORE_KEY, property, AXIS2_FALSE);
+            SANDESHA2_MESSAGE_STORE_KEY, property, AXIS2_FALSE);
         
         trans_out = sandesha2_utils_get_transport_out(env);
         AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(ack_msg_ctx, env, trans_out);
@@ -469,7 +470,8 @@
             if(0 == AXIS2_STRCMP(to, to_str))
                 continue; 
             sandesha2_sender_mgr_remove(retrans_mgr, env, 
-                        sandesha2_sender_bean_get_msg_id(sender_bean, env));
+                sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) 
+                    sender_bean, env));
             ack_rm_msg = sandesha2_msg_init_init_msg(env, msg_ctx1);
             if(SANDESHA2_MSG_TYPE_ACK != sandesha2_msg_ctx_get_msg_type(ack_rm_msg, 
                         env))

Modified: webservices/sandesha/trunk/c/src/util/error.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/error.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/util/error.c (original)
+++ webservices/sandesha/trunk/c/src/util/error.c Thu Dec 14 21:33:32 2006
@@ -185,6 +185,10 @@
         "MakeConnection is not supported in this RM version";
     sandesha2_error_messages[SANDESHA2_ERROR_INVALID_MAKE_CONNECTION_MSG]=
         "Invalid MakeConnection message. Either Address or Identifier must be present";
+    sandesha2_error_messages[SANDESHA2_ERROR_CANNOT_OPEN_DATABASE]=
+        "Database cannot be opened";
+    sandesha2_error_messages[SANDESHA2_ERROR_SQL_ERROR]=
+        "There is an sql error. Please refer logs";
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/sandesha/trunk/c/src/util/fault_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/fault_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/util/fault_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/fault_mgr.c Thu Dec 14 21:33:32 2006
@@ -216,7 +216,8 @@
                 axis2_char_t *tmp_id = NULL;
                 
                 next_bean = AXIS2_ARRAY_LIST_GET(list, env, i);
-                tmp_id = sandesha2_next_msg_bean_get_seq_id(next_bean, env);
+                tmp_id = sandesha2_next_msg_bean_get_seq_id(
+                    (sandesha2_rm_bean_t *) next_bean, env);
                 if(0 == AXIS2_STRCMP(seq_id, tmp_id))
                 {
                     contains = AXIS2_TRUE;

Modified: webservices/sandesha/trunk/c/src/util/property_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_bean.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_bean.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_bean.c Thu Dec 14 21:33:32 2006
@@ -30,7 +30,7 @@
     long retrans_interval;
     axis2_bool_t is_exp_backoff;
     axis2_char_t *in_mem_storage_mgr;
-    axis2_char_t *permanant_storage_mgr;
+    axis2_char_t *permanent_storage_mgr;
     axis2_bool_t is_in_order;
     axis2_array_list_t *msg_types_to_drop;
     int max_retrans_count;
@@ -56,7 +56,7 @@
     bean->retrans_interval = 0;
     bean->is_exp_backoff = 0;
     bean->in_mem_storage_mgr = NULL;
-    bean->permanant_storage_mgr= NULL;
+    bean->permanent_storage_mgr= NULL;
     bean->is_in_order = AXIS2_FALSE;
     bean->msg_types_to_drop = NULL;
     bean->max_retrans_count = 0;
@@ -91,10 +91,10 @@
         AXIS2_FREE(env->allocator, bean->in_mem_storage_mgr);
         bean->in_mem_storage_mgr = NULL;
     }
-    if(bean->permanant_storage_mgr)
+    if(bean->permanent_storage_mgr)
     {
-        AXIS2_FREE(env->allocator, bean->permanant_storage_mgr);
-        bean->permanant_storage_mgr = NULL;
+        AXIS2_FREE(env->allocator, bean->permanent_storage_mgr);
+        bean->permanent_storage_mgr = NULL;
     }
 	AXIS2_FREE(env->allocator, bean);
 	return AXIS2_SUCCESS;
@@ -225,22 +225,22 @@
 }
             
 axis2_char_t* AXIS2_CALL
-sandesha2_property_bean_get_permanant_storage_mgr(
+sandesha2_property_bean_get_permanent_storage_mgr(
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return bean->permanant_storage_mgr;
+    return bean->permanent_storage_mgr;
 }
             
 axis2_status_t AXIS2_CALL
-sandesha2_property_bean_set_permanant_storage_mgr(
+sandesha2_property_bean_set_permanent_storage_mgr(
     sandesha2_property_bean_t *bean,
     const axis2_env_t *env, axis2_char_t *manager)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, manager, AXIS2_FAILURE);
-    bean->permanant_storage_mgr = AXIS2_STRDUP(
+    bean->permanent_storage_mgr = AXIS2_STRDUP(
                         manager, env);
     return AXIS2_SUCCESS;
 }

Modified: webservices/sandesha/trunk/c/src/util/property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/property_mgr.c?view=diff&rev=487452&r1=487451&r2=487452
==============================================================================
--- webservices/sandesha/trunk/c/src/util/property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/property_mgr.c Thu Dec 14 21:33:32 2006
@@ -106,7 +106,7 @@
     /* will be useful when we are loading libraries */
     sandesha2_property_bean_set_in_mem_storage_mgr(property_bean, env,
         SANDESHA2_DEF_VAL_IN_MEMORY_STORAGE_MGR);
-    sandesha2_property_bean_set_permanant_storage_mgr(property_bean, env,
+    sandesha2_property_bean_set_permanent_storage_mgr(property_bean, env,
         SANDESHA2_DEF_VAL_PERM_STORAGE_MGR);
     sandesha2_property_bean_set_max_retrans_count(property_bean, env,
         SANDESHA2_DEF_VAL_MAX_RETR_COUNT);
@@ -332,7 +332,7 @@
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, property_bean, AXIS2_FAILURE);
     
-    sandesha2_property_bean_set_permanant_storage_mgr(property_bean, env, 
+    sandesha2_property_bean_set_permanent_storage_mgr(property_bean, env, 
         value);
     
     return AXIS2_SUCCESS;



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org