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 na...@apache.org on 2007/04/30 08:22:32 UTC
svn commit: r533600 - in /webservices/sandesha/trunk/c/src: storage/mysql/
workers/
Author: nandika
Date: Sun Apr 29 23:22:31 2007
New Revision: 533600
URL: http://svn.apache.org/viewvc?view=rev&rev=533600
Log:
errors corrected
Modified:
webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c
webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c
webservices/sandesha/trunk/c/src/workers/sender_worker.c
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_create_seq_mgr.c Sun Apr 29 23:22:31 2007
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <sandesha2_permanent_create_seq_mgr.h>
+#include "sandesha2_permanent_create_seq_mgr.h"
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_constants.h>
#include <sandesha2_storage_mgr.h>
@@ -245,25 +245,44 @@
axis2_char_t sql_insert[1024];
axis2_char_t sql_update[1024];
axis2_char_t sql_retrieve[256];
+ axis2_char_t *create_seq_msg_id = NULL;
+ axis2_char_t *internal_seq_id = NULL;
+ axis2_char_t *seq_id = NULL;
+ axis2_char_t *create_seq_msg_store_key = NULL;
+ axis2_char_t *ref_msg_store_key = NULL;
- axis2_char_t *create_seq_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
- (sandesha2_rm_bean_t *) bean, env);
- if(!create_seq_msg_id) create_seq_msg_id = "";
- axis2_char_t *internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
- if(!internal_seq_id) internal_seq_id = "";
- axis2_char_t *seq_id = sandesha2_create_seq_bean_get_seq_id(bean, env);
- if(!seq_id) seq_id = "";
- axis2_char_t *create_seq_msg_store_key =
- sandesha2_create_seq_bean_get_create_seq_msg_store_key(bean, env);
- if(!create_seq_msg_store_key) create_seq_msg_store_key = "";
- axis2_char_t *ref_msg_store_key =
- sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
- if(!ref_msg_store_key) ref_msg_store_key = "";
-
- AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
+ AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
+ create_seq_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
+ (sandesha2_rm_bean_t *) bean, env);
+ if(!create_seq_msg_id){
+ create_seq_msg_id = "";
+ }
+ internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
+
+ if(!internal_seq_id)
+ {
+ internal_seq_id = "";
+ }
+
+ seq_id = sandesha2_create_seq_bean_get_seq_id(bean, env);
+ if(!seq_id)
+ {
+ seq_id = "";
+ }
+ create_seq_msg_store_key = sandesha2_create_seq_bean_get_create_seq_msg_store_key(bean, env);
+ if(!create_seq_msg_store_key)
+ {
+ create_seq_msg_store_key = "";
+ }
+
+ ref_msg_store_key = sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
+ if(!ref_msg_store_key)
+ {
+ ref_msg_store_key = "";
+ }
+
sprintf(sql_retrieve, "select create_seq_msg_id, internal_seq_id,"\
"seq_id, create_seq_msg_store_key, ref_msg_store_key from create_seq "\
"where create_seq_msg_id='%s';", create_seq_msg_id);
@@ -337,33 +356,44 @@
axis2_char_t sql_retrieve[256];
axis2_char_t sql_update[1024];
axis2_bool_t ret = AXIS2_FALSE;
+ axis2_char_t *internal_seq_id = NULL;
+ axis2_char_t *seq_id = NULL;
+ axis2_char_t *create_seq_msg_store_key = NULL;
+ axis2_char_t *ref_msg_store_key = NULL;
axis2_char_t *create_seq_msg_id = sandesha2_create_seq_bean_get_create_seq_msg_id(
(sandesha2_rm_bean_t *) bean, env);
if(!create_seq_msg_id) create_seq_msg_id = "";
- axis2_char_t *internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
- if(!internal_seq_id) internal_seq_id = "";
- axis2_char_t *seq_id = sandesha2_create_seq_bean_get_seq_id(bean, env);
+
+ internal_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(bean, env);
+
+ if(!internal_seq_id) internal_seq_id = "";
+
+ seq_id = sandesha2_create_seq_bean_get_seq_id(bean, env);
if(!seq_id) seq_id = "";
- axis2_char_t *create_seq_msg_store_key =
- sandesha2_create_seq_bean_get_create_seq_msg_store_key(bean, env);
- if(!create_seq_msg_store_key) create_seq_msg_store_key = "";
- axis2_char_t *ref_msg_store_key =
- sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
+
+ create_seq_msg_store_key = sandesha2_create_seq_bean_get_create_seq_msg_store_key(bean, env);
+
+ if(!create_seq_msg_store_key) create_seq_msg_store_key = "";
+
+ ref_msg_store_key = sandesha2_create_seq_bean_get_ref_msg_store_key(bean, env);
+
if(!ref_msg_store_key) ref_msg_store_key = "";
- AXIS2_ENV_CHECK(env, AXIS2_FALSE);
AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
- seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
+
+ seq_mgr_impl = SANDESHA2_INTF_TO_IMPL(seq_mgr);
sprintf(sql_retrieve, "select create_seq_msg_id, internal_seq_id,"\
"seq_id, create_seq_msg_store_key, ref_msg_store_key from create_seq "\
"where create_seq_msg_id='%s';", create_seq_msg_id);
- sprintf(sql_update, "update create_seq set internal_seq_id='%s', seq_id='%s'"\
+
+ sprintf(sql_update, "update create_seq set internal_seq_id='%s', seq_id='%s'"\
",create_seq_msg_store_key='%s', ref_msg_store_key='%s' where "\
"create_seq_msg_id='%s';", internal_seq_id, seq_id,
create_seq_msg_store_key, ref_msg_store_key, create_seq_msg_id);
- ret = sandesha2_permanent_bean_mgr_update(seq_mgr_impl->bean_mgr, env,
+
+ ret = sandesha2_permanent_bean_mgr_update(seq_mgr_impl->bean_mgr, env,
(sandesha2_rm_bean_t *)bean, sandesha2_create_seq_retrieve_callback,
sql_retrieve, sql_update);
return ret;
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_invoker_mgr.c Sun Apr 29 23:22:31 2007
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <sandesha2_permanent_invoker_mgr.h>
+#include "sandesha2_permanent_invoker_mgr.h"
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_invoker_mgr.h>
#include <sandesha2_storage_mgr.h>
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_next_msg_mgr.c Sun Apr 29 23:22:31 2007
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <sandesha2_permanent_next_msg_mgr.h>
+#include "sandesha2_permanent_next_msg_mgr.h"
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_next_msg_mgr.h>
#include <sandesha2_constants.h>
@@ -339,16 +339,19 @@
axis2_char_t sql_update[1024];
axis2_bool_t ret = AXIS2_FALSE;
sandesha2_permanent_next_msg_mgr_t *next_msg_mgr_impl = NULL;
+ axis2_char_t *ref_msg_key = NULL;
+ axis2_bool_t polling_mode = AXIS2_FALSE;
+ long msg_no;
axis2_char_t *seq_id = sandesha2_next_msg_bean_get_seq_id((sandesha2_rm_bean_t *) bean,
env);
if(!seq_id) seq_id = "";
- axis2_char_t *ref_msg_key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
+ ref_msg_key = sandesha2_next_msg_bean_get_ref_msg_key(bean, env);
if(!ref_msg_key) ref_msg_key = "";
- axis2_bool_t polling_mode = sandesha2_next_msg_bean_is_polling_mode(bean, env);
- long msg_no = sandesha2_next_msg_bean_get_next_msg_no_to_process(bean, env);
+ polling_mode = sandesha2_next_msg_bean_is_polling_mode(bean, env);
+ msg_no = sandesha2_next_msg_bean_get_next_msg_no_to_process(bean, env);
- AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+
AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
next_msg_mgr_impl = SANDESHA2_INTF_TO_IMPL(next_msg_mgr);
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_sender_mgr.c Sun Apr 29 23:22:31 2007
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <sandesha2_permanent_sender_mgr.h>
+#include "sandesha2_permanent_sender_mgr.h"
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_sender_mgr.h>
#include <sandesha2_constants.h>
@@ -274,29 +274,44 @@
axis2_char_t sql_retrieve[256];
axis2_char_t sql_update[1024];
axis2_bool_t ret = AXIS2_FALSE;
+ axis2_char_t *msg_ctx_ref_key = NULL;
+ axis2_char_t *internal_seq_id = NULL;
+ int sent_count;
+ long msg_no;
+ axis2_bool_t send;
+ axis2_bool_t resend;
+ long time_to_send;
+ int msg_type;
+ axis2_char_t *seq_id;
+ axis2_char_t *wsrm_anon_uri;
+ axis2_char_t *to_address;
+
sandesha2_permanent_sender_mgr_t *sender_mgr_impl = NULL;
axis2_char_t *msg_id = sandesha2_sender_bean_get_msg_id((sandesha2_rm_bean_t *) bean,
env);
if(!msg_id) msg_id = "";
- axis2_char_t *msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
+
+ msg_ctx_ref_key = sandesha2_sender_bean_get_msg_ctx_ref_key(bean, env);
if(!msg_ctx_ref_key) msg_ctx_ref_key = "";
- axis2_char_t *internal_seq_id = sandesha2_sender_bean_get_internal_seq_id(bean, env);
+
+ internal_seq_id = sandesha2_sender_bean_get_internal_seq_id(bean, env);
if(!internal_seq_id) internal_seq_id = "";
- int sent_count = sandesha2_sender_bean_get_sent_count(bean, env);
- long msg_no = sandesha2_sender_bean_get_msg_no(bean, env);
- axis2_bool_t send = sandesha2_sender_bean_is_send(bean, env);
- axis2_bool_t resend = sandesha2_sender_bean_is_resend(bean, env);
- long time_to_send = sandesha2_sender_bean_get_time_to_send(bean, env);
- int msg_type = sandesha2_sender_bean_get_msg_type(bean, env);
- axis2_char_t *seq_id = sandesha2_sender_bean_get_seq_id(bean, env);
+
+ sent_count = sandesha2_sender_bean_get_sent_count(bean, env);
+
+ msg_no = sandesha2_sender_bean_get_msg_no(bean, env);
+ send = sandesha2_sender_bean_is_send(bean, env);
+ resend = sandesha2_sender_bean_is_resend(bean, env);
+ time_to_send = sandesha2_sender_bean_get_time_to_send(bean, env);
+ msg_type = sandesha2_sender_bean_get_msg_type(bean, env);
+ seq_id = sandesha2_sender_bean_get_seq_id(bean, env);
if(!seq_id) seq_id = "";
- axis2_char_t *wsrm_anon_uri = sandesha2_sender_bean_get_wsrm_anon_uri(bean, env);
+ wsrm_anon_uri = sandesha2_sender_bean_get_wsrm_anon_uri(bean, env);
if(!wsrm_anon_uri) wsrm_anon_uri = "";
- axis2_char_t *to_address = sandesha2_sender_bean_get_to_address(bean, env);
+ to_address = sandesha2_sender_bean_get_to_address(bean, env);
if(!to_address) to_address = "";
- AXIS2_ENV_CHECK(env, AXIS2_FALSE);
AXIS2_PARAM_CHECK(env->error, bean, AXIS2_FALSE);
sender_mgr_impl = SANDESHA2_INTF_TO_IMPL(sender_mgr);
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_seq_property_mgr.c Sun Apr 29 23:22:31 2007
@@ -15,7 +15,7 @@
*/
#include <sandesha2_seq_property_mgr.h>
-#include <sandesha2_permanent_seq_property_mgr.h>
+#include "sandesha2_permanent_seq_property_mgr.h"
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_constants.h>
#include <sandesha2_error.h>
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_storage_mgr.c Sun Apr 29 23:22:31 2007
@@ -20,9 +20,9 @@
#include <sandesha2_permanent_storage_mgr.h>
#include "sandesha2_permanent_bean_mgr.h"
#include <sandesha2_msg_store_bean.h>
-#include <sandesha2_permanent_create_seq_mgr.h>
+#include "sandesha2_permanent_create_seq_mgr.h"
#include <sandesha2_invoker_mgr.h>
-#include <sandesha2_permanent_invoker_mgr.h>
+#include "sandesha2_permanent_invoker_mgr.h"
#include <sandesha2_next_msg_mgr.h>
#include <sandesha2_permanent_next_msg_mgr.h>
#include <sandesha2_sender_mgr.h>
Modified: webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/mysql/permanent_transaction.c Sun Apr 29 23:22:31 2007
@@ -16,7 +16,7 @@
#include <platforms/axutil_platform_auto_sense.h>
#include <mysql.h>
-#include <sandesha2_permanent_transaction.h>
+#include "sandesha2_permanent_transaction.h"
#include "sandesha2_permanent_storage_mgr.h"
#include <sandesha2_transaction.h>
#include <sandesha2_constants.h>
@@ -30,7 +30,7 @@
#include <axutil_thread.h>
#include <axutil_property.h>
#include <axis2_module_desc.h>
-#include <sandesha2_permanent_bean_mgr.h>
+#include "sandesha2_permanent_bean_mgr.h"
typedef struct sandesha2_permanent_transaction_impl
sandesha2_permanent_transaction_impl_t;
Modified: webservices/sandesha/trunk/c/src/workers/sender_worker.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender_worker.c?view=diff&rev=533600&r1=533599&r2=533600
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender_worker.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender_worker.c Sun Apr 29 23:22:31 2007
@@ -298,6 +298,7 @@
}
if(!msg_ctx)
{
+ printf("msg_ctx is not present\n");
sandesha2_transaction_rollback(transaction, env);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] msg_ctx is "
"not present in the store");
@@ -322,6 +323,7 @@
sandesha2_sender_mgr_update(sender_mgr, env, sender_worker_bean);
if(!continue_sending)
{
+ printf("do not continue\n");
sender_worker->status = AXIS2_FAILURE;
/* We commit here since we have cleaned the
* sending side data and that need to commited */
@@ -341,6 +343,7 @@
if(qualified_for_sending && 0 != axutil_strcmp(
qualified_for_sending, AXIS2_VALUE_TRUE))
{
+ printf("not qualified for sending\n");
sandesha2_transaction_rollback(transaction, env);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[sandesha2] Message is not qualified for sending");
@@ -375,6 +378,7 @@
}
if(continue_sending)
{
+ printf("continue sending is true\n");
sandesha2_transaction_rollback(transaction, env);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Continue "\
"Sending is true. So returning from Sender Worker");
@@ -430,15 +434,17 @@
/* This is neccessary to avoid a double free */
axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
/* Consider building soap envelope */
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]came100###############################");
if(AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx))
- {
- successfully_sent = AXIS2_TRUE;
- sender_worker->counter++;
- }
- else
- {
- successfully_sent = AXIS2_FALSE;
- }
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]came101###############################");
+ successfully_sent = AXIS2_TRUE;
+ sender_worker->counter++;
+ }else
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]came102###############################");
+ successfully_sent = AXIS2_FALSE;
+ }
}
transaction = sandesha2_storage_mgr_get_transaction(storage_mgr, env);
property = axis2_msg_ctx_get_property(msg_ctx, env,
@@ -578,13 +584,13 @@
"[sandesha2] Start:sandesha2_sender_worker_check_for_sync_res");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
- property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
+ /*property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
if(!property)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[sandesha2] transport_in property not found");
return AXIS2_SUCCESS;
- }
+ }*/
res_msg_ctx = axis2_msg_ctx_create(env, axis2_msg_ctx_get_conf_ctx(msg_ctx,
env), axis2_msg_ctx_get_transport_in_desc(
@@ -597,10 +603,15 @@
property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
if(property)
{
- axutil_property_t *temp_prop = axutil_property_clone(property, env);
+ axutil_property_t *temp_prop = NULL;
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "AXIS2_TRANSPORT_IN not NULL");
+ temp_prop = axutil_property_clone(property, env);
axis2_msg_ctx_set_property(res_msg_ctx, env, AXIS2_TRANSPORT_IN,
temp_prop);
}
+ else
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "AXIS2_TRANSPORT_IN NULL######################################3");
+
axis2_msg_ctx_set_svc_ctx(res_msg_ctx, env, axis2_msg_ctx_get_svc_ctx(
msg_ctx, env));
axis2_msg_ctx_set_svc_grp_ctx(res_msg_ctx, env,
@@ -632,10 +643,8 @@
res_envelope = axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env);
if(!res_envelope)
- {
res_envelope = axis2_http_transport_utils_create_soap_msg(env, msg_ctx,
soap_ns_uri);
- }
property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_WITHIN_TRANSACTION);
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org