Will
2009-06-30 04:57:17 UTC
We are migrating from PB10.5/EAS5.2 to PB11.5/EAS6.2. Our application
includes a service component that uses CTSComponents/Threadmanager to
spawn new threads. The code worked fine in EAS5.2 however now we are
getting a runtime function error referring to the in_tm.start
(ls_thread_group, lpo) line of code below, at compile time everything
looks fine. Is there anything different we need to do in EAS6.2?
The code is as follows:
string ls_err, ls_thread_group, ls_component, ls_queue
long ll_run_interval = -1, ll_job_id
n_proc_base ln_proc
n_controller_base ln_ctrl
powerobject lpo
// --- check the rowcount
if al_row < 1 OR al_row > ads.Rowcount() then
ls_err = "Invalid row supplied to function"
GOTO error
end if
ls_queue = ads.GetItemString(al_row, CIS_THREAD)
ls_component = ads.GetItemString(al_row, CIS_COMP)
ll_job_id = ads.GetItemNumber(al_row, CIS_JOB)
if error.uf_is_failure(in_srv.uf_create_component(ls_component,
ln_ctrl)) then
RETURN error.uf_error()
end if
ln_ctrl.initialise_job(ll_job_id, al_profile_id)
// --- make sure we have a threadmanager proxy
if error.uf_is_failure(This.uf_get_threadmanager()) then GOTO error
// --- build the thread group name
if error.uf_is_failure(in_srv.uf_build_thread_name(ls_queue,
ls_thread_group, al_profile_id)) then GOTO error
if ll_run_interval >= 0 then
// --- set the run interval - check for syserrors
in_tm.setRunInterval(ls_thread_group, ll_run_interval)
if NOT error.uf_is_ok() then GOTO error
end if
// --- start the thread (need to broaden to a powerobject)
lpo = ln_ctrl
in_tm.start(ls_thread_group, lpo)
if NOT error.uf_is_ok() then GOTO error
in_srv.uf_dbg_life(This, "uf_start_thread()", "Thread started
successfully")
// --- success
RETURN error.uf_ok()
ERROR:
RETURN error.uf_int_err(This, "uf_start_thread()", ls_err)
The log error is:
2009-06-30 14:30:41.359 INFO Thread-6 [JaguarServer] Runtime Error in
PB Component: Bad runtime function reference at line 82 in function
uf_start_thread of object n_cst_thread.
includes a service component that uses CTSComponents/Threadmanager to
spawn new threads. The code worked fine in EAS5.2 however now we are
getting a runtime function error referring to the in_tm.start
(ls_thread_group, lpo) line of code below, at compile time everything
looks fine. Is there anything different we need to do in EAS6.2?
The code is as follows:
string ls_err, ls_thread_group, ls_component, ls_queue
long ll_run_interval = -1, ll_job_id
n_proc_base ln_proc
n_controller_base ln_ctrl
powerobject lpo
// --- check the rowcount
if al_row < 1 OR al_row > ads.Rowcount() then
ls_err = "Invalid row supplied to function"
GOTO error
end if
ls_queue = ads.GetItemString(al_row, CIS_THREAD)
ls_component = ads.GetItemString(al_row, CIS_COMP)
ll_job_id = ads.GetItemNumber(al_row, CIS_JOB)
if error.uf_is_failure(in_srv.uf_create_component(ls_component,
ln_ctrl)) then
RETURN error.uf_error()
end if
ln_ctrl.initialise_job(ll_job_id, al_profile_id)
// --- make sure we have a threadmanager proxy
if error.uf_is_failure(This.uf_get_threadmanager()) then GOTO error
// --- build the thread group name
if error.uf_is_failure(in_srv.uf_build_thread_name(ls_queue,
ls_thread_group, al_profile_id)) then GOTO error
if ll_run_interval >= 0 then
// --- set the run interval - check for syserrors
in_tm.setRunInterval(ls_thread_group, ll_run_interval)
if NOT error.uf_is_ok() then GOTO error
end if
// --- start the thread (need to broaden to a powerobject)
lpo = ln_ctrl
in_tm.start(ls_thread_group, lpo)
if NOT error.uf_is_ok() then GOTO error
in_srv.uf_dbg_life(This, "uf_start_thread()", "Thread started
successfully")
// --- success
RETURN error.uf_ok()
ERROR:
RETURN error.uf_int_err(This, "uf_start_thread()", ls_err)
The log error is:
2009-06-30 14:30:41.359 INFO Thread-6 [JaguarServer] Runtime Error in
PB Component: Bad runtime function reference at line 82 in function
uf_start_thread of object n_cst_thread.