如何重建 wf_java_deferred 队列(queue)

简介: Followings steps are to be followed to rebuild the queue1. Check to see what records will be backed up on the wf_queue_temp_jms_table backup table.
Followings steps are to be followed to rebuild the queue
1. Check to see what records will be backed up on the wf_queue_temp_jms_table backup table. 
select wfjd.corr_id corrid, msg_state state, count(*) COUNT 
from applsys.aq$wf_java_deferred wfjd 
where msg_state IN('READY', 'WAIT') 
group by corr_id, wfjd.msg_state; 

2). Shutdown the Workflow Agent Listener Service and backup the records on the WF_JAVA_DEFERRED queue to the apps.wf_queue_temp_jms_table backup table. 

System Administrator > Oracle Applications Manager > Workflow > Service Components > Workflow Agent Listener Service

sqlplus apps/ @wfaqback.sql 

For Example: 

sqlplus apps/apps @$FND_TOP/sql/wfaqback.sql WF_JAVA_DEFERRED 

3). Make sure all the records are in the wf_queue_temp_jms_table table. 

select CORR_ID corrid, QUEUE queue, count (*) 
from apps.wf_queue_temp_jms_table 
group by CORR_ID, QUEUE; 

4). Set aq_tm_processes =0.

alter system set aq_tm_processes=0; 


5). Note the name of the tablspace containing index on CORRID that will need to be recreated later. 


SELECT index_name, tablespace_name 
FROM all_indexes 
WHERE index_name = 'WF_JAVA_DEFERRED_N1'; 



6). Drop the WF_JAVA_DEFERRED queue and queue_table.



declare 

begin 
dbms_aqadm.stop_queue(queue_name => 'APPLSYS.WF_JAVA_DEFERRED', wait => 
FALSE); 
end; 


declare 

begin 
dbms_aqadm.drop_queue_table(queue_table => 'APPLSYS.WF_JAVA_DEFERRED', force 
=> TRUE); 
end; 




7). Recreate the WF_JAVA_DEFERRED queue.

sqlplus / @wfbesqc.sql 

For Example: 

sqlplus apps/apps @$FND_TOP/patch/115/sql/wfbesqc.sql APPLSYS APPS 


8). Add the subscribers.


sqlplus APPSusr/ @wfbesqsubc.sql 

Example Syntax: 

sqlplus apps/apps @$FND_TOP/patch/115/sql/wfbesqsubc.sql APPLSYS APPS 



9). Recreate the index (Please ignore any ORA-00955 errors about object already exist as this adds index for other objects.): 

sqlplus APPSusr/ @FND_TOP/patch/115/sql/wfbesqidxc.sql APPLSYS APPS tablespace_name 

Example Syntax: 

sqlplus apps/apps @$FND_TOP/patch/115/sql/wfbesqidxc.sql APPLSYS APPS APPS_TS_QUEUES


10). Put the data for the WF_JAVA_DEFERRED back into the queue.


sqlplus apps/ @wfaqrenq.sql 

For Example: 

sqlplus apps/apps @$FND_TOP/sql/wfaqrenq.sql WF_JAVA_DEFERRED 

11). Confirm that all records are back on the queue. 

select wfjd.corr_id corrid, msg_state state, count(*) COUNT 
from applsys.aq$wf_java_deferred wfjd 
where msg_state IN('READY', 'WAIT') 
group by corr_id, wfjd.msg_state; 



12). Start the Workflow Agent Listener Service and confirm it is now processing the events on the queue. 

System Administrator > Oracle Applications Manager > Workflow > Service Components > Workflow Agent Listener Service 

select wfjd.corr_id corrid, msg_state state, count(*) COUNT 
from applsys.aq$wf_java_deferred wfjd 
where msg_state IN('READY', 'WAIT') 
group by corr_id, wfjd.msg_state;
相关文章
|
1月前
|
前端开发 Java
java中的Queue队列的用法
java中的Queue队列的用法
19 1
|
1月前
|
存储 安全 算法
解读 Java 并发队列 BlockingQueue
解读 Java 并发队列 BlockingQueue
20 0
|
1月前
|
存储 安全 Java
java集合框架及其特点(List、Set、Queue、Map)
java集合框架及其特点(List、Set、Queue、Map)
|
3月前
|
Java
队列(JAVA)
队列:只允许在一端进行插入数据操作,在另一端进行删除数据操作的特殊线性表,队列具有先进先出的性质。
21 0
|
1天前
|
存储 Java C++
Java集合篇之深度解析Queue,单端队列、双端队列、优先级队列、阻塞队列
Java集合篇之深度解析Queue,单端队列、双端队列、优先级队列、阻塞队列
8 0
|
1月前
|
安全 Java API
Java并发 - J.U.C并发容器类 list、set、queue
Queue API 阻塞是通过 condition 来实现的,可参考 Java 并发 - Lock 接口 ArrayBlockingQueue 阻塞 LinkedBlockingQueue 阻塞 ArrayQueue 非阻塞 LinkedQueue 非阻塞
|
2月前
|
存储 安全 Java
JAVA常用队列类
JAVA常用队列类
|
2月前
|
算法 安全 前端开发
Java Queue接口及其常用实现类分析
Java Queue接口及其常用实现类分析
|
3月前
|
C++ Java Go
Java每日一练(20230428) 搜索旋转排序数组、栈实现队列、平方根
Java每日一练(20230428) 搜索旋转排序数组、栈实现队列、平方根
45 0
Java每日一练(20230428) 搜索旋转排序数组、栈实现队列、平方根
|
3月前
|
Java
JAVA AQS 抽象队列同步器
在 AQS(AbstractQueuedSynchronizer)中,可以通过一些机制来实现共享锁。AQS是Java并发包中的一个基础框架,它提供了一种用于构建锁和同步器的工具。