Event Delivery Network (EDN) is one of the most important feature in Oracle SOA Suite 11g which is used to define the Event Definition Language. Event Definition Language contains Events which are defined using XML language.
Here, I will implement file adapter to get information about employee details using a file, the data from this file is transformed and routed to Database Adatper.Two Mediators are involved here,one is Event Publishers and another one event subscriber.The File Adapter reads the file and sent the data to the event publishers, the subscriber receives the data from the event publishers and sent to the Database Adapter.Implementation of EDN is as follows:
Here we have 5 steps:
- Create Event Definition File
- Create File Read using File Adapter
- Event publisher using Mediator
- Database Adapter to store the data into the Database
- Event Subscriber
1 Create Event Definition FIle :
In JDeveloper Click on the Event icon
Create Event Definition File dialog box appear
Enter the file name as EventDeliveryNetwork and click on Add an event plus Icon
Click On Magnifying Glass Icon and select the XSD file which is the event and give the name as Event1
Click OK
2. Create File Read using File Adapter
3. Event publisher using Mediator
Drag Mediator to Components and Create connection to the File Adapter
Double Click on the Mediator click on the transformation icon
Give mapping source to target.
Right Click and Click on Edit Published Events
Right Click on Edit Published Events.
Click on Plus Icon
Select the Event by using the Magnifying Glass
Click on OK.
4. Adding DB Adapter to External Reference
5. Event Subscriber
Add one more Mediator create connection to the DB Adapter
Double Click on the Mediator Click on the Transformation ICON
Give Mapping Source to Target
Right Click on the Mediator click on Edit Subscribed Events
Click on Plus Icon
Dialog window appear click Magnifying glass and select the Event and click on ok
Select the Run as publisher as yes and click on ok
Deploy the project into application server
The Final Result is text file reads from particular location, which is publishers event and the subscriber is Database Adapter the data is stored into table emp table.
No comments:
Post a Comment