Understanding XSLT key function & it's Application
Advantages of ESB over BPEL
Objectve:
To have a comparison of use of Oracle ESB against Oracle BPEL
Overview of Oracle BPEL/ESB:
Below link provides concepts and overview of Oracle BPEL and Oracle ESB a
ESB basically have four major functions:
Message routing
Message transformation
Protocol mediation
Event handling
All these can be achieved through BPEL as well. Adding to these BPEL provides us
BPEL Process (to handle complex logic & orchestration)
Human Task
Rules
Better Error Handling & Monitoring
Then what’s the point of using ESB.Check below characteristics of both
ESB characteristics:
1.To route messages to multiple destinations
2.Low cost solution
3.High performance integration solution
4.Simple transformation containing no rules
5.Small product footprint and hence minimal overhead
BPEL Characteristics:
1.Orchestrate business processes
2.Complex transformations
3.Human workflow requirement
4.Long running and stateful processes
5.Better error handling and sensors monitoring
What we could identify is, ESB flows are transactional hence stateless, using mechanisms such as two-phase commit, so that the entire flow can be rolled back in the case of a failure, or committed in the case of success. Also ESB has a small product footprint and hence minimal overhead.
Given the stateless transactional nature of an ESB, high performance is a given. It's not uncommon for an ESB to handle millions of messages each day in a large organization.
Deciding which run-time to use
The first order of business is to look through the requirements, and decide if one of the choices is a better fit. For example, if a stateful process is required, one can immediately rule out the ESB. If on the other hand the requirement is to process a message transformation in under 0.2 seconds, clearly the ESB would be the choice.
One of the main strengths of an ESB is processing messages including the ability to handle greater complexity in the transformations. If the requirements call for one of the basic ESB functions, such as message routing, transformation or protocol mediation, an ESB would be the clear choice.
Another strength of an ESB is performance. An ESB is designed to be able to handle large volumes of messages. If, for example, the requirements say that there will be 200,000 messages per day, the ESB would clearly be the better choice.
For any Orchestration,Business logic,Human Task or Rule etc BPEL will be better choice.
Relation Between JVM MaxPermSize and HeapSize
ØOptions that begin with-Xare non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in subsequent releases of the JDK.
ØOptions that are specified with-XXare not stable and are not recommended for casual use. These options are subject to change without notice.
The allocation of Heap Size for the JVM at startup is done based on parameters given below:
JVM option | Meaning |
-Xms | Initial java heap size |
-Xmx | Maximum java heap size |
-XX:PermSize | Intial java permanent space size |
-XX:MaxPermSize | Maximum java permanent space size |
With regards to the MaxPermSize, this argument adjusts the size of the "permanent generation." As I understand it, the perm gen holds information about the "stuff" in the heap. So, the heap stores the objects and the perm gen keeps information about the "stuff" inside of it.
Consequently, the larger the heap, the larger the perm gen needs to be.
In simpler term we can define the two parameters as given below:
ordinary heap = app objects
perm heap = app class definitions
The permanent generation is used to hold reflective data of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations."
Is MaxPermSize is inclusive in Xmx?
Suppose one set JVM parameters as.......
-Xms3072M -Xmx3072M -XX:+AggressiveHeap -XX:MaxPermSize=1024M.........
Doubt Is:When we say MaxPermSize = 1024M does it mean that it is taken from
3072M that I set for Xms/Xmx ?
Answer is No, PermSize is additional to the -Xmx value set by the user on the JVM options. But MaxPermSize allows for the JVM to be able to grow the PermSize to the amount specified. Initially when the VM is loaded, the MaxPermSize will still be the default value (32mb for -client and 64mb for -server) but will not actually take up that amount until it is needed. On the other hand, if you were to set BOTH PermSize and MaxPermSize to 256mb, you would notice that the overall heap has increased by 256mb additional to the -Xmx setting.
Heap size does not determine the amount of memory your process uses
There are a number ofseparate memory pools in the JVM, whose maximum sizes are set separately.If you monitor your java process with an OS tool like top or taskmanager, you may see the amount of memory you use exceed the total amount you have specified for –Xmx and -XX:MaxPermSize. -Xmx limits the java heap size,and -XX:MaxPermSize limits java permanent space. However java will allocate memory for other things, including a stack for each thread. It is not unusual for the total memory consumption of the VM to exceed the value of Xmx + XX:MaxPermSize.
Parse xml data using plsql
Creating XMLType Table: Creating XMLType Columns
The XMLType column can be created like any other user-defined type column:
CREATE TABLE warehouse(
warehouse_id NUMBER(4),
warehouse_spec XMLTYPE,
warehouse_name VARCHAR2(35),
location_id NUMBER(4));
Insert data in Table
INSERT INTO warehouse VALUES
( 100, XMLType(
'<Warehouse whNo="100">
<Building>Owned</Building>
</Warehouse>'), 'Tower Records', 1003);
Fetch Data from table using PL-SQL Block:
declare
xmlt varchar2(1000);
begin
SELECT
w.warehouse_spec.extract('/Warehouse/Building/text()').getStringVal() into xmlt FROM warehouse w where w.warehouse_id =100;
dbms_output.put_line('***'||xmlt);
end;
Insert data in Table(with namespace prefix)
INSERT INTO warehouse VALUES
( 103, XMLType(
'<ns2:ListOfOrder xmlns:ns2="http://siebel.com/OrderManagement/Order/Data" Language="ENU" Locale="English - United States" MessageId="" EnterpriseServerName="COXDEVINTent">
<ns2:Order>
<ns2:Account>KUCHARYK, ALEX</ns2:Account>
<ns2:AccountId>1-FLPTC</ns2:AccountId>
<ns2:AccountLoc>1-FLPTC</ns2:AccountLoc>
<ns2:ListOfOrderItem>
<ns2:OrderItem>
<ns2:ActionCode>Existing</ns2:ActionCode>
<ns2:AssetIntegrationId>1-FYCF8</ns2:AssetIntegrationId>
</ns2:OrderItem>
</ns2:ListOfOrderItem>
</ns2:Order>
</ns2:ListOfOrder>'), 'Tower Records', 1006);
Stored Proc to parse xmltype(with namespace prefix)
declare
xmlt xmltype;
doc DBMS_XMLDOM.DOMDocument;
ndoc DBMS_XMLDOM.DOMNode;
docelem DBMS_XMLDOM.DOMElement;
node DBMS_XMLDOM.DOMNode;
childnode DBMS_XMLDOM.DOMNode;
nodelist DBMS_XMLDOM.DOMNodelist;
buf VARCHAR2(2000);
begin
SELECT
w.warehouse_spec into xmlt FROM warehouse w where w.warehouse_id =103;
doc := DBMS_XMLDOM.newDOMDocument(xmlt);
ndoc := DBMS_XMLDOM.makeNode(doc);
DBMS_XMLDOM.writeToBuffer(ndoc, buf);
--------
docelem := DBMS_XMLDOM.getDocumentElement(doc);
nodelist := DBMS_XMLDOM.getElementsByTagName(docelem, 'AssetIntegrationId');
node := DBMS_XMLDOM.item(nodelist, 0);
childnode := DBMS_XMLDOM.getFirstChild(node);
-- Manipulate element
DBMS_OUTPUT.put_line(‘Value of AssetIntegrationId:'|| DBMS_XMLDOM.getNodeValue(childnode));
dbms_output.put_line('***'||xmlt.getStringVal());
end;
SOA Sync And Async Process Backend Processing
Synchronous Process Execution:
The following steps are performed:
- The client calls a request on the delivery service (this can also be a BPEL process).
- The synchronous flow starts. In this case, the first activity is a receive.
- The flow executes some activities, then encounters a checkpoint, which is abreakpoint activity (other breakpoint activities are receive, onMessage, wait, andonAlarm). Once the flow encounters this activity, the instance must be dehydrated.The assign following the checkpoint is processed by another thread in thebackground.
- The thread (the one from the client) goes back to the delivery service and waits forthe reply from the reply queue. This waiting is subject to the syncMaxWaitTime value. If this time is exceeded, then the client thread returns to the caller with a timeout exception.
- Another new background asynchronous thread picks up where the other thread left off. Itrehydrates the instance from the database, and executes the remaining activities.
- When the reply activity is executed, it puts the reply message in the reply queue.
- The reply queue now notifies any waiters that the reply message is available. If thewaiter has not timed out, it gets the message. If it has timed out, the message is notpicked up (note that the flow has completed normally).
- If the waiter has not timed out, it now has the reply message and returns to theclient with the message.
If the flow did not have a checkpoint, then step 2 processes all the activities, includingthe reply (which added the reply message to the queue). When the thread returns tothe delivery service, it waits for the reply. However, since the reply is already there, itreturns immediately and is not subject to the syncMaxWaitTime value.
In addition, the synchronous process saves itself when it is finished.
Asynchronous Process Execution:
The sequence of events involved in the delivery of invoke messages is as follows:
- The client posts the message to the delivery service.
- The delivery service saves the invocation message to the invoke_message table.The initial state of the message is 0 (undelivered).
- The delivery service schedules a dispatcher message to process the invocationmessage asynchronously.
- The dispatcher message is delivered to the dispatcher through theafterCompletion() call. Therefore, the message is not delivered if the JTAtransaction fails.
- The dispatcher sends the JMS message to the queue. Places a very short JMS message in the in-memory queue(jms/collaxa/BPELWorkerQueue) in OC4J JMS. The small JMS message
triggers the WorkerBean in the downstream step.
- This message is then picked up by aWorkerBean MDB, which requests the dispatcher for work to execute. If the number ofWorkerBean MDBs currently processing activities for the domain is sufficient, thedispatcher module may decide not to request another MDB. The decision to request anDB is based on the following:
ØThe current number of active MDBs
ØThe current number pending (that is, where a JMS message has been sent, but an
MDB has not picked up the message)
ØThe value of dspMaxThreads
- MDB fetches the invocation message from the dispatcher.
- MDB passes the invocation message to Oracle BPEL Server, which updates theinvocation message state to 1 (delivered), creates the instance, and executes theactivities in the flow until a breakpoint activity is reached.
From Thread perspective
- Caller thread T1 receives an incoming message and saves it to the internal delivery queue. Thread T1 is then released by Oracle BPEL Server and the caller can continue its own processing.
- Inside the server, a message driven bean called WorkerBean monitors the queue for invocation requests. The WorkerBean picks up the message from the delivery queue, spawns a new thread (T2), and starts a Java Transaction API (JTA) transaction (Txn1) to create and run the instance.
- Thread T2 encounters a midprocess breakpoint activity (receive) and decides to dehydrate the process instances.
- Thread T2 retrieves a database connection (C1) from the data source connection pool.
- Thread T2 saves the process instance to the dehydration database, which ends the transaction (Txn1).
- Caller thread T3 intercepts an invocation from the partner and saves the incoming message to the delivery queue (dehydration point).
- The Oracle BPEL Server WorkerBean picks up the message from the delivery queue, spawns a new thread (T4), and starts a JTA transaction (Txn2) to continue the instance.
- Thread T4 encounters the end of the process and must dehydrate the process instance.
- Thread T4 retrieves a database connection (C2) from the data source connection pool.
- Thread T4 saves the process instance.
Article 0
Change Weblogic user credential
Error while initiating BPEL Services from Console
Compile & Deploy 11g PIP processes using ant
![]() |
adf-config.xml |
Step2 : Run aiaenv.sh to set environmental variables.
2.The UpdateMetaDataDP.xml file is located under
AIA 11g Release 1 Master Support Note
Error(NoClassDefFound AbstractSubject) while invoking composite from JAVA
Creating a wlfullclient.jar for JDK 1.6 client applications
WL_HOME
/server/libChange Data Format from XSLT
Send Email Notification from AIA
Step2: Configure the SOA Suite Workflow Notification properties
Error Handling in PIP & Notification
"InvokeEHProcess_initiate_InputVariable","FaultMessage","/corecom:Fault"));]]
Handling Special character in BPEL Payload
![]() |
TestSpclChar.zip |
How to create wlfullclient.jar
Retrieve Fault Message from SOA-INFRA Database against a particular Composite
How to make your File Adapter pick only one file at a time from a location
With this read operation it picks all the files at time.
You want to configure File Adapters that it should pick one file at time from the given location with given polling interval.
Solution :
You set the "SingleThreadModel" and "MaxRaiseSize" properties for your file adapter.
Edit the adapter's jca file and add the following properties:
property name="SingleThreadModel" value="true"
property name="MaxRaiseSize" value="1"
You can set these properties also through jdeveloper, by opening composite.xml, selecting the adapter and then changing the properties through the properties panel.
Invoke SOA composite from JAVA
- fabric-common.jar
$FMW_HOME/oracle_common/modules/oracle.fabriccommon_11.1.1/fabric-common.jar - soa-infra-mgmt.jar
$FMW_HOME/oracle_common/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar - wsclient_extended.jar
$FMW_HOME/oracle_common/webservices/wsclient_extended.jar - wlfullclient.jar
$AIA_HOME//aia/inventory/Scripts/ext/jlib/wlfullclient.jar
![]() |
Invok_BPEL_Composite.java |
Configure Mail Body in AIA
instance.sendNotification(enrichedFaultMessage, genFaultMessage.getStampMessageCorrelation(), null);
![]() |
ECID.java |