Sunteți pe pagina 1din 11

MDS

Definition
MDSis used as a repository for managing and reusing
shared resources like XSD, WSDL, XSL files.
MDS should be implemented from day 1 of development
otherwise developers will run into XSD mismatch, also
during production it will be very tough to keep the XSD
same.
The concept is very simple, rather than each project picking
the xsd (any other file) from there project's 'xsd' folder, pick
it from the common/shared folder.
Oracle SOA suite 11G provides Central MDS and Local MDS.
Central MDS is present inside the SOA server
Local MDS is a folder inside the JDeveloper

Filebased Vs DB based
File based MDS is used during
design/deploy time where as DB
based MDS is used at run-time by the
SOA infra. A configuration file named
adf-config.xml that is part of every
SOA project manages this partition
mapping to be used by JDeveloper
during design/deploy time.

ADF_Config.xml
Please find attached the latest FMW Code. In case you need to raise any package for deployment,
Please change the \SCA-INF\classes\META-INF\adf-config.xml file from local file system to db.

<metadata-store-usage id="mstore-usage_4">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property value="C:\" name="metadata-path"/>
<property value="mds_file" name="partition-name"/>
</metadata-store>
</metadata-store-usage>

To

<metadata-store-usage id="mstore-usage_4">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property value="FIN_MDS" name="jdbc-userid"/>
<property value="@db.password@" name="jdbc-password"/>
<property value="jdbc:oracle:thin:@//devfmw-scan.am.mot-solutions.com:1521/dvfm072"
name="jdbc-url"/>
<property value="soa-infra" name="partition-name"/>
</metadata-store>
</metadata-store-usage>

Error Handling in SOA


Errors are broadly classified into two types:
Recoverable Errors- Recoverable errors are the errors that client programs can
recover from to take appropriate alternate execution paths. Such errors are the result
of failure to meet a particular business rule.
Non-Recoverable errors- These are the errors that client programs cannot recover
from. This kind of errors are result of some unexpected errors during runtime such as
programming errors such null pointers, resources not available etc.
Examples: Business errors are what referred to as recoverable errors.
Business error scenarios Detailed description of condition that flags the business
operation as invalid.
Error text Provides a brief description of the business error that service consumers
will receive for a business error.
Error code Code that can be looked up for additional info about the error.
Suggestions Feedback to the service consumer such as examples of valid inputs, or
displaying specific information related to the error etc.
Service area- Identifies a service area that receives all notifications related to
service system errors.

Faultpolicy.xml &
Faultbinding.xml
<property
name="oracle.composite.faultPolicyFile">
oramds:/apps/faultpolicyfiles/faultpolicies.xml
</property>
<property
name="oracle.composite.faultBindingFile">
oramds:/apps/faultpolicyfiles/faultbindings.xml
</property>

FaultPolicy.xml
<faultPolicy version="0.0.1"id="FusionMidFaults"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Conditions>
<faultName
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
name="bpelx:remoteFault>
<condition>
<test>$fault.code="3220"</test>
<action ref="ora-retry"/>
</condition>
</faultName>
...
</Conditions>

<Actions>
<Actionid="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>5</retryInterval>
<exponentialBackoff/>
<retryFailureAction ref="ora-terminate"/>
</retry>
</Action>
<Actionid="ora-terminate">
<abort/>
</Action>
</Actions>
</faultPolicy>

FAULTBINDING.xml

Faultbinding.xml policy file will bind (or map) policies defined in thefault-policies.xmlfile to levels within the composite. These levels
include:
Composite Application, Component, Reference, BPEL Process, Mediator
Composite Application Binding
When binding to a composite application, use the<composite>element with an attribute calledfaultPolicy. The value of
thefaultPolicyattribute must match a policy id defined in thefault-policies.xml:
<composite faultPolicy="FusionMidFaults"/>
Reference Binding
When binding to a reference, use the<reference>element with an attribute calledfaultPolicy. The value of thefaultPolicyattribute must
match a policy id defined in thefault-policies.xml. You will also need to specify a<name>or<portType>element:
<reference faultPolicy="FusionMidFaults">
<name>creditRatingService</name>
<portType xmlns:credit="http://services.otn.com">credit:CreditRatingService</portType>
</reference>
<reference faultPolicy="FusionMidFaults">
<name>CreditApprovalService</name>
</reference>
BPEL Process Binding
When binding to a BPEL Process, use the<component>element with an attribute calledfaultPolicy. The value of thefaultPolicyattribute
must match a policy id defined in thefault-policies.xml. You will also need to specify a<name>element containing the name of the BPEL
process:
<component faultPolicy="FusionMidFaults">
<name>HelloWorld</name>
<name>ShippingComponent</name>
</component>
Mediator Binding
When binding to a mediator, use the<component>element with an attribute calledfaultPolicy. The value of thefaultPolicyattribute must
match a policy id defined in thefault-policies.xml. You will also need to specify a<name>element containing the name of the meditor:
<component faultPolicy="FusionMidFaults">
<name>RouteToShippingMediator</name>
</component>

System Defined Exception


bindingFault
A bindingFault is thrown inside an activity if the preparation of the invocation fails.
For example, the WSDL of the process fails to load. A bindingFault is not retryable.
This type of fault usually must be fixed by human intervention.
remoteFault
A remoteFault is also thrown inside an activity. It is thrown because the invocation
fails. For example, a SOAP fault is returned by the remote service.
replayFault
A replayFault replays the activity inside a scope. At any point inside a scope, this
fault is migrated up to the scope. The server then re-executes the scope from the
beginning.

runtimeFault
Runtime faultsare the result of problems within the running of the BPEL process
service component or web service (for example, data cannot be copied properly
because the variable name is incorrect). These faults are not user-defined, and are
thrown by the system

S-ar putea să vă placă și