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 da...@apache.org on 2007/03/23 12:08:38 UTC
svn commit: r521672 - in /webservices/sandesha/trunk/c:
samples/rm_echo_single_1_0/ samples/rm_mtom_1_0/ samples/rm_report/
src/handlers/ src/msgprocessors/ src/storage/permanent/
Author: damitha
Date: Fri Mar 23 04:08:37 2007
New Revision: 521672
URL: http://svn.apache.org/viewvc?view=rev&rev=521672
Log:
removed redundnt function busy_handler from permanent_transaction
Modified:
webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
webservices/sandesha/trunk/c/samples/rm_mtom_1_0/rm_mtom_1_0.c
webservices/sandesha/trunk/c/samples/rm_report/report.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
Modified: webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c Fri Mar 23 04:08:37 2007
@@ -186,7 +186,7 @@
property);
}
- property = axis2_property_create_with_args(env, 0, 0, 0, "4");
+ property = axis2_property_create_with_args(env, 0, 0, 0, "12");
if(property)
{
AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TIMEOUT_IN_SECONDS,
@@ -214,7 +214,7 @@
}
payload = NULL;
- property = axis2_property_create_with_args(env, 0, 0, 0, "4");
+ property = axis2_property_create_with_args(env, 0, 0, 0, "12");
if(property)
{
AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TIMEOUT_IN_SECONDS,
@@ -240,7 +240,7 @@
}
payload = NULL;
- property = axis2_property_create_with_args(env, 0, 0, 0, "4");
+ property = axis2_property_create_with_args(env, 0, 0, 0, "12");
if(property)
{
AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TIMEOUT_IN_SECONDS,
Modified: webservices/sandesha/trunk/c/samples/rm_mtom_1_0/rm_mtom_1_0.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_mtom_1_0/rm_mtom_1_0.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_mtom_1_0/rm_mtom_1_0.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_mtom_1_0/rm_mtom_1_0.c Fri Mar 23 04:08:37 2007
@@ -190,7 +190,7 @@
printf("\necho client two way single channel invoke FAILED!\n");
}*/
- property = axis2_property_create_with_args(env, 0, 0, 0, "4");
+ property = axis2_property_create_with_args(env, 0, 0, 0, "12");
if(property)
{
AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TIMEOUT_IN_SECONDS,
Modified: webservices/sandesha/trunk/c/samples/rm_report/report.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_report/report.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_report/report.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_report/report.c Fri Mar 23 04:08:37 2007
@@ -188,7 +188,7 @@
svc_ctx = AXIS2_SVC_CLIENT_GET_SVC_CTX(svc_client, env);
conf_ctx = axis2_svc_ctx_get_conf_ctx(svc_ctx, env);
- property = axis2_property_create_with_args(env, 0, 0, 0, "4");
+ property = axis2_property_create_with_args(env, 0, 0, 0, "12");
if(property)
{
AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_TIMEOUT_IN_SECONDS,
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Fri Mar 23 04:08:37 2007
@@ -99,7 +99,6 @@
AXIS2_LOG_INFO(env->log, "[sandesha2] Starting in handler .........");
- printf("came20\n");
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
if(!conf_ctx)
{
@@ -136,7 +135,6 @@
conf = axis2_conf_ctx_get_conf(conf_ctx, env);
storage_mgr = sandesha2_utils_get_storage_mgr(env, conf_ctx, conf);
temp_prop = NULL;
- printf("came21\n");
temp_prop = axis2_ctx_get_property(ctx, env,
SANDESHA2_WITHIN_TRANSACTION, AXIS2_FALSE);
if(temp_prop)
@@ -175,7 +173,6 @@
}
rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
- printf("came22\n");
if(!AXIS2_ERROR_GET_STATUS_CODE(env->error))
{
/* Message should not be sent in an exception situation */
@@ -207,7 +204,6 @@
AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- printf("came23\n");
/*
* TODO Validate the message
* SANDESHA2_MSG_VALIDATOR_VALIDATE(env, rm_msg_ctx, storage_mgr);
@@ -230,10 +226,8 @@
}
msg_processor = sandesha2_msg_processor_create_msg_processor(env,
rm_msg_ctx);
- printf("came24\n");
if(msg_processor)
{
- printf("came25\n");
sandesha2_msg_processor_process_in_msg(msg_processor, env, rm_msg_ctx);
}
if(!within_transaction && !rolled_back)
@@ -246,7 +240,6 @@
axis2_ctx_set_property(ctx, env, SANDESHA2_WITHIN_TRANSACTION,
prop, AXIS2_FALSE);
}
- printf("came27\n");
AXIS2_LOG_INFO(env->log, "[sandesha2] Exit: sandesha2_in_handler::invoke");
return AXIS2_SUCCESS;
Modified: webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c Fri Mar 23 04:08:37 2007
@@ -52,7 +52,6 @@
int msg_type = -1;
msg_type = sandesha2_msg_ctx_get_msg_type(rm_msg_ctx, env);
- printf("msg_type:%d\n", msg_type);
switch(msg_type)
{
case SANDESHA2_MSG_TYPE_CREATE_SEQ:
Modified: webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c?view=diff&rev=521672&r1=521671&r2=521672
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c (original)
+++ webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c Fri Mar 23 04:08:37 2007
@@ -53,15 +53,6 @@
#define SANDESHA2_INTF_TO_IMPL(trans) \
((sandesha2_permanent_transaction_impl_t *) trans)
-int
-sandesha2_permanent_transaction_busy_handler(
- sqlite3* dbconn,
- char *sql_stmt,
- int (*callback_func)(void *, int, char **, char **),
- void *args,
- char **error_msg,
- int rc);
-
axis2_status_t AXIS2_CALL
sandesha2_permanent_transaction_free(
sandesha2_transaction_t *trans,
@@ -119,18 +110,20 @@
trans_impl = (sandesha2_permanent_transaction_impl_t *)AXIS2_MALLOC
(env->allocator, sizeof(sandesha2_permanent_transaction_impl_t));
+ trans_impl->mutex = sandesha2_permanent_storage_mgr_get_mutex(storage_mgr, env);
trans_impl->storage_mgr = storage_mgr;
trans_impl->thread_id = thread_id;
trans_impl->dbconn = NULL;
trans_impl->enlisted_beans = axis2_array_list_create(env, 0);
- trans_impl->mutex = sandesha2_permanent_storage_mgr_get_mutex(storage_mgr, env);
trans_impl->trans.ops = &transaction_ops;
conf_ctx = (axis2_conf_ctx_t *) sandesha2_storage_mgr_get_ctx(
storage_mgr, env);
if(conf_ctx)
conf = axis2_conf_ctx_get_conf((const axis2_conf_ctx_t *) conf_ctx, env);
else
+ {
return NULL;
+ }
prop_bean = (sandesha2_property_bean_t *)sandesha2_utils_get_property_bean(
env, conf);
/*path = sandesha2_property_bean_get_db_path(prop_bean, env);*/
@@ -176,7 +169,7 @@
rc = sqlite3_exec(trans_impl->dbconn, "BEGIN TRANSACTION;", 0, 0,
&error_msg);
if(rc == SQLITE_BUSY)
- rc = sandesha2_permanent_transaction_busy_handler(trans_impl->dbconn,
+ rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn,
"BEGIN TRANSACTION", 0, 0, &error_msg, rc);
if(rc != SQLITE_OK )
{
@@ -260,7 +253,7 @@
rc = sqlite3_exec(trans_impl->dbconn, "COMMIT TRANSACTION;", 0, 0, &error_msg);
if(rc == SQLITE_BUSY)
{
- rc = sandesha2_permanent_transaction_busy_handler(trans_impl->dbconn,
+ rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn,
"COMMIT TRANSACTION", 0, 0, &error_msg, rc);
}
if(rc != SQLITE_OK )
@@ -291,7 +284,7 @@
rc = sqlite3_exec(trans_impl->dbconn, "ROLLBACK TRANSACTION;", 0, 0,
&error_msg);
if(rc == SQLITE_BUSY)
- rc = sandesha2_permanent_transaction_busy_handler(trans_impl->dbconn,
+ rc = sandesha2_permanent_bean_mgr_busy_handler(trans_impl->dbconn,
"ROLLBACK TRANSACTION", 0, 0, &error_msg, rc);
if(rc != SQLITE_OK )
{
@@ -384,30 +377,4 @@
AXIS2_LOG_INFO(env->log,
"[sandesha2]Exit:sandesha2_permanent_transaction_enlist");
}
-
-int
-sandesha2_permanent_transaction_busy_handler(
- sqlite3* dbconn,
- char *sql_stmt,
- int (*callback_func)(void *, int, char **, char **),
- void *args,
- char **error_msg,
- int rc)
-{
- int counter = 0;
- printf("in busy handler3\n");
- while(rc == SQLITE_BUSY && counter < 512)
- {
- printf("in busy handler33\n");
- if(*error_msg)
- sqlite3_free(*error_msg);
- counter++;
- /*AXIS2_SLEEP(SANDESHA2_BUSY_WAIT_TIME);*/
- AXIS2_USLEEP(100000);
- rc = sqlite3_exec(dbconn, sql_stmt, callback_func, args, error_msg);
- }
- printf("in busy handler4\n");
- return rc;
-}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org