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/11 05:29:05 UTC
svn commit: r485492 [1/3] - in /webservices/sandesha/trunk/c: ./ config/
include/ src/core/ src/msgprocessors/ src/storage/ src/storage/beans/
src/storage/inmemory/ src/util/ src/workers/
Author: damitha
Date: Sun Dec 10 20:28:58 2006
New Revision: 485492
URL: http://svn.apache.org/viewvc?view=rev&rev=485492
Log:
More work on storage abstration
Added:
webservices/sandesha/trunk/c/include/sandesha2_inmemory_storage_mgr.h
Modified:
webservices/sandesha/trunk/c/config/module.xml
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_create_seq_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h
webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h
webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h
webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h
webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h
webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h
webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h
webservices/sandesha/trunk/c/src/core/Makefile.am
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/close_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_res_msg_processor.c
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/create_seq_mgr.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/storage/inmemory/inmemory_storage_mgr.c
webservices/sandesha/trunk/c/src/storage/inmemory/inmemory_transaction.c
webservices/sandesha/trunk/c/src/storage/inmemory/sandesha2_inmemory_bean_mgr.h
webservices/sandesha/trunk/c/src/storage/invoker_mgr.c
webservices/sandesha/trunk/c/src/storage/next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/sender_mgr.c
webservices/sandesha/trunk/c/src/storage/seq_property_mgr.c
webservices/sandesha/trunk/c/src/storage/transaction.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/util/terminate_mgr.c
webservices/sandesha/trunk/c/src/workers/sender.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
Modified: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Sun Dec 10 20:28:58 2006
@@ -67,7 +67,8 @@
</operation>
-
+ <!-- General Properties -->
+ <parameter name="" locked="false"></parameter>
<!-- 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>
Modified: webservices/sandesha/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/configure.ac?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/configure.ac (original)
+++ webservices/sandesha/trunk/c/configure.ac Sun Dec 10 20:28:58 2006
@@ -22,7 +22,7 @@
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
- CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -Werror"
+ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration"
fi
LDFLAGS="-lpthread"
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Sun Dec 10 20:28:58 2006
@@ -308,7 +308,7 @@
/**
* Bean Maps
*/
- #define SANDESHA2_BEAN_MAP_CREATE_SEQUECE "CreateSequenceBeanMap"
+ #define SANDESHA2_BEAN_MAP_CREATE_SEQUENCE "CreateSequenceBeanMap"
#define SANDESHA2_BEAN_MAP_RETRANSMITTER "RetransmitterBeanMap"
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_bean.h Sun Dec 10 20:28:58 2006
@@ -56,7 +56,7 @@
struct sandesha2_rm_bean * AXIS2_CALL
sandesha2_create_seq_bean_get_base(
- sandesha2_create_seq_bean_t* create_seq,
+ sandesha2_rm_bean_t* create_seq,
const axis2_env_t *env);
void AXIS2_CALL
Modified: webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_create_seq_mgr.h Sun Dec 10 20:28:58 2006
@@ -50,7 +50,7 @@
* Deallocate memory
* @return status code
*/
- axis2_status_t (AXIS2_CALL *
+ void (AXIS2_CALL *
free) (
sandesha2_create_seq_mgr_t *seq_mgr,
const axis2_env_t *env);
@@ -102,7 +102,7 @@
const axis2_env_t *env,
axis2_ctx_t *ctx);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_create_seq_mgr_free(
sandesha2_create_seq_mgr_t *seq_mgr,
const axis2_env_t *env);
@@ -142,7 +142,6 @@
sandesha2_create_seq_mgr_t *seq_mgr,
const axis2_env_t *env,
sandesha2_create_seq_bean_t *bean);
-
/** @} */
#ifdef __cplusplus
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_next_msg_mgr.h Sun Dec 10 20:28:58 2006
@@ -33,6 +33,7 @@
{
#endif
+struct sandesha2_storage_mgr;
struct axis2_ctx;
/** @defgroup sandesha2_inmemory_next_msg_mgr In Memory Next Message Manager
@@ -43,6 +44,7 @@
AXIS2_EXTERN struct sandesha2_next_msg_mgr * AXIS2_CALL
sandesha2_inmemory_next_msg_mgr_create(
const axis2_env_t *env,
+ struct sandesha2_storage_mgr *storage_mgr,
struct axis2_ctx *ctx);
/** @} */
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_sender_mgr.h Sun Dec 10 20:28:58 2006
@@ -33,8 +33,8 @@
{
#endif
+struct sandesha2_storage_mgr;
struct axis2_ctx;
-struct sandesha2_sender_mgr;
/** @defgroup sandesha2_inmemory_sender_mgr In Memory Sender Manager
* @ingroup sandesha2
@@ -44,6 +44,7 @@
AXIS2_EXTERN struct sandesha2_sender_mgr * AXIS2_CALL
sandesha2_inmemory_sender_mgr_create(
const axis2_env_t *env,
+ struct sandesha2_storage_mgr *storage_mgr,
struct axis2_ctx *ctx);
/** @} */
Modified: webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_seq_property_mgr.h Sun Dec 10 20:28:58 2006
@@ -32,7 +32,8 @@
extern "C"
{
#endif
-
+
+struct sandesha2_storage_mgr;
struct axis2_ctx;
/** @defgroup sandesha2_inmemory_seq_property_mgr In Memory Sequence Property
@@ -44,6 +45,7 @@
AXIS2_EXTERN struct sandesha2_seq_property_mgr * AXIS2_CALL
sandesha2_inmemory_seq_property_mgr_create(
const axis2_env_t *env,
+ struct sandesha2_storage_mgr *storage_mgr,
struct axis2_ctx *ctx);
/** @} */
Added: webservices/sandesha/trunk/c/include/sandesha2_inmemory_storage_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_inmemory_storage_mgr.h?view=auto&rev=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_inmemory_storage_mgr.h (added)
+++ webservices/sandesha/trunk/c/include/sandesha2_inmemory_storage_mgr.h Sun Dec 10 20:28:58 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.
+ */
+
+#ifndef SANDESHA2_INMEMORY_STORAGE_MGR_H
+#define SANDESHA2_INMEMORY_STORAGE_MGR_H
+
+/**
+ * @file sandesha2_inmemory_storage_mgr.h
+ * @brief
+ */
+
+#include <axis2_utils_defines.h>
+#include <axis2_env.h>
+#include <axis2_conf_ctx.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @ingroup sandesha2_storage
+ * @{
+ */
+
+AXIS2_EXTERN sandesha2_storage_mgr_t* AXIS2_CALL
+sandesha2_inmemory_storage_mgr_create(
+ const axis2_env_t *env,
+ axis2_conf_ctx_t *conf_ctx);
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*SANDESHA2_INMEMORY_STORAGE_MGR_H*/
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_invoker_bean.h Sun Dec 10 20:28:58 2006
@@ -55,7 +55,7 @@
sandesha2_rm_bean_t * AXIS2_CALL
sandesha2_invoker_bean_get_base(
- sandesha2_invoker_bean_t* invoker,
+ sandesha2_rm_bean_t* invoker,
const axis2_env_t *env);
void AXIS2_CALL
Modified: webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_invoker_mgr.h Sun Dec 10 20:28:58 2006
@@ -45,7 +45,7 @@
* Deallocate memory
* @return status code
*/
- axis2_status_t (AXIS2_CALL *
+ void (AXIS2_CALL *
free)(
sandesha2_invoker_mgr_t *invoker,
const axis2_env_t *envv);
@@ -98,7 +98,7 @@
const axis2_env_t *env,
axis2_ctx_t *ctx);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_invoker_mgr_free(
sandesha2_invoker_mgr_t *invoker,
const axis2_env_t *envv);
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_next_msg_bean.h Sun Dec 10 20:28:58 2006
@@ -18,15 +18,24 @@
#define SANDESHA2_NEXT_MSG_BEAN_H
#include <axis2_utils_defines.h>
-struct sandesha2_rm_bean;
+#include <axis2_utils_defines.h>
#include <axis2_env.h>
+#include <sandesha2_rm_bean.h>
#ifdef __cplusplus
extern "C"
{
#endif
-typedef struct sandesha2_next_msg_bean_t sandesha2_next_msg_bean_t;
+typedef struct sandesha2_next_msg_bean sandesha2_next_msg_bean_t;
+
+struct sandesha2_transaction;
+
+AXIS2_DECLARE_DATA struct sandesha2_next_msg_bean
+{
+ sandesha2_rm_bean_t rm_bean;
+};
+
/* constructors
*/
AXIS2_EXTERN sandesha2_next_msg_bean_t* AXIS2_CALL
@@ -39,14 +48,14 @@
axis2_char_t *seq_id,
long msg_no);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_next_msg_bean_free (
- sandesha2_next_msg_bean_t *next_msg_bean,
+ sandesha2_rm_bean_t *next_msg_bean,
const axis2_env_t *env);
struct sandesha2_rm_bean * AXIS2_CALL
sandesha2_next_msg_bean_get_base(
- sandesha2_next_msg_bean_t* next_msg,
+ sandesha2_rm_bean_t* next_msg,
const axis2_env_t *env);
void AXIS2_CALL
@@ -96,6 +105,28 @@
sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env,
axis2_char_t *ref_msg_key);
+
+void AXIS2_CALL
+sandesha2_next_msg_bean_set_id(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env,
+ long id);
+
+long AXIS2_CALL
+sandesha2_next_msg_bean_get_id(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env);
+
+void AXIS2_CALL
+sandesha2_next_msg_bean_set_transaction(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env,
+ struct sandesha2_transaction *transaction);
+
+struct sandesha2_transaction *AXIS2_CALL
+sandesha2_next_msg_bean_get_transaction(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env);
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_next_msg_mgr.h Sun Dec 10 20:28:58 2006
@@ -39,13 +39,18 @@
typedef struct sandesha2_next_msg_mgr sandesha2_next_msg_mgr_t;
typedef struct sandesha2_next_msg_mgr_ops sandesha2_next_msg_mgr_ops_t;
+/** @defgroup sandesha2_next_msg_mgr In Memory Next Message Manager
+ * @ingroup sandesha2
+ * @{
+ */
+
AXIS2_DECLARE_DATA struct sandesha2_next_msg_mgr_ops
{
/**
* Deallocate memory
* @return status code
*/
- axis2_status_t (AXIS2_CALL *
+ void (AXIS2_CALL *
free)(
sandesha2_next_msg_mgr_t *next_msg,
const axis2_env_t *env);
@@ -94,7 +99,7 @@
AXIS2_DECLARE_DATA struct sandesha2_next_msg_mgr
{
- const sandesha2_next_msg_mgr_ops_t *ops;
+ sandesha2_next_msg_mgr_ops_t ops;
};
AXIS2_EXTERN sandesha2_next_msg_mgr_t * AXIS2_CALL
@@ -102,7 +107,7 @@
const axis2_env_t *env,
axis2_ctx_t *ctx);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_next_msg_mgr_free(
sandesha2_next_msg_mgr_t *next_msg,
const axis2_env_t *env);
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_rm_bean.h Sun Dec 10 20:28:58 2006
@@ -37,6 +37,11 @@
free) (
sandesha2_rm_bean_t *rm_bean,
const axis2_env_t *env);
+
+ sandesha2_rm_bean_t * (AXIS2_CALL *
+ get_base) (
+ sandesha2_rm_bean_t *rm_bean,
+ const axis2_env_t *env);
void (AXIS2_CALL *
set_id) (
@@ -63,7 +68,7 @@
AXIS2_DECLARE_DATA struct sandesha2_rm_bean
{
- const sandesha2_rm_bean_ops_t *ops;
+ sandesha2_rm_bean_ops_t ops;
};
/* constructors
@@ -76,6 +81,11 @@
sandesha2_rm_bean_free(
sandesha2_rm_bean_t *rm_bean,
const axis2_env_t *env);
+
+sandesha2_rm_bean_t * AXIS2_CALL
+sandesha2_rm_bean_get_base(
+ sandesha2_rm_bean_t *rm_bean,
+ const axis2_env_t *env);
void AXIS2_CALL
sandesha2_rm_bean_set_id(
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_bean.h Sun Dec 10 20:28:58 2006
@@ -19,14 +19,20 @@
#include <axis2_utils_defines.h>
#include <axis2_env.h>
+#include <sandesha2_rm_bean.h>
#ifdef __cplusplus
extern "C"
{
#endif
-typedef struct sandesha2_sender_bean_t sandesha2_sender_bean_t;
-struct sandesha2_rm_bean;
+typedef struct sandesha2_sender_bean sandesha2_sender_bean_t;
+struct sandesha2_transaction;
+
+AXIS2_DECLARE_DATA struct sandesha2_sender_bean
+{
+ sandesha2_rm_bean_t rm_bean;
+};
/* constructors
*/
@@ -44,14 +50,14 @@
axis2_char_t *int_seq_id,
long msg_no);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_sender_bean_free (
- sandesha2_sender_bean_t *sender,
+ sandesha2_rm_bean_t *sender,
const axis2_env_t *env);
struct sandesha2_rm_bean * AXIS2_CALL
sandesha2_sender_bean_get_base(
- sandesha2_sender_bean_t* sender,
+ sandesha2_rm_bean_t* sender,
const axis2_env_t *env);
void AXIS2_CALL
@@ -190,6 +196,28 @@
axis2_char_t* AXIS2_CALL
sandesha2_sender_bean_get_to_address(
sandesha2_sender_bean_t *sender,
+ const axis2_env_t *env);
+
+void AXIS2_CALL
+sandesha2_sender_bean_set_id(
+ sandesha2_rm_bean_t *sender_bean,
+ const axis2_env_t *env,
+ long id);
+
+long AXIS2_CALL
+sandesha2_sender_bean_get_id(
+ sandesha2_rm_bean_t *sender_bean,
+ const axis2_env_t *env);
+
+void AXIS2_CALL
+sandesha2_sender_bean_set_transaction(
+ sandesha2_rm_bean_t *sender_bean,
+ const axis2_env_t *env,
+ struct sandesha2_transaction *transaction);
+
+struct sandesha2_transaction *AXIS2_CALL
+sandesha2_sender_bean_get_transaction(
+ sandesha2_rm_bean_t *sender_bean,
const axis2_env_t *env);
#ifdef __cplusplus
Modified: webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender_mgr.h Sun Dec 10 20:28:58 2006
@@ -29,6 +29,7 @@
#include <axis2_utils.h>
#include <axis2_ctx.h>
#include <axis2_array_list.h>
+#include <sandesha2_sender_bean.h>
#ifdef __cplusplus
extern "C"
@@ -37,15 +38,18 @@
typedef struct sandesha2_sender_mgr sandesha2_sender_mgr_t;
typedef struct sandesha2_sender_mgr_ops sandesha2_sender_mgr_ops_t;
-struct sandesha2_sender_bean_t;
+/** @defgroup sandesha2_sender_mgr In Memory Sender Manager
+ * @ingroup sandesha2
+ * @{
+ */
AXIS2_DECLARE_DATA struct sandesha2_sender_mgr_ops
{
/**
* Deallocate memory
* @return status code
*/
- axis2_status_t (AXIS2_CALL *
+ void (AXIS2_CALL *
free)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env);
@@ -54,7 +58,7 @@
insert)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
axis2_bool_t (AXIS2_CALL *
remove)(
@@ -62,7 +66,7 @@
const axis2_env_t *env,
axis2_char_t *msg_id);
- struct sandesha2_sender_bean_t *(AXIS2_CALL *
+ sandesha2_sender_bean_t *(AXIS2_CALL *
retrieve)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
@@ -72,7 +76,7 @@
update)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
axis2_array_list_t *(AXIS2_CALL *
find_by_internal_seq_id)(
@@ -84,29 +88,23 @@
find_by_sender_bean)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
- struct sandesha2_sender_bean_t *(AXIS2_CALL *
+ sandesha2_sender_bean_t *(AXIS2_CALL *
find_unique)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
- struct sandesha2_sender_bean_t *(AXIS2_CALL *
+ sandesha2_sender_bean_t *(AXIS2_CALL *
get_next_msg_to_send)(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env);
-
- struct sandesha2_sender_bean_t *(AXIS2_CALL *
- retrieve_from_msg_ref_key)(
- sandesha2_sender_mgr_t *sender,
- const axis2_env_t *env,
- axis2_char_t *msg_ctx_ref_key);
};
AXIS2_DECLARE_DATA struct sandesha2_sender_mgr
{
- const sandesha2_sender_mgr_ops_t *ops;
+ sandesha2_sender_mgr_ops_t ops;
};
AXIS2_EXTERN sandesha2_sender_mgr_t * AXIS2_CALL
@@ -114,7 +112,7 @@
const axis2_env_t *env,
axis2_ctx_t *ctx);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_sender_mgr_free(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *envv);
@@ -123,7 +121,7 @@
sandesha2_sender_mgr_insert(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
axis2_bool_t AXIS2_CALL
sandesha2_sender_mgr_remove(
@@ -131,7 +129,7 @@
const axis2_env_t *env,
axis2_char_t *msg_id);
-struct sandesha2_sender_bean_t *AXIS2_CALL
+sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_retrieve(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
@@ -141,7 +139,7 @@
sandesha2_sender_mgr_update(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
axis2_array_list_t *AXIS2_CALL
sandesha2_sender_mgr_find_by_internal_seq_id(
@@ -153,34 +151,18 @@
sandesha2_sender_mgr_find_by_sender_bean(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
-struct sandesha2_sender_bean_t *AXIS2_CALL
+sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_find_unique(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env,
- struct sandesha2_sender_bean_t *bean);
+ sandesha2_sender_bean_t *bean);
-struct sandesha2_sender_bean_t *AXIS2_CALL
+sandesha2_sender_bean_t *AXIS2_CALL
sandesha2_sender_mgr_get_next_msg_to_send(
sandesha2_sender_mgr_t *sender,
const axis2_env_t *env);
-
-struct sandesha2_sender_bean_t *AXIS2_CALL
-sandesha2_sender_mgr_retrieve_from_msg_ref_key(
- sandesha2_sender_mgr_t *sender,
- const axis2_env_t *env,
- axis2_char_t *msg_ctx_ref_key);
-
-/*
-static axis2_array_list_t *
-sandesha2_sender_mgr_find_beans_with_msg_no(
- sandesha2_sender_mgr_t *sender,
- const axis2_env_t *env,
- axis2_array_list_t *list,
- long msg_no);
-*/
-
/** @} */
#ifdef __cplusplus
Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_property_bean.h Sun Dec 10 20:28:58 2006
@@ -19,18 +19,23 @@
#include <axis2_utils_defines.h>
#include <axis2_env.h>
+#include <sandesha2_rm_bean.h>
#ifdef __cplusplus
extern "C"
{
#endif
-typedef struct sandesha2_seq_property_bean_t sandesha2_seq_property_bean_t ;
-struct sandesha2_rm_bean;
+typedef struct sandesha2_seq_property_bean sandesha2_seq_property_bean_t ;
+struct sandesha2_transaction;
+
+AXIS2_DECLARE_DATA struct sandesha2_seq_property_bean
+{
+ sandesha2_rm_bean_t rm_bean;
+};
/* constructors
*/
-
AXIS2_EXTERN sandesha2_seq_property_bean_t* AXIS2_CALL
sandesha2_seq_property_bean_create(
const axis2_env_t *env);
@@ -42,14 +47,14 @@
axis2_char_t *prop_name,
axis2_char_t *value);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_seq_property_bean_free (
- sandesha2_seq_property_bean_t *seq_property,
+ sandesha2_rm_bean_t *seq_property,
const axis2_env_t *env);
struct sandesha2_rm_bean * AXIS2_CALL
sandesha2_seq_property_bean_get_base(
- sandesha2_seq_property_bean_t* seq_property,
+ sandesha2_rm_bean_t* seq_property,
const axis2_env_t *env);
void AXIS2_CALL
@@ -90,6 +95,28 @@
sandesha2_seq_property_bean_t *seq_property,
const axis2_env_t *env,
axis2_char_t *value);
+
+void AXIS2_CALL
+sandesha2_seq_property_bean_set_id(
+ sandesha2_rm_bean_t *seq_property_bean,
+ const axis2_env_t *env,
+ long id);
+
+long AXIS2_CALL
+sandesha2_seq_property_bean_get_id(
+ sandesha2_rm_bean_t *seq_property_bean,
+ const axis2_env_t *env);
+
+void AXIS2_CALL
+sandesha2_seq_property_bean_set_transaction(
+ sandesha2_rm_bean_t *seq_property_bean,
+ const axis2_env_t *env,
+ struct sandesha2_transaction *transaction);
+
+struct sandesha2_transaction *AXIS2_CALL
+sandesha2_seq_property_bean_get_transaction(
+ sandesha2_rm_bean_t *seq_property_bean,
+ const axis2_env_t *env);
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_seq_property_mgr.h Sun Dec 10 20:28:58 2006
@@ -39,13 +39,17 @@
typedef struct sandesha2_seq_property_mgr sandesha2_seq_property_mgr_t;
typedef struct sandesha2_seq_property_mgr_ops sandesha2_seq_property_mgr_ops_t;
+/** @defgroup sandesha2_seq_property_mgr In Memory Sequence Property Manager
+ * @ingroup sandesha2
+ * @{
+ */
AXIS2_DECLARE_DATA struct sandesha2_seq_property_mgr_ops
{
/**
* Deallocate memory
* @return status code
*/
- axis2_status_t (AXIS2_CALL *
+ void (AXIS2_CALL *
free)(
sandesha2_seq_property_mgr_t *seq_property,
const axis2_env_t *envv);
@@ -93,17 +97,11 @@
sandesha2_seq_property_mgr_t *seq_property,
const axis2_env_t *env);
- axis2_bool_t (AXIS2_CALL *
- update_or_insert)(
- sandesha2_seq_property_mgr_t *seq_property,
- const axis2_env_t *env,
- sandesha2_seq_property_bean_t *bean);
-
};
AXIS2_DECLARE_DATA struct sandesha2_seq_property_mgr
{
- const sandesha2_seq_property_mgr_ops_t *ops;
+ sandesha2_seq_property_mgr_ops_t ops;
};
AXIS2_EXTERN sandesha2_seq_property_mgr_t * AXIS2_CALL
@@ -111,7 +109,7 @@
const axis2_env_t *env,
axis2_ctx_t *ctx);
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_seq_property_mgr_free(
sandesha2_seq_property_mgr_t *seq_property,
const axis2_env_t *envv);
@@ -158,13 +156,6 @@
sandesha2_seq_property_mgr_retrieve_all(
sandesha2_seq_property_mgr_t *seq_property,
const axis2_env_t *env);
-
-axis2_bool_t AXIS2_CALL
-sandesha2_seq_property_mgr_update_or_insert(
- sandesha2_seq_property_mgr_t *seq_property,
- const axis2_env_t *env,
- sandesha2_seq_property_bean_t *bean);
-
/** @} */
#ifdef __cplusplus
Modified: webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_terminate_mgr.h Sun Dec 10 20:28:58 2006
@@ -31,7 +31,7 @@
#include <axis2_qname.h>
#include <axis2_array_list.h>
#include <axis2_op.h>
-#include <sandesha2_property_bean.h>
+#include <sandesha2_seq_property_bean.h>
#include <sandesha2_msg_ctx.h>
#include <axiom_soap_envelope.h>
@@ -91,7 +91,7 @@
sandesha2_terminate_mgr_do_updates_if_needed(
const axis2_env_t *env,
axis2_char_t *seq_id,
- struct sandesha2_seq_property_bean_t *prop_bean,
+ sandesha2_seq_property_bean_t *prop_bean,
struct sandesha2_seq_property_mgr *prop_mgr);
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/core/Makefile.am (original)
+++ webservices/sandesha/trunk/c/src/core/Makefile.am Sun Dec 10 20:28:58 2006
@@ -11,6 +11,7 @@
../handlers/libsandesha_handlers.la\
../msgprocessors/libsandesha2_msgprocessors.la\
../storage/beans/libsandesha2_storage_beans.la\
+ ../storage/libsandesha2_storage.la\
../storage/inmemory/libsandesha2_inmemory.la\
../transport/libsandesha2_transport.la\
../util/libsandesha_util.la\
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -95,7 +95,7 @@
(env->allocator,
sizeof(sandesha2_ack_msg_processor_impl_t));
- if(NULL == msg_proc_impl)
+ if(!msg_proc_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -103,7 +103,7 @@
msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_processor_ops_t));
- if(NULL == msg_proc_impl->msg_processor.ops)
+ if(!msg_proc_impl->msg_processor.ops)
{
sandesha2_ack_msg_processor_free((sandesha2_msg_processor_t*)
msg_proc_impl, env);
@@ -128,7 +128,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
- if(NULL != msg_processor->ops)
+ if(msg_processor->ops)
AXIS2_FREE(env->allocator, msg_processor->ops);
AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
@@ -170,7 +170,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log,
- "[sandesha2] sandesha2_ack_msg_processor_process_in_msg .........");
+ "[sandesha2] Entry:sandesha2_ack_msg_processor_process_in_msg");
seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx,
env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
@@ -189,7 +189,7 @@
AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
sandesha2_seq_ack_set_must_understand(seq_ack, env, AXIS2_FALSE);
sandesha2_msg_ctx_add_soap_envelope(rm_msg_ctx, env);
-
+
retrans_mgr = sandesha2_storage_mgr_get_retrans_mgr(storage_mgr, env);
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env);
@@ -308,6 +308,7 @@
}
else
{
+ printf("came3\n");
sandesha2_seq_property_mgr_update(seq_prop_mgr, env,
no_of_msgs_acked_bean);
}
@@ -316,6 +317,7 @@
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,
@@ -398,7 +400,7 @@
lower = sandesha2_ack_range_get_lower_value(ack_range, env);
upper = sandesha2_ack_range_get_upper_value(ack_range, env);
- diff = upper - lower;
+ diff = (upper - lower) + 1;
if(diff > 0)
no_of_msgs += diff;
}
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -91,7 +91,7 @@
(env->allocator,
sizeof(sandesha2_ack_req_msg_processor_impl_t));
- if(NULL == msg_proc_impl)
+ if(!msg_proc_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -99,7 +99,7 @@
msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_processor_ops_t));
- if(NULL == msg_proc_impl->msg_processor.ops)
+ if(!msg_proc_impl->msg_processor.ops)
{
sandesha2_ack_req_msg_processor_free((sandesha2_msg_processor_t*)
msg_proc_impl, env);
@@ -127,7 +127,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
- if(NULL != msg_processor->ops)
+ if(msg_processor->ops)
AXIS2_FREE(env->allocator, msg_processor->ops);
AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
@@ -165,7 +165,7 @@
ack_requested = (sandesha2_ack_requested_t*)sandesha2_msg_ctx_get_msg_part(
rm_msg_ctx, env, SANDESHA2_MSG_PART_ACK_REQUEST);
- if(NULL == ack_requested)
+ if(!ack_requested)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Ack requested "
"part is missing");
@@ -188,7 +188,7 @@
SANDESHA2_SEQ_PROP_ACKS_TO_EPR);
acks_to_str = sandesha2_seq_property_bean_get_value(acks_to_bean, env);
- if(NULL == acks_to_str)
+ if(!acks_to_str)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] acks_to_str"
" seqeunce property is not set correctly");
@@ -198,7 +198,7 @@
ack_op = axis2_op_create(env);
AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(ack_op, env, AXIS2_MEP_URI_IN_ONLY);
rm_msg_op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
- if(NULL != rm_msg_op)
+ if(rm_msg_op)
{
axis2_array_list_t *out_flow = NULL;
axis2_array_list_t *new_out_flow = NULL;
@@ -239,7 +239,7 @@
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, AXIS2_WSA_VERSION,
AXIS2_FALSE);
- if(NULL != property)
+ if(property)
wsa_version = AXIS2_PROPERTY_GET_VALUE(property, env);
property = axis2_property_create(env);
@@ -261,7 +261,7 @@
axis2_engine_t *engine = NULL;
axis2_ctx_t *ctx = NULL;
- if(NULL == AXIS2_MSG_CTX_GET_OP(msg_ctx, env))
+ if(!AXIS2_MSG_CTX_GET_OP(msg_ctx, env))
{
axis2_op_t *operation = NULL;
axis2_op_ctx_t *operation_ctx = NULL;
@@ -345,7 +345,7 @@
found_list = sandesha2_sender_mgr_find_by_sender_bean(retrans_mgr, env,
find_bean);
- if(NULL != found_list)
+ if(found_list)
{
int i = 0;
for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(found_list, env); i++)
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -208,7 +208,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log,
- "[sandesha2] sandesha2_app_msg_processor_process_in_msg .........");
+ "[sandesha2] Start:sandesha2_app_msg_processor_process_in_msg");
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
if(!msg_ctx)
@@ -520,10 +520,10 @@
axis2_op_ctx_t *op_ctx = NULL;
axis2_msg_ctx_t *req_msg_ctx = NULL;
+ AXIS2_LOG_INFO(env->log,
+ "[sandesha2] Start:sandesha2_app_msg_processor_process_out_msg");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
- AXIS2_LOG_INFO(env->log,
- "[sandesha2] sandesha2_app_msg_processor_process_out_msg .........");
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
@@ -536,6 +536,11 @@
AXIS2_CONF_CTX_GET_CONF(conf_ctx, env));
seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(
storage_mgr, env);
+ if(!seq_prop_mgr)
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "seq_prop_mgr is NULL");
+ return AXIS2_FAILURE;
+ }
is_svr_side = AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env);
to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
@@ -598,12 +603,15 @@
axis2_char_t *last_app_msg = NULL;
to = (axis2_char_t*)AXIS2_ENDPOINT_REF_GET_ADDRESS(to_epr, env);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "to:%s", to);
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
SANDESHA2_CLIENT_SEQ_KEY, AXIS2_FALSE);
if(property)
seq_key = AXIS2_PROPERTY_GET_VALUE(property, env);
internal_seq_id = sandesha2_utils_get_internal_seq_id(env,
to, seq_key);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "internal_seq_id:%s",
+ internal_seq_id);
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
SANDESHA2_CLIENT_LAST_MESSAGE, AXIS2_FALSE);
if(property)
@@ -613,7 +621,7 @@
last_msg = AXIS2_TRUE;
}
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
- SANDESHA2_CLIENT_MESSAGE_NUMBER, AXIS2_FALSE);
+ SANDESHA2_CLIENT_MESSAGE_NUMBER, AXIS2_FALSE);
if(property)
{
msg_num_lng = *(long*)(AXIS2_PROPERTY_GET_VALUE(property, env));
@@ -629,8 +637,10 @@
internal_seq_id, storage_mgr);
if(msg_num_lng > 0 && msg_num_lng <= system_msg_num)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Invalid Message Number");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_MSG_NUM,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
if(msg_num_lng > 0)
@@ -639,12 +649,13 @@
msg_number = system_msg_num + 1;
else
msg_number = 1;
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "msg_number:%d", msg_number);
/* A dummy message is a one which will not be processed as a actual
* application message. The RM handlers will simply let these go.
*/
property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
- SANDESHA2_CLIENT_DUMMY_MESSAGE, AXIS2_FALSE);
+ SANDESHA2_CLIENT_DUMMY_MESSAGE, AXIS2_FALSE);
if(property)
dummy_msg_str = AXIS2_PROPERTY_GET_VALUE(property, env);
if(dummy_msg_str && 0 == AXIS2_STRCMP(dummy_msg_str,
@@ -652,15 +663,15 @@
dummy_msg = AXIS2_TRUE;
if(!dummy_msg)
sandesha2_app_msg_processor_set_next_msg_no(env, internal_seq_id,
- msg_number, storage_mgr);
+ msg_number, storage_mgr);
sprintf(msg_number_str, "%ld", msg_number);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "msg_number_str:%s", msg_number_str);
res_highest_msg_bean = sandesha2_seq_property_bean_create_with_data(env,
- internal_seq_id,
- SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER,
- msg_number_str);
+ internal_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER,
+ msg_number_str);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
- res_highest_msg_bean);
+ res_highest_msg_bean);
if(last_msg)
{
sandesha2_seq_property_bean_t *res_highest_msg_key_bean = NULL;
@@ -680,7 +691,7 @@
res_last_msg_key_bean);
}
out_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
- internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
+ internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
if(is_svr_side)
{
axis2_char_t *incoming_seq_id = NULL;
@@ -719,6 +730,8 @@
env, req_seq_id, SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
if(!spec_ver_bean)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Invalid spec version");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_SPEC_VERSION,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -734,6 +747,7 @@
}
if(!spec_ver)
spec_ver = sandesha2_spec_specific_consts_get_default_spec_version(env);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Spec version:%s", spec_ver);
if(1 == msg_number)
{
if(!out_seq_bean)
@@ -743,6 +757,7 @@
}
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;
@@ -756,6 +771,7 @@
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(
@@ -808,14 +824,14 @@
* TODO handle acks_to == anon_uri case
*/
sandesha2_app_msg_processor_add_create_seq_msg(env, rm_msg_ctx,
- internal_seq_id, acks_to, storage_mgr);
+ internal_seq_id, acks_to, storage_mgr);
}
}
soap_env = sandesha2_msg_ctx_get_soap_envelope(rm_msg_ctx, env);
if(!soap_env)
{
soap_env = axiom_soap_envelope_create_default_soap_envelope(env,
- AXIOM_SOAP12);
+ AXIOM_SOAP12);
sandesha2_msg_ctx_set_soap_envelope(rm_msg_ctx, env, soap_env);
}
msg_id = axis2_uuid_gen(env);
@@ -854,8 +870,7 @@
}
}
op_name = AXIS2_QNAME_GET_LOCALPART(AXIS2_OP_GET_QNAME(AXIS2_OP_CTX_GET_OP(
- AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env), env), env),
- env);
+ AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env), env), env), env);
to_addr = (axis2_char_t*)AXIS2_ENDPOINT_REF_GET_ADDRESS(to_epr, env);
/* test code */
/*if(!AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env))
@@ -875,7 +890,7 @@
internal_seq_id, msg_number, storage_key, storage_mgr);
AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
AXIS2_LOG_INFO(env->log,
- "[sandesha2] Exit: sandesha2_app_msg_processor_process_out_msg");
+ "[sandesha2] Exit: sandesha2_app_msg_processor_process_out_msg");
return AXIS2_SUCCESS;
}
@@ -914,6 +929,8 @@
axis2_msg_ctx_t *msg_ctx = NULL;
axis2_msg_ctx_t *temp_msg_ctx = NULL;
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] sandesha2_app_msg_processor_send_ack_if_reqd");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_str, AXIS2_FAILURE);
@@ -927,6 +944,8 @@
env), env);
if(!conf_ctx)
{
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2] cont_ctx is NULL");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
@@ -944,9 +963,13 @@
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(ack_rm_msg, env);
if(AXIS2_SUCCESS != AXIS2_ENGINE_SEND(engine, env, msg_ctx))
{
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[Sandesha2]Engine Send failed");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_ACK, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] Exit:sandesha2_app_msg_processor_send_ack_if_reqd");
return AXIS2_SUCCESS;
}
@@ -980,6 +1003,8 @@
axis2_char_t *create_seq_msg_store_key = NULL;
axis2_char_t *ref_msg_store_key = NULL;
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] sandesha2_app_msg_processor_add_create_seq_msg");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
@@ -1031,7 +1056,7 @@
create_seq_msg);
sandesha2_create_seq_bean_set_ref_msg_store_key(create_seq_bean, env,
ref_msg_store_key);
- SANDESHA2_CREATE_SEQ_MGR_INSERT(create_seq_man, env, create_seq_bean);
+ sandesha2_create_seq_mgr_insert(create_seq_man, env, create_seq_bean);
addr_ns_uri = sandesha2_utils_get_seq_property(env, internal_seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, storage_mgr);
anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
@@ -1084,8 +1109,13 @@
engine = axis2_engine_create(env, AXIS2_MSG_CTX_GET_CONF_CTX(create_seq_msg,
env));
if(!AXIS2_ENGINE_RESUME_SEND(engine, env, create_seq_msg))
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Engine Resume Send failed");
return AXIS2_FAILURE;
-
+ }
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] Exit:sandesha2_app_msg_processor_add_create_seq_msg");
return AXIS2_SUCCESS;
}
@@ -1123,6 +1153,8 @@
axis2_char_t *msg_id = NULL;
axis2_bool_t last_msg = AXIS2_FALSE;
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] sandesha2_app_msg_processor_process_response_msg");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, storage_key, AXIS2_FAILURE);
@@ -1309,6 +1341,8 @@
AXIS2_MSG_CTX_GET_CURRENT_HANDLER_INDEX(app_msg_ctx, env) + 1);
engine = axis2_engine_create(env, AXIS2_MSG_CTX_GET_CONF_CTX(app_msg_ctx,
env));
+ AXIS2_LOG_INFO(env->log,
+ "[Sandesha2] Exit:sandesha2_app_msg_processor_process_response_msg");
return AXIS2_ENGINE_RESUME_SEND(engine, env, app_msg_ctx);
}
@@ -1355,12 +1389,16 @@
axis2_bool_t update = AXIS2_TRUE;
axis2_char_t str_long[32];
+ AXIS2_LOG_INFO(env->log,
+ "[sandesha2]Start:sandesha2_app_msg_processor_set_next_msg_no");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, internal_seq_id, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, mgr, AXIS2_FAILURE);
if(msg_num <= 0)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Invalid Message Number");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_MSG_NUM,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -1387,6 +1425,8 @@
{
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, next_msg_no_bean);
}
+ AXIS2_LOG_INFO(env->log,
+ "[sandesha2]Exit:sandesha2_app_msg_processor_set_next_msg_no");
return AXIS2_SUCCESS;
}
Modified: webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -85,7 +85,7 @@
(env->allocator,
sizeof(sandesha2_close_seq_msg_processor_impl_t));
- if(NULL == msg_proc_impl)
+ if(!msg_proc_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -93,7 +93,7 @@
msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_processor_ops_t));
- if(NULL == msg_proc_impl->msg_processor.ops)
+ if(!msg_proc_impl->msg_processor.ops)
{
sandesha2_close_seq_msg_processor_free((sandesha2_msg_processor_t*)
msg_proc_impl, env);
@@ -119,7 +119,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
- if(NULL != msg_processor->ops)
+ if(msg_processor->ops)
AXIS2_FREE(env->allocator, msg_processor->ops);
AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
@@ -167,7 +167,7 @@
fault_rm_msg_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,
rm_msg_ctx, seq_id, storage_mgr);
- if(NULL != fault_rm_msg_ctx)
+ if(fault_rm_msg_ctx)
{
engine = axis2_engine_create(env, conf_ctx);
AXIS2_ENGINE_SEND(engine, env, sandesha2_msg_ctx_get_msg_ctx(
Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -265,7 +265,7 @@
axis2_uuid_gen(env));
create_seq_mgr = sandesha2_storage_mgr_get_create_seq_mgr(
storage_mgr, env);
- SANDESHA2_CREATE_SEQ_MGR_INSERT(create_seq_mgr, env, create_seq_bean);
+ sandesha2_create_seq_mgr_insert(create_seq_mgr, env, create_seq_bean);
out_seq_bean = sandesha2_seq_property_bean_create(env);
sandesha2_seq_property_bean_set_name(out_seq_bean, env,
Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -185,7 +185,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
AXIS2_LOG_INFO(env->log,
- "[sandesha2] sandesha2_create_seq_res_msg_processor_process_in_msg .........");
+ "[sandesha2] Entry:sandesha2_create_seq_res_msg_processor_process_in_msg");
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
@@ -253,7 +253,7 @@
return AXIS2_FAILURE;
}
sandesha2_create_seq_bean_set_seq_id(create_seq_bean, env, new_out_seq_id);
- SANDESHA2_CREATE_SEQ_MGR_UPDATE(create_seq_mgr, env, create_seq_bean);
+ sandesha2_create_seq_mgr_update(create_seq_mgr, env, create_seq_bean);
create_seq_sender_bean = sandesha2_sender_mgr_retrieve(retrans_mgr,
env, create_seq_msg_id);
Modified: webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c?view=diff&rev=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Sun Dec 10 20:28:58 2006
@@ -112,7 +112,7 @@
(env->allocator,
sizeof( sandesha2_terminate_seq_msg_processor_impl_t));
- if(NULL == msg_proc_impl)
+ if(!msg_proc_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -120,7 +120,7 @@
msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_processor_ops_t));
- if(NULL == msg_proc_impl->msg_processor.ops)
+ if(!msg_proc_impl->msg_processor.ops)
{
sandesha2_terminate_seq_msg_processor_free((sandesha2_msg_processor_t*)
msg_proc_impl, env);
@@ -148,7 +148,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
- if(NULL != msg_processor->ops)
+ if(msg_processor->ops)
AXIS2_FREE(env->allocator, msg_processor->ops);
AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
@@ -184,7 +184,7 @@
seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(
rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
- if(NULL != seq_ack)
+ if(seq_ack)
{
sandesha2_msg_processor_t *ack_processor = NULL;
ack_processor = sandesha2_ack_msg_processor_create(env);
@@ -192,7 +192,7 @@
}
term_seq = (sandesha2_terminate_seq_t*)sandesha2_msg_ctx_get_msg_part(
rm_msg_ctx, env, SANDESHA2_MSG_PART_TERMINATE_SEQ);
- if(NULL == term_seq)
+ if(!term_seq)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Terminate "
"Sequence part is not available");
@@ -202,7 +202,7 @@
}
seq_id = sandesha2_identifier_get_identifier(
sandesha2_terminate_seq_get_identifier(term_seq, env), env);
- if(NULL == seq_id || 0 == AXIS2_STRLEN(seq_id))
+ if(!seq_id || 0 == AXIS2_STRLEN(seq_id))
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Invalid "
"sequence id");
@@ -283,9 +283,9 @@
SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, storage_man);
highest_msg_key = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_KEY, storage_man);
- if(NULL != highest_msg_num_str)
+ if(highest_msg_num_str)
{
- if(NULL == highest_msg_key)
+ if(!highest_msg_key)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Key of the "
"highest message number has not been stored");
@@ -315,7 +315,7 @@
if(op_ctx)
highest_out_msg = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env,
AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE);
- if(NULL != highest_out_msg)
+ if(highest_out_msg)
{
sandesha2_msg_ctx_t *highest_out_rm_msg = NULL;
sandesha2_seq_t *seq_of_out_msg = NULL;
@@ -324,7 +324,7 @@
seq_of_out_msg = (sandesha2_seq_t*)
sandesha2_msg_ctx_get_msg_part(highest_out_rm_msg, env,
SANDESHA2_MSG_PART_SEQ);
- if(NULL != seq_of_out_msg)
+ if(seq_of_out_msg)
{
axis2_char_t long_str[32];
sandesha2_seq_property_bean_t *highest_out_msg_bean = NULL;
@@ -345,7 +345,7 @@
out_seq_id = sandesha2_utils_get_seq_property(env, res_side_int_seq_id,
SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_man);
if(AXIS2_TRUE == add_res_side_term && highest_out_msg_num > 0 &&
- NULL != res_side_int_seq_id && NULL != out_seq_id)
+ res_side_int_seq_id && out_seq_id)
{
axis2_bool_t all_acked = AXIS2_FALSE;
all_acked = sandesha2_utils_is_all_msgs_acked_upto(env,
@@ -526,7 +526,7 @@
int_seq_id = sandesha2_utils_get_internal_seq_id(env, to_address, seq_key);
out_seq_id = sandesha2_utils_get_seq_property(env, int_seq_id,
SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_man);
- if(NULL == out_seq_id)
+ if(!out_seq_id)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] seq_id was not"
" found. Cannot send the terminate message");
@@ -549,7 +549,7 @@
AXIS2_CONF_CTX_REGISTER_OP_CTX(conf_ctx, env, sandesha2_msg_ctx_get_msg_id(
rm_msg_ctx, env), op_ctx);
- if(NULL != terminated && 0 == AXIS2_STRCMP(terminated, SANDESHA2_VALUE_TRUE))
+ if(terminated && 0 == AXIS2_STRCMP(terminated, SANDESHA2_VALUE_TRUE))
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Terminate was "
"added previously");
@@ -569,7 +569,7 @@
AXIS2_FALSE);
AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env, to_address));
rm_version = sandesha2_utils_get_rm_version(env, int_seq_id, storage_man);
- if(NULL == rm_version)
+ if(!rm_version)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cant find the"
" rm_version of the given message");
@@ -584,7 +584,7 @@
transport_to = sandesha2_utils_get_seq_property(env, int_seq_id,
SANDESHA2_SEQ_PROP_TRANSPORT_TO, storage_man);
- if(NULL != transport_to)
+ if(transport_to)
{
property = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
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=485492&r1=485491&r2=485492
==============================================================================
--- 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 Sun Dec 10 20:28:58 2006
@@ -63,7 +63,7 @@
(env->allocator,
sizeof( sandesha2_terminate_seq_res_msg_processor_impl_t));
- if(NULL == msg_proc_impl)
+ if(!msg_proc_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -71,7 +71,7 @@
msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
sizeof(sandesha2_msg_processor_ops_t));
- if(NULL == msg_proc_impl->msg_processor.ops)
+ if(!msg_proc_impl->msg_processor.ops)
{
sandesha2_terminate_seq_res_msg_processor_free((sandesha2_msg_processor_t*)
msg_proc_impl, env);
@@ -99,7 +99,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
- if(NULL != msg_processor->ops)
+ if(msg_processor->ops)
AXIS2_FREE(env->allocator, msg_processor->ops);
AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/create_seq_bean.c Sun Dec 10 20:28:58 2006
@@ -60,6 +60,7 @@
static const sandesha2_rm_bean_ops_t rm_bean_ops =
{
sandesha2_create_seq_bean_free,
+ sandesha2_create_seq_bean_get_base,
sandesha2_create_seq_bean_set_id,
sandesha2_create_seq_bean_get_id,
sandesha2_create_seq_bean_set_transaction,
@@ -88,7 +89,7 @@
create_seq_bean_impl->create_seq_msg_store_key = NULL;
create_seq_bean_impl->ref_msg_store_key = NULL;
create_seq_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
- create_seq_bean_impl->create_seq_bean.rm_bean.ops = &rm_bean_ops;
+ create_seq_bean_impl->create_seq_bean.rm_bean.ops = rm_bean_ops;
return &(create_seq_bean_impl->create_seq_bean);
}
@@ -120,7 +121,7 @@
create_seq_bean_impl->create_seq_msg_store_key = NULL;
create_seq_bean_impl->ref_msg_store_key = NULL;
create_seq_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
- create_seq_bean_impl->create_seq_bean.rm_bean.ops = &rm_bean_ops;
+ create_seq_bean_impl->create_seq_bean.rm_bean.ops = rm_bean_ops;
return &(create_seq_bean_impl->create_seq_bean);
}
@@ -163,7 +164,7 @@
sandesha2_rm_bean_t * AXIS2_CALL
sandesha2_create_seq_bean_get_base(
- 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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/invoker_bean.c Sun Dec 10 20:28:58 2006
@@ -36,7 +36,7 @@
/* Weather the message has been invoked by the invoker.*/
axis2_bool_t invoked;
-}sandesha2_invoker_bean_impl_t;
+} sandesha2_invoker_bean_impl_t;
#define SANDESHA2_INTF_TO_IMPL(invoker_bean) \
((sandesha2_invoker_bean_impl_t *) invoker_bean)
@@ -44,6 +44,7 @@
static const sandesha2_rm_bean_ops_t rm_bean_ops =
{
sandesha2_invoker_bean_free,
+ sandesha2_invoker_bean_get_base,
sandesha2_invoker_bean_set_id,
sandesha2_invoker_bean_get_id,
sandesha2_invoker_bean_set_transaction,
@@ -72,7 +73,7 @@
invoker_bean_impl->seq_id = NULL;
invoker_bean_impl->invoked = AXIS2_FALSE;
invoker_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
- invoker_bean_impl->invoker_bean.rm_bean.ops = &rm_bean_ops;
+ invoker_bean_impl->invoker_bean.rm_bean.ops = rm_bean_ops;
return &(invoker_bean_impl->invoker_bean);
}
@@ -111,7 +112,7 @@
invoker_bean_impl->msg_no = msg_no;
invoker_bean_impl->invoked = invoked;
invoker_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
- invoker_bean_impl->invoker_bean.rm_bean.ops = &rm_bean_ops;
+ invoker_bean_impl->invoker_bean.rm_bean.ops = rm_bean_ops;
return &(invoker_bean_impl->invoker_bean);
}
@@ -148,7 +149,7 @@
sandesha2_rm_bean_t * AXIS2_CALL
sandesha2_invoker_bean_get_base(
- 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;
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/next_msg_bean.c Sun Dec 10 20:28:58 2006
@@ -16,43 +16,56 @@
#include <sandesha2_next_msg_bean.h>
#include <sandesha2_rm_bean.h>
+#include <sandesha2_transaction.h>
#include <string.h>
#include <axis2_string.h>
#include <axis2_utils.h>
/* next_msg_bean struct */
-struct sandesha2_next_msg_bean_t
+typedef struct sandesha2_next_msg_bean_impl
{
- sandesha2_rm_bean_t *rm_bean;
+ sandesha2_next_msg_bean_t next_msg_bean;
+ sandesha2_rm_bean_t *rm_bean_impl;
axis2_char_t *seq_id;
axis2_char_t *ref_msg_key;
axis2_bool_t polling_mode;
long msg_no;
+} sandesha2_next_msg_bean_impl_t;
+
+#define SANDESHA2_INTF_TO_IMPL(next_msg_bean) \
+ ((sandesha2_next_msg_bean_impl_t *) next_msg_bean)
+
+static const sandesha2_rm_bean_ops_t rm_bean_ops =
+{
+ sandesha2_next_msg_bean_free,
+ sandesha2_next_msg_bean_get_base,
+ sandesha2_next_msg_bean_set_id,
+ sandesha2_next_msg_bean_get_id,
+ sandesha2_next_msg_bean_set_transaction,
+ sandesha2_next_msg_bean_get_transaction
};
AXIS2_EXTERN sandesha2_next_msg_bean_t* AXIS2_CALL
-sandesha2_next_msg_bean_create(const axis2_env_t *env)
+sandesha2_next_msg_bean_create(
+ const axis2_env_t *env)
{
- sandesha2_next_msg_bean_t *bean = NULL;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
-
- bean = (sandesha2_next_msg_bean_t *)AXIS2_MALLOC(env->allocator,
- sizeof(sandesha2_next_msg_bean_t));
-
- if(!bean)
+ next_msg_bean_impl = (sandesha2_next_msg_bean_impl_t *)AXIS2_MALLOC(
+ env->allocator, sizeof(sandesha2_next_msg_bean_impl_t));
+ if(!next_msg_bean_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
/* init the properties. */
- bean->seq_id = NULL;
- bean->ref_msg_key = NULL;
- bean->msg_no = -1;
- bean->polling_mode = AXIS2_FALSE;
- bean->rm_bean = NULL;
-
- return bean;
+ next_msg_bean_impl->seq_id = NULL;
+ next_msg_bean_impl->ref_msg_key = NULL;
+ next_msg_bean_impl->msg_no = -1;
+ next_msg_bean_impl->polling_mode = AXIS2_FALSE;
+ next_msg_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
+ next_msg_bean_impl->next_msg_bean.rm_bean.ops = rm_bean_ops;
+ return &(next_msg_bean_impl->next_msg_bean);
}
AXIS2_EXTERN sandesha2_next_msg_bean_t* AXIS2_CALL
@@ -61,68 +74,75 @@
axis2_char_t *seq_id,
long msg_no)
{
- sandesha2_next_msg_bean_t *bean = NULL;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- bean = (sandesha2_next_msg_bean_t *)AXIS2_MALLOC(env->allocator,
- sizeof(sandesha2_next_msg_bean_t));
-
- if(!bean)
+ next_msg_bean_impl = (sandesha2_next_msg_bean_impl_t *)AXIS2_MALLOC(
+ env->allocator, sizeof(sandesha2_next_msg_bean_impl_t));
+ if(!next_msg_bean_impl)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
/* init the properties. */
- bean->seq_id = (axis2_char_t*)AXIS2_STRDUP(seq_id, env);
- bean->ref_msg_key = NULL;
- bean->msg_no = msg_no;
- bean->polling_mode = AXIS2_FALSE;
- bean->rm_bean = NULL;
-
- return bean;
+ next_msg_bean_impl->seq_id = (axis2_char_t*)AXIS2_STRDUP(seq_id, env);
+ next_msg_bean_impl->ref_msg_key = NULL;
+ next_msg_bean_impl->msg_no = msg_no;
+ next_msg_bean_impl->polling_mode = AXIS2_FALSE;
+ next_msg_bean_impl->rm_bean_impl = sandesha2_rm_bean_create(env);
+ next_msg_bean_impl->next_msg_bean.rm_bean.ops = rm_bean_ops;
+ return &(next_msg_bean_impl->next_msg_bean);
}
-axis2_status_t AXIS2_CALL
+void AXIS2_CALL
sandesha2_next_msg_bean_free (
- sandesha2_next_msg_bean_t *next_msg_bean,
+ sandesha2_rm_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- if(next_msg_bean->rm_bean)
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ if(next_msg_bean_impl->rm_bean_impl)
{
- sandesha2_rm_bean_free(next_msg_bean->rm_bean, env);
- next_msg_bean->rm_bean= NULL;
+ sandesha2_rm_bean_free(next_msg_bean_impl->rm_bean_impl, env);
+ next_msg_bean_impl->rm_bean_impl= NULL;
}
- if(next_msg_bean->seq_id)
+ if(next_msg_bean_impl->seq_id)
{
- AXIS2_FREE(env->allocator, next_msg_bean->seq_id);
- next_msg_bean->seq_id= NULL;
+ AXIS2_FREE(env->allocator, next_msg_bean_impl->seq_id);
+ next_msg_bean_impl->seq_id= NULL;
}
- if(next_msg_bean->ref_msg_key)
+ if(next_msg_bean_impl->ref_msg_key)
{
- AXIS2_FREE(env->allocator, next_msg_bean->ref_msg_key);
- next_msg_bean->ref_msg_key= NULL;
+ AXIS2_FREE(env->allocator, next_msg_bean_impl->ref_msg_key);
+ next_msg_bean_impl->ref_msg_key= NULL;
}
- return AXIS2_SUCCESS;
+ if(next_msg_bean_impl)
+ {
+ AXIS2_FREE(env->allocator, next_msg_bean_impl);
+ next_msg_bean_impl = NULL;
+ }
}
sandesha2_rm_bean_t * AXIS2_CALL
sandesha2_next_msg_bean_get_base(
- sandesha2_next_msg_bean_t* next_msg,
+ sandesha2_rm_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- return next_msg->rm_bean;
-
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return next_msg_bean_impl->rm_bean_impl;
}
void AXIS2_CALL
sandesha2_next_msg_bean_set_base (
- sandesha2_next_msg_bean_t *next_msg,
+ sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env,
sandesha2_rm_bean_t* rm_bean)
{
- next_msg->rm_bean = rm_bean;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ next_msg_bean_impl->rm_bean_impl = rm_bean;
}
axis2_char_t* AXIS2_CALL
@@ -130,7 +150,9 @@
sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- return next_msg_bean->seq_id;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return next_msg_bean_impl->seq_id;
}
@@ -140,13 +162,15 @@
const axis2_env_t *env,
axis2_char_t *seq_id)
{
- if(next_msg_bean->seq_id)
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ if(next_msg_bean_impl->seq_id)
{
- AXIS2_FREE(env->allocator, next_msg_bean->seq_id);
- next_msg_bean->seq_id = NULL;
+ AXIS2_FREE(env->allocator, next_msg_bean_impl->seq_id);
+ next_msg_bean_impl->seq_id = NULL;
}
- next_msg_bean->seq_id = (axis2_char_t*) AXIS2_STRDUP(seq_id, env);
+ next_msg_bean_impl->seq_id = (axis2_char_t*) AXIS2_STRDUP(seq_id, env);
}
@@ -155,7 +179,9 @@
sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- return next_msg_bean->msg_no;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return next_msg_bean_impl->msg_no;
}
void AXIS2_CALL
@@ -164,7 +190,9 @@
const axis2_env_t *env,
long next_msg_no)
{
- next_msg_bean->msg_no = next_msg_no;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ next_msg_bean_impl->msg_no = next_msg_no;
}
axis2_bool_t AXIS2_CALL
@@ -172,7 +200,9 @@
sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- return next_msg_bean->polling_mode;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return next_msg_bean_impl->polling_mode;
}
void AXIS2_CALL
@@ -181,7 +211,9 @@
const axis2_env_t *env,
axis2_bool_t polling_mode)
{
- next_msg_bean->polling_mode = polling_mode;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ next_msg_bean_impl->polling_mode = polling_mode;
}
axis2_char_t *AXIS2_CALL
@@ -189,7 +221,9 @@
sandesha2_next_msg_bean_t *next_msg_bean,
const axis2_env_t *env)
{
- return next_msg_bean->ref_msg_key;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return next_msg_bean_impl->ref_msg_key;
}
void AXIS2_CALL
@@ -198,7 +232,52 @@
const axis2_env_t *env,
axis2_char_t *ref_msg_key)
{
- next_msg_bean->ref_msg_key = ref_msg_key;
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ next_msg_bean_impl->ref_msg_key = ref_msg_key;
}
+void AXIS2_CALL
+sandesha2_next_msg_bean_set_id(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env,
+ long id)
+{
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ sandesha2_rm_bean_set_id(next_msg_bean_impl->rm_bean_impl, env, id);
+}
+
+long AXIS2_CALL
+sandesha2_next_msg_bean_get_id(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env)
+{
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return sandesha2_rm_bean_get_id(next_msg_bean_impl->rm_bean_impl, env);
+}
+
+void AXIS2_CALL
+sandesha2_next_msg_bean_set_transaction(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env,
+ sandesha2_transaction_t *transaction)
+{
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ sandesha2_rm_bean_set_transaction(next_msg_bean_impl->rm_bean_impl, env,
+ transaction);
+}
+
+sandesha2_transaction_t *AXIS2_CALL
+sandesha2_next_msg_bean_get_transaction(
+ sandesha2_rm_bean_t *next_msg_bean,
+ const axis2_env_t *env)
+{
+ sandesha2_next_msg_bean_impl_t *next_msg_bean_impl = NULL;
+ next_msg_bean_impl = SANDESHA2_INTF_TO_IMPL(next_msg_bean);
+ return sandesha2_rm_bean_get_transaction(next_msg_bean_impl->rm_bean_impl,
+ env);
+}
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=485492&r1=485491&r2=485492
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/rm_bean.c Sun Dec 10 20:28:58 2006
@@ -32,6 +32,7 @@
static const sandesha2_rm_bean_ops_t rm_bean_ops =
{
sandesha2_rm_bean_free,
+ NULL,
sandesha2_rm_bean_set_id,
sandesha2_rm_bean_get_id,
sandesha2_rm_bean_set_transaction,
@@ -53,7 +54,7 @@
/* init the properties. */
rm_bean_impl->id = -1;
rm_bean_impl->transaction = NULL;
- rm_bean_impl->rm_bean.ops = &rm_bean_ops;
+ rm_bean_impl->rm_bean.ops = rm_bean_ops;
return &(rm_bean_impl->rm_bean);
}
@@ -62,6 +63,14 @@
sandesha2_rm_bean_t *rm_bean,
const axis2_env_t *env)
{
+}
+
+sandesha2_rm_bean_t * AXIS2_CALL
+sandesha2_rm_bean_get_base(
+ sandesha2_rm_bean_t *rm_bean,
+ const axis2_env_t *env)
+{
+ return rm_bean->ops.get_base(rm_bean, env);
}
void AXIS2_CALL
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org