You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by sa...@apache.org on 2006/07/23 20:05:55 UTC

svn commit: r424772 - in /webservices/sandesha/trunk/c: ./ config/ include/ include/sandesha2/ src/ src/client/ src/core/ src/handlers/ src/storage/ src/storage/inmemory/ src/util/

Author: sahan
Date: Sun Jul 23 11:05:53 2006
New Revision: 424772

URL: http://svn.apache.org/viewvc?rev=424772&view=rev
Log:
Adding a core dir
Adding module xml
Fixing some bugs

Added:
    webservices/sandesha/trunk/c/config/
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/src/core/
    webservices/sandesha/trunk/c/src/core/Makefile.am
      - copied, changed from r424527, webservices/sandesha/trunk/c/src/Makefile.am
    webservices/sandesha/trunk/c/src/core/mod_sandesha2.c
      - copied, changed from r424511, webservices/sandesha/trunk/c/src/mod_sandesha2.c
    webservices/sandesha/trunk/c/src/core/msg_ctx.c
      - copied unchanged from r424511, webservices/sandesha/trunk/c/src/msg_ctx.c
    webservices/sandesha/trunk/c/src/core/msg_validator.c
      - copied unchanged from r424527, webservices/sandesha/trunk/c/src/msg_validator.c
Removed:
    webservices/sandesha/trunk/c/src/Makefile.am
    webservices/sandesha/trunk/c/src/mod_sandesha2.c
    webservices/sandesha/trunk/c/src/msg_ctx.c
    webservices/sandesha/trunk/c/src/msg_validator.c
Modified:
    webservices/sandesha/trunk/c/Makefile.am
    webservices/sandesha/trunk/c/build.sh
    webservices/sandesha/trunk/c/configure.ac
    webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h
    webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h
    webservices/sandesha/trunk/c/src/client/Makefile.am
    webservices/sandesha/trunk/c/src/handlers/Makefile.am
    webservices/sandesha/trunk/c/src/storage/Makefile.am
    webservices/sandesha/trunk/c/src/storage/inmemory/Makefile.am
    webservices/sandesha/trunk/c/src/util/Makefile.am
    webservices/sandesha/trunk/c/src/util/msg_creator.c
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/util/seq_mgr.c
    webservices/sandesha/trunk/c/src/util/spec_specific_consts.c
    webservices/sandesha/trunk/c/src/util/utils.c

Modified: webservices/sandesha/trunk/c/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/Makefile.am (original)
+++ webservices/sandesha/trunk/c/Makefile.am Sun Jul 23 11:05:53 2006
@@ -1,2 +1,4 @@
+datadir=$(prefix)/sandesha2
 SUBDIRS = src
+data_DATA = LICENSE config/module.xml
 

Modified: webservices/sandesha/trunk/c/build.sh
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/build.sh?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/build.sh (original)
+++ webservices/sandesha/trunk/c/build.sh Sun Jul 23 11:05:53 2006
@@ -1,6 +1,5 @@
 #!/bin/bash
 ./autogen.sh
-./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include --with-axis2_util=${AXIS2C_HOME}/include --with-axis2_axiom=${AXIS2C_HOME}/include
-make
+./configure --prefix=`pwd` --enable-static=no --with-axis2=${AXIS2C_HOME}/include
 make
 make install

Added: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?rev=424772&view=auto
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (added)
+++ webservices/sandesha/trunk/c/config/module.xml Sun Jul 23 11:05:53 2006
@@ -0,0 +1,50 @@
+<module name="sandesha2" class="sandesha2">
+
+    <Description>
+        This module implements WS-ReliableMessaging for Axis2C. This implements both the WSRM submitted spec and the new spec being developed under the OASIS WSRX group.
+    </Description>
+    
+    <inflow>
+        <handler name="SandeshaGlobalInHandler" class="sandesha2">
+            <!-- Global In handler should come before instance dispatching -->
+            <order phase="Dispatch" before="InstanceDispatcher" />
+        </handler> 
+        <handler name="SandeshaInHandler" class="mod_sandesha2">
+            <order phase="RMPhase"/>
+        </handler>
+    </inflow>
+
+    <outflow>        
+        <handler name="SandeshaOutHandler" class="sandesha2">
+            <order phase="RMPhase"/>
+        </handler>   
+    </outflow>
+    
+    <INfaultflow>        
+        <handler name="SandeshaGlobalInHandler" class="sandesha2">
+            <!-- Global In handler should come before instance dispatching -->
+            <order phase="Dispatch" before="InstanceDispatcher" />
+        </handler> 
+        <handler name="SandeshaInHandler" class="sandesha2">
+            <order phase="RMPhase"/>
+        </handler>
+    </INfaultflow>
+    
+    <OUTfaultflow>        
+        <handler name="SandeshaOutHandler" class="sandesha2">
+            <order phase="RMPhase"/>
+        </handler>   
+    </OUTfaultflow>
+
+
+   <!-- Database connection parameters -->
+   <parameter name="sandesha2.db.conn.id" locked="false">jdbc:derby:SANDESHA2DB;create=true</parameter>
+   <parameter name="sandesha2.db.driver" locked="false">org.apache.derby.jdbc.EmbeddedDriver</parameter>
+   <parameter name="sandesha2.db.sql.dialect" locked="false">org.hibernate.dialect.DerbyDialect</parameter>
+   <parameter name="sandesha2.db.username" locked="false"></parameter>
+   <parameter name="sandesha2.db.password" locked="false"></parameter>  
+   <parameter name="sandesha2.db.create.mode" locked="false">update</parameter> 
+
+
+
+</module>

Modified: webservices/sandesha/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/configure.ac?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/configure.ac (original)
+++ webservices/sandesha/trunk/c/configure.ac Sun Jul 23 11:05:53 2006
@@ -38,7 +38,7 @@
 AC_FUNC_REALLOC
 #AC_CHECK_FUNCS([memmove])
 
-AC_MSG_CHECKING(To Use Axis2C . This is a compulsory to build Sandesha2C)
+AC_MSG_CHECKING(path to use Axis2C . This is a compulsory to build Sandesha2C)
 AC_ARG_WITH(axis2,
 [  --with-axis2[=PATH]      use axis2c.],
 [ case "$withval" in
@@ -46,7 +46,7 @@
     AC_MSG_RESULT(no)
     ;;
   *)
-    AC_MSG_RESULT(yes)
+    AC_MSG_RESULT($withval)
     dnl Find axis2 include dir in the path
     if test -d $withval; then
         axis2inc="-I$withval"
@@ -61,55 +61,7 @@
   AC_MSG_RESULT(no)
 )
 
-AC_MSG_CHECKING(To Use Axis2 C Util. This is a compulsory module to build Axis2 C)
-AC_ARG_WITH(axis2_util,
-[  --with-axis2_util[=PATH]      use axis2_util.],
-[ case "$withval" in
-  no)
-    AC_MSG_RESULT(no)
-    ;;
-  *)
-    AC_MSG_RESULT(yes)
-    dnl Find axis2_util include dir in the path
-    if test -d $withval; then
-        axis2_utilinc="-I$withval"
-    dnl else find the axis2_util include dir in $(AXIS2C_HOME)/include
-    elif test -d '$(AXIS2C_HOME)/include'; then
-        axis2_utilinc="-I$(AXIS2C_HOME)/include"
-    else
-        AC_MSG_ERROR(could not find axis2_util. stop)
-    fi
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
-AC_MSG_CHECKING(To Use Axis2 C AXIOM. This is a compulsory module to build Axis2 C)
-AC_ARG_WITH(axiom,
-[  --with-axiom[=PATH]      use axiom.],
-[ case "$withval" in
-  no)
-    AC_MSG_RESULT(no)
-    ;;
-  *)
-    AC_MSG_RESULT(yes)
-    dnl Find axiom include dir in the path
-    if test -d $withval; then
-        axiominc="-I$withval"
-    dnl else find the axiom include dir in $(AXIS2C_HOME)/include
-    elif test -d '$(AXIS2C_HOME)/include'; then
-        axiominc="-I$(AXIS2C_HOME)/include"
-    else
-        AC_MSG_ERROR(could not find axiom. stop)
-    fi
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
 AXIS2INC=$axis2inc
-AXIOMINC=$axiominc
-UTILINC=$axis2_utilinc
 
 AC_SUBST(AXIS2INC)
 AC_SUBST(AXIOMINC)
@@ -127,6 +79,7 @@
     src/storage/beans/Makefile\
     src/storage/inmemory/Makefile\
     src/client/Makefile
+    src/core/Makefile
     ])
     
 AC_OUTPUT

Modified: webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h Sun Jul 23 11:05:53 2006
@@ -123,6 +123,12 @@
 sandesha2_spec_specific_consts_get_terminate_seq_soap_action(
         const axis2_env_t *env,
         axis2_char_t *spec_version);
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL        
+sandesha2_spec_specific_consts_get_teminate_seq_res_action(
+        const axis2_env_t *env,
+        axis2_char_t *spec_version);
+        
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_mgr.h Sun Jul 23 11:05:53 2006
@@ -60,6 +60,12 @@
         const axis2_env_t *env,
         axis2_char_t *property_key,
         sandesha2_storage_mgr_t *storage_mgr);
+    
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+sandesha2_seq_mgr_has_seq_timedout(const axis2_env_t *env,
+        axis2_char_t *property_key,
+        sandesha2_msg_ctx_t *rm_msg_ctx,
+        sandesha2_storage_mgr_t *storage_mgr);
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/sandesha/trunk/c/src/client/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/client/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/client/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/client/Makefile.am Sun Jul 23 11:05:53 2006
@@ -7,6 +7,4 @@
 
 INCLUDES = -I$(top_builddir)/include \
 			-I$(top_builddir)/include/sandesha2 \
-			@UTILINC@ \
-			@AXIOMINC@ \
 			@AXIS2INC@

Copied: webservices/sandesha/trunk/c/src/core/Makefile.am (from r424527, webservices/sandesha/trunk/c/src/Makefile.am)
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/Makefile.am?p2=webservices/sandesha/trunk/c/src/core/Makefile.am&p1=webservices/sandesha/trunk/c/src/Makefile.am&r1=424527&r2=424772&rev=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/core/Makefile.am Sun Jul 23 11:05:53 2006
@@ -1,5 +1,5 @@
-SUBDIRS = wsrm storage util transport workers client handlers msgprocessors
-noinst_LTLIBRARIES = libsandesha2.la
+prglibdir=$(prefix)/sandesha2
+prglib_LTLIBRARIES = libsandesha2.la
 
 libsandesha2_la_SOURCES = msg_ctx.c\
                           mod_sandesha2.c\
@@ -7,4 +7,13 @@
 
 INCLUDES = -I$(top_builddir)/include \
             @AXIS2INC@
+libsandesha2_la_LIBADD = ../client/libsandesha_client.la\
+                        ../handlers/libsandesha_handlers.la\
+                        ../msgprocessors/libsandesha2_msgprocessors.la\
+                        ../storage/beans/libsandesha2_storage_beans.la\
+                        ../storage/inmemory/libsandesha2_inmemory.la\
+                        ../transport/libsandesha2_transport.la\
+                        ../util/libsandesha_util.la\
+                        ../workers/libsandesha2_workers.la\
+                        ../wsrm/libsandesha2_wsrm.la
 

Copied: webservices/sandesha/trunk/c/src/core/mod_sandesha2.c (from r424511, webservices/sandesha/trunk/c/src/mod_sandesha2.c)
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/mod_sandesha2.c?p2=webservices/sandesha/trunk/c/src/core/mod_sandesha2.c&p1=webservices/sandesha/trunk/c/src/mod_sandesha2.c&r1=424511&r2=424772&rev=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/mod_sandesha2.c (original)
+++ webservices/sandesha/trunk/c/src/core/mod_sandesha2.c Sun Jul 23 11:05:53 2006
@@ -105,8 +105,11 @@
                         const axis2_env_t *env)
 {
 
-    sandesha2_utils_stop_sender(env);
-    sandesha2_utils_stop_invoker(env);
+    /* currently we don't have conf_ctx passing to shutdown. When we have that
+     * we need to write these util functions at sandesha2_utils
+     * sandesha2_utils_stop_sender(env, conf_ctx);
+     * sandesha2_utils_stop_invoker(env, conf_ctx);
+     */
     if(module->ops)
     {
         AXIS2_FREE(env->allocator, module->ops);

Modified: webservices/sandesha/trunk/c/src/handlers/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/handlers/Makefile.am Sun Jul 23 11:05:53 2006
@@ -7,6 +7,4 @@
 
 INCLUDES = -I$(top_builddir)/include \
 			-I$(top_builddir)/include/sandesha2 \
-			@UTILINC@ \
-			@AXIOMINC@ \
 			@AXIS2INC@

Modified: webservices/sandesha/trunk/c/src/storage/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/storage/Makefile.am Sun Jul 23 11:05:53 2006
@@ -1,10 +1,2 @@
 SUBDIRS = beans inmemory
-lib_LTLIBRARIES = libsandesha2_storage.la
-
-libsandesha2_storage_la_SOURCES =
-
-
-libsandesha2_storage_la_LIBADD =  \
-			$(top_builddir)/src/storage/beans/libsandesha2_storage_beans.la
-
 

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/Makefile.am Sun Jul 23 11:05:53 2006
@@ -11,5 +11,4 @@
 
 INCLUDES = -I$(top_builddir)/include \
 			-I$(top_builddir)/include/sandesha2 \
-			@AXIOMINC@ \
-			@UTILINC@
+			@AXIS2INC@

Modified: webservices/sandesha/trunk/c/src/util/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/Makefile.am?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/util/Makefile.am Sun Jul 23 11:05:53 2006
@@ -16,4 +16,4 @@
 
 INCLUDES = -I$(top_builddir)/include \
 			-I$(top_builddir)/include/sandesha2 \
-			@UTILINC@
+			@AXIS2INC@

Modified: webservices/sandesha/trunk/c/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creator.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Sun Jul 23 11:05:53 2006
@@ -573,6 +573,7 @@
     sandesha2_terminate_seq_res_t *terminate_seq_res = NULL;
     sandesha2_identifier_t *identifier = NULL;
     axiom_soap_envelope_t *soap_envelope = NULL;
+    axis2_char_t *rm_version = NULL;
     
     res_rm_msg = sandesha2_msg_ctx_create(env, out_msg);
     terminate_seq = (sandesha2_terminate_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(
@@ -595,7 +596,21 @@
     SANDESHA2_MSG_CTX_SET_MSG_PART(res_rm_msg, env, 
                         SANDESHA2_MSG_PART_TERMINATE_SEQ_RESPONSE,
                         (sandesha2_iom_rm_part_t*)terminate_seq_res);
-    /*AXIS2_MSG_CTX_SET_WSA_ACTION(out_msg, env, */
+                        
+    rm_version = sandesha2_utils_get_rm_version(env, seq_id, storage_mgr);
+    AXIS2_MSG_CTX_SET_WSA_ACTION(out_msg, env, 
+                        sandesha2_spec_specific_consts_get_teminate_seq_res_action(
+                        env, rm_version));
+    AXIS2_MSG_CTX_SET_SOAP_ACTION(out_msg, env, 
+                        sandesha2_spec_specific_consts_get_teminate_seq_res_action(
+                        env, rm_version));
+    sandesha2_msg_creator_init_creation(env, SANDESHA2_MSG_CTX_GET_MSG_CTX(
+                        ref_rm_msg, env), out_msg);
+    SANDESHA2_MSG_CTX_ADD_SOAP_ENVELOPE(ref_rm_msg, env);
+    sandesha2_msg_creator_finalize_creation(env, SANDESHA2_MSG_CTX_GET_MSG_CTX(
+                        ref_rm_msg, env), out_msg);
+    AXIS2_MSG_CTX_SET_SVR_SIDE(SANDESHA2_MSG_CTX_GET_MSG_CTX(ref_rm_msg, env), 
+                        env, AXIS2_TRUE);
     return res_rm_msg;
 }
 

Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sun Jul 23 11:05:53 2006
@@ -19,6 +19,28 @@
 #include <sandesha2/sandesha2_constants.h>
 #include <sandesha2/sandesha2_spec_specific_consts.h>
 #include <sandesha2_msg_init.h>
+#include <axis2_property.h>
+#include <sandesha2/sandesha2_terminate_mgr.h>
+
+/******************************************************************************/
+sandesha2_sender_bean_t * AXIS2_CALL
+sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(const axis2_env_t *env, 
+                        sandesha2_sender_bean_t *retrans_bean, 
+                        sandesha2_property_bean_t *property_bean);
+
+long AXIS2_CALL
+sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(const axis2_env_t *env,
+                        int count,
+                        long initial_interval);
+                        
+axis2_status_t AXIS2_CALL
+sandesha2_msg_retrans_adjuster_finalize_timedout_seq(const axis2_env_t *env,
+                        axis2_char_t *int_seq_id,
+                        axis2_char_t *seq_id,
+                        axis2_msg_ctx_t *msg_ctx,
+                        sandesha2_storage_mgr_t *storage_mgr);
+
+/******************************************************************************/
 
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
@@ -86,3 +108,79 @@
     return continue_sending;
 }
 
+sandesha2_sender_bean_t * AXIS2_CALL
+sandesha2_msg_retrans_adjuster_adjust_next_retrans_time(const axis2_env_t *env, 
+                        sandesha2_sender_bean_t *retrans_bean, 
+                        sandesha2_property_bean_t *property_bean)
+{
+    int count = -1;
+    long base_interval = -1;
+    long new_interval = -1;
+    long new_time_to_send = 0;
+    long time_now = -1;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, retrans_bean, NULL);
+    AXIS2_PARAM_CHECK(env->error, property_bean, NULL);
+    
+    count = SANDESHA2_SENDER_BEAN_GET_SENT_COUNT(retrans_bean, env);
+    base_interval = SANDESHA2_PROPERTY_BEAN_GET_RETRANS_INTERVAL(property_bean,
+                        env);
+    new_interval = base_interval;
+    if(AXIS2_TRUE == SANDESHA2_PROPERTY_BEAN_IS_EXP_BACKOFF(property_bean, env))
+    {
+        new_interval = sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(env,
+                        count, base_interval);
+    }
+    time_now = sandesha2_utils_get_current_time_in_millis(env);
+    
+    new_time_to_send = time_now + new_interval;
+    SANDESHA2_SENDER_BEAN_SET_TIME_TO_SEND(retrans_bean, env, new_time_to_send);
+    return retrans_bean;
+}
+
+
+
+long AXIS2_CALL
+sandesha2_msg_retrans_adjuster_next_exp_backoff_diff(const axis2_env_t *env,
+                        int count,
+                        long initial_interval)
+{
+    long interval = initial_interval;
+    AXIS2_ENV_CHECK(env, -1);
+    
+    interval = initial_interval * (2^count);
+    return interval;
+}
+
+axis2_status_t AXIS2_CALL
+sandesha2_msg_retrans_adjuster_finalize_timedout_seq(const axis2_env_t *env,
+                        axis2_char_t *int_seq_id,
+                        axis2_char_t *seq_id,
+                        axis2_msg_ctx_t *msg_ctx,
+                        sandesha2_storage_mgr_t *storage_mgr)
+{
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_ctx_t *ctx = NULL;
+    axis2_property_t *property = NULL;
+    
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, int_seq_id, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
+    
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
+    ctx = AXIS2_CONF_CTX_GET_BASE(conf_ctx, env);
+    
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+                        SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
+    AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, property,
+                        AXIS2_FALSE);
+    /* we have to callback listener here */
+    sandesha2_terminate_mgr_time_out_sending_side_seq(env, conf_ctx, int_seq_id,
+                        AXIS2_FALSE, storage_mgr);
+ 
+    return AXIS2_SUCCESS;
+}

Modified: webservices/sandesha/trunk/c/src/util/seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/seq_mgr.c?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Sun Jul 23 11:05:53 2006
@@ -19,7 +19,7 @@
 #include <sandesha2_seq_property_mgr.h>
 #include <sandesha2_create_seq_mgr.h>
 #include <sandesha2_spec_specific_consts.h>
-#include <sandesha2_utils.h>
+#include <sandesha2/sandesha2_utils.h>
 #include <sandesha2_ack_mgr.h>
 #include <sandesha2_constants.h>
 #include <sandesha2_msg_ctx.h>
@@ -33,6 +33,15 @@
 #include <axis2_property.h>
 #include <axis2_log.h>
 #include <axis2_uuid_gen.h>
+#include <axis2_msg_ctx.h>
+
+/******************************************************************************/
+long AXIS2_CALL
+sandesha2_seq_mgr_get_last_activated_time(const axis2_env_t *env,
+        axis2_char_t *property_key,
+        sandesha2_storage_mgr_t *storage_mgr);
+
+/******************************************************************************/
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 sandesha2_seq_mgr_set_up_new_seq(
@@ -217,3 +226,63 @@
     return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+sandesha2_seq_mgr_has_seq_timedout(const axis2_env_t *env,
+        axis2_char_t *property_key,
+        sandesha2_msg_ctx_t *rm_msg_ctx,
+        sandesha2_storage_mgr_t *storage_mgr)
+{
+    sandesha2_property_bean_t *property_bean = NULL;
+    axis2_bool_t seq_timedout = AXIS2_FALSE;
+    long last_activated_time = -1;
+    long current_time = -1;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK(env->error, property_key, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FALSE);
+    
+    property_bean = sandesha2_utils_get_property_bean_from_op(env, 
+                        AXIS2_MSG_CTX_GET_OP(SANDESHA2_MSG_CTX_GET_MSG_CTX(
+                        rm_msg_ctx, env), env));
+    if(SANDESHA2_PROPERTY_BEAN_GET_INACTIVE_TIMEOUT_INTERVAL(property_bean, env)
+                        <= 0)
+        return AXIS2_FALSE;
+    last_activated_time = sandesha2_seq_mgr_get_last_activated_time(env, 
+                        property_key, storage_mgr);
+    current_time = sandesha2_utils_get_current_time_in_millis(env);
+    if(last_activated_time > 0 && (last_activated_time + 
+                        SANDESHA2_PROPERTY_BEAN_GET_INACTIVE_TIMEOUT_INTERVAL(
+                        property_bean, env) < current_time))
+        seq_timedout = AXIS2_TRUE;
+    return seq_timedout;
+}
+
+
+long AXIS2_CALL
+sandesha2_seq_mgr_get_last_activated_time(const axis2_env_t *env,
+        axis2_char_t *property_key,
+        sandesha2_storage_mgr_t *storage_mgr)
+{
+    long last_activated_time = -1;
+    
+    sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
+    sandesha2_seq_property_bean_t *seq_prop_bean = NULL;
+    
+    AXIS2_ENV_CHECK(env, -1);
+    AXIS2_PARAM_CHECK(env->error, property_key, -1);
+    AXIS2_PARAM_CHECK(env->error, storage_mgr, -1);
+    
+    seq_prop_mgr = SANDESHA2_STORAGE_MGR_GET_SEQ_PROPERTY_MGR(storage_mgr, env);
+    seq_prop_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr, env, 
+                        property_key, SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
+    if(NULL != seq_prop_bean)
+    {
+        axis2_char_t *value = NULL;
+        
+        value = SANDESHA2_SEQ_PROPERTY_BEAN_GET_VALUE(seq_prop_bean, env);
+        if(NULL != value)
+            last_activated_time = atol(value);
+    }
+    return last_activated_time;
+}

Modified: webservices/sandesha/trunk/c/src/util/spec_specific_consts.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/spec_specific_consts.c?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/spec_specific_consts.c (original)
+++ webservices/sandesha/trunk/c/src/util/spec_specific_consts.c Sun Jul 23 11:05:53 2006
@@ -292,3 +292,20 @@
                 
     return AXIS2_FALSE;
 }
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL        
+sandesha2_spec_specific_consts_get_teminate_seq_res_action(
+        const axis2_env_t *env,
+        axis2_char_t *spec_version)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, spec_version, NULL);
+    
+    if (0 == AXIS2_STRCMP(SANDESHA2_SPEC_VERSION_1_1, spec_version)) 
+        return SANDESHA2_SPEC_2005_10_ACTION_TERMINATE_SEQ_RESPONSE;
+    else
+        AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_UNKNOWN_SPEC_ERROR_MESSAGE, 
+                AXIS2_FAILURE);
+
+    return NULL;
+}

Modified: webservices/sandesha/trunk/c/src/util/utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/utils.c?rev=424772&r1=424771&r2=424772&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/utils.c Sun Jul 23 11:05:53 2006
@@ -201,8 +201,16 @@
     
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, string, NULL);
-    
-    dup_string = AXIS2_STRDUP(string, env);
+    /* remove the array markers - []  if present */
+    if('[' == *string)
+        temp_str = string + sizeof(axis2_char_t);
+    else
+        temp_str = string;
+    dup_string = AXIS2_STRDUP(temp_str, env);
+    if(']' == dup_string[AXIS2_STRLEN(dup_string)])
+        dup_string[AXIS2_STRLEN(dup_string)] = '\0';
+        
+    temp_str = NULL;
     temp_str = strtok(dup_string, ",");
     while(NULL != temp_str)
     {
@@ -843,4 +851,26 @@
                         env), env);
     }
     return seq_id;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+sandesha2_utils_stop_invoker(const axis2_env_t *env,
+                        axis2_conf_ctx_t *conf_ctx)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
+    
+    /*TODO */
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+sandesha2_utils_stop_sender(const axis2_env_t *env,
+                        axis2_conf_ctx_t *conf_ctx)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
+    
+    /*TODO */
+    return AXIS2_SUCCESS;
 }



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