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 2009/11/01 20:58:11 UTC
svn commit: r831750 - in /webservices/sandesha/trunk/c/src: msgprocessors/
polling/ util/
Author: damitha
Date: Sun Nov 1 19:58:10 2009
New Revision: 831750
URL: http://svn.apache.org/viewvc?rev=831750&view=rev
Log:
If storage manager is not created handle it
Modified:
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/close_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/make_connection_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/polling/polling_mgr.c
webservices/sandesha/trunk/c/src/util/error.c
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -195,6 +195,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -182,6 +182,13 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
acks_to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, seq_id,
SANDESHA2_SEQ_PROP_ACKS_TO_EPR);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -409,6 +409,13 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(app_msg_ctx, env);
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
fault_ctx = sandesha2_fault_mgr_check_for_last_msg_num_exceeded(env, rm_msg_ctx, seq_prop_mgr);
if(fault_ctx)
{
@@ -1111,6 +1118,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
if(!seq_prop_mgr)
{
@@ -2532,6 +2546,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return NULL;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
@@ -3503,6 +3524,13 @@
retrans_interval = args->retrans_interval;
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return NULL;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/close_seq_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -387,6 +387,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
Modified: webservices/sandesha/trunk/c/src/msgprocessors/close_seq_res_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/close_seq_res_msg_processor.c?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/close_seq_res_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/close_seq_res_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -157,6 +157,13 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr =sandesha2_permanent_sender_mgr_create(env, dbname);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- 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 Nov 1 19:58:10 2009
@@ -172,6 +172,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
csr_part = sandesha2_msg_ctx_get_create_seq_res(rm_msg_ctx, env);
if(!csr_part)
Modified: webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/make_connection_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -287,6 +287,13 @@
}
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
if(storage_mgr)
{
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Sun Nov 1 19:58:10 2009
@@ -221,6 +221,13 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(terminate_msg_ctx, env);
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
@@ -757,6 +764,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
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?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- 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 Nov 1 19:58:10 2009
@@ -162,6 +162,13 @@
conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
create_seq_mgr = sandesha2_permanent_create_seq_mgr_create(env, dbname);
sender_mgr =sandesha2_permanent_sender_mgr_create(env, dbname);
Modified: webservices/sandesha/trunk/c/src/polling/polling_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/polling/polling_mgr.c?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/polling/polling_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/polling/polling_mgr.c Sun Nov 1 19:58:10 2009
@@ -256,6 +256,13 @@
dbname = sandesha2_util_get_dbname(env, conf_ctx);
storage_mgr = sandesha2_utils_get_storage_mgr(env, dbname);
+ if(!storage_mgr)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Could not create storage manager.");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER,
+ AXIS2_FAILURE);
+ return NULL;
+ }
seq_prop_mgr = sandesha2_permanent_seq_property_mgr_create(env, dbname);
sender_mgr = sandesha2_permanent_sender_mgr_create(env, dbname);
next_msg_mgr = sandesha2_permanent_next_msg_mgr_create(env, dbname);
Modified: webservices/sandesha/trunk/c/src/util/error.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/error.c?rev=831750&r1=831749&r2=831750&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/error.c (original)
+++ webservices/sandesha/trunk/c/src/util/error.c Sun Nov 1 19:58:10 2009
@@ -176,6 +176,8 @@
"Cannot find a operation for generated message";
axutil_error_messages[SANDESHA2_ERROR_INVALID_PERSISTENCE_PROPERTY_STRING]=
"Invalid persistence property string";
+ axutil_error_messages[SANDESHA2_ERROR_COULD_NOT_CREATE_STORAGE_MANAGER]=
+ "Could not create storage manager";
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org