Oracle SOA
Wednesday, July 8, 2009
enqueue dequeue sql script
DECLARE
enqueue_options DBMS_AQ.enqueue_options_t;
message_properties DBMS_AQ.message_properties_t;
msg_handle RAW (16);
ipmsg ip_message_type;
xml_clob CLOB;
msg_id NUMBER (10);
subscribers DBMS_AQ.aq$_recipient_list_t;
BEGIN
xml_clob := '';
subscribers (1) :=
SYS.aq$_agent ('
, NULL
, NULL);
message_properties.recipient_list := subscribers;
DBMS_AQ.enqueue (queue_name => '
, enqueue_options => enqueue_options
, message_properties => message_properties
, payload => xml_clob
, msgid => msg_handle);
COMMIT;
END;
Dequeue Message
DECLARE
dequeue_options DBMS_AQ.dequeue_options_t;
message_properties DBMS_AQ.message_properties_t;
message_handle RAW (16);
xml_clob CLOB;
BEGIN
dequeue_options.consumer_name := '
dequeue_options.dequeue_mode := DBMS_AQ.remove;
-- Only if you want to remove message
dequeue_options.navigation := DBMS_AQ.next_message;
dequeue_options.WAIT := DBMS_AQ.forever;
DBMS_AQ.dequeue (queue_name => '
, dequeue_options => dequeue_options
, message_properties => message_properties
, payload => xml_clob
, msgid => message_handle);
DBMS_OUTPUT.PUT_LINE ('Message ID : ' xml_clob);
COMMIT;
END;
Sunday, July 5, 2009
Examples of Date and Time Formatting
The following examples show a selection of dates and times and the way they might be formatted. These examples assume the use of the Gregorian calendar as the default calendar.
| Required Output | Expression |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example: Non-Gregorian Calendars
The following examples use calendars other than the Gregorian calendar.
These examples use non-Latin characters which might not display correctly in all browsers, depending on the system configuration.
| Description | Request | Result |
| Islamic |
| ٢٦ ﺸﻭّﺍﻝ ١٤٢٣ |
| Jewish (with Western numbering) |
| 26 טבת 5763 |
| Jewish (with traditional numbering) |
| כ״ו טבת תשס״ג |
| Julian (Old Style) |
| 18 December 2002 |
| Thai |
| ๓๑ ธันวาคม ๒๕๔๕ |
How to enable debugging in Oracle ESB
2. Click on the oc4j_soa instance and Administration tab.
3. Click on Logger Configuration.
4. Now expand Root Logger / oracle to display the logger classes and the Log Level settings.
5. In the Log Level list, select the level FINE for the following classes
. oracle.tip.esb.server.common
. oracle.tip.esb.server.service
6. Restart the SOA suite to apply the changes and the logs can be found at
\\SERVER\\j2ee\oc4j_soa\application-deployments\esb-dt\oc4j_soa_default_group_1\application.log
\\SERVER\\j2ee\oc4j_soa\application-deployments\esb-rt\oc4j_soa_default_group_1\application.log
Oracle BPEL process manager rollback
I have a empty BPEL process that polls for AQJMS messages using a JMS adapter and then insert the received messages to the DB. Now the problem is, if there is any error w.r.t the DB insert, then it should rollback the message to the source destination i.e., my AQJMS Queue. But it is not happening. using the bpelx:rollback explicitly doesn't seem to help.
Answer:
You need to make it as one transaction. Use JCA-XA transaction. Just like in PL/SQL to make a transaction block we write it inside BEGIN ... END; in BPEL we create a JNDI of XA type (global-transaction handler) and then configure the property name 'transaction' to 'participate' for all partner links which are part of the transaction.
However you need to take care of one thing, if the process is syncronous and you call rollback then it will not show up in BPEL console, since it posting to dehydration db will also be rollbacked.
Read the soa_best_practices_1013x
http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf
Check the blog below for example on how to do this.
http://soab2bsahil.blogspot.com/2009/04/rollbacking-ebs-apis-using-bpel.html
Tables to be monitered in ORABPEL schema
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFCOMMENTS';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DLV_SUBSCRIPTION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ATTACHMENT_REF';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'TASK';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_DEFAULT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ACTIVITY_SENSOR_VALUES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASK';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFMESSAGEATTRIBUTE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTACHMENT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CUBE_INSTANCE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SCOPE_ACTIVATION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SYNC_STORE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SUITCASE_BIN';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ATTACHMENT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASK';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKATTACHMENT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VERSION_SERVER';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFROUTINGSLIP';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERVACATION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERTASKVIEWGRANT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERPREFERENCE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKTIMER';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATIONMESSAGES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOCUMENT_CI_REF';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'LOAN_CUSTOMER';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WI_EXCEPTION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'NATIVE_CORRELATION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'FAULT_SENSOR_VALUES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_OWF';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKASSIGNEE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTRIBUTELABELMAP';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFUSERTASKVIEW';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CI_INDEXES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SYNC_TRAIL';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'INVOKE_MESSAGE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VARIABLE_SENSOR_VALUES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'BPELPM_ERRORS';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'CUBE_SCOPE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'XML_DOCUMENT';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'BPELNOTIFICATION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'ID_RANGE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOMAIN_PROPERTIES';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKHISTORY';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFNOTIFICATIONSTATUS';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKMETADATA';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'VERSION';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'AUDIT_TRAIL';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'TEST_DEFINITIONS';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOMAIN';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PC_TASKASSIGNEEHISTORY';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WORK_ITEM';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DLV_MESSAGE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'DOCUMENT_DLV_MSG_REF';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_DESCRIPTOR';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'PROCESS_LOG';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'SENSOR_SEQUENCE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKHISTORY';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFASSIGNEE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFATTRIBUTELABELUSAGE';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'WFTASKDISPLAY';
select sum(bytes) from dba_extents where segment_type = 'TABLE' and segment_name = 'AUDIT_DETAILS';
Sunday, August 12, 2007
How to limit the performance of the BPEL File Adapter
Oracle(R) BPEL Process Manager - Version: 10.1.2 to 10.1.3
Information in this document applies to any platform.
Goal
How can you limit the number of files a file adapter processes at a time?
Can you process one file after another?
Solution
For async processes, the number of BPEL worker threads will limit the number of concurrent
instances. For example, if there are 2000 files in a directory to be processed by the file / ftp adapter then
no more than
As you can limit the number of threads available to all processes in a BPEL domain with the
dspMaxThreads parameter, should you wish to therefore only process a low number of files at a time
you can deploy that file adapter process to it's own domain and limit the number of threads within
that domain. By using multiple domains, the sum of the dspMaxThreads settings for all domains
must not exceed the MDB J2EE listener threads setting.
These are further settings are discussed at length within the Performance Tuning chapter of the
Guide below;
Oracle® BPEL Process Manager
Administrator’s Guide
Release 10.1.2
Part No. B25015-01
Chapter 3, Performance Tuning
http://www.oracle.com/technology/products/ias/bpel/documents/bpel_admin_10.1.3.1.0.pdf