Sunday, 6 August 2017

Oracle JCA retry adapter endpoint Properties:

Below are the Oracle JCA retry Adapter endpoint properties.
1. jca.retry.count
2. jca.retry.interval
3. jca.retry.backoff
4. jca.retry. MaxInterval

      1.    jca.retry.count :
     This property specifies count of no. of times adapter should be called if adapter invocation is failed each time it is invoked.

       2.    jca.retry.interval :
This property specifies the time interval between adapter invocations.

       3.    jca.retry.backoff :
      backoff increases the delay among retry intervals in a Geometric progression.

       4.    jca.retry. MaxInterval :
      maxInterval controls the max value of retry interval (if backoff > 1). Means if you wish to make sure that retry interval should not increase to huge value when you are using backoff property then maxInterval property is the property which will help you do this

Examples:
Ex 1: Using count and interval properties.
If I have defined these two parameters (count and interval) in my composite.xml for the file adapter reference.

<property name="jca.retry.count" type="xs:int" many="false" override="may">3</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>

Values of properties are.
Count= 3
Interval= 1
Once instance is created and if adapter invocation fails then it will retry 3 times on a regular interval of 1 second. So in all we will have 4 adapter invocations.

Ex 2: Using count, interval and backoff properties.
If composite.xml file is as below.
<property name="jca.retry.count" type="xs:int" many="false" override="may">3</property>
<property name="jca.retry.interval" type="xs:int" many="false" override="may">1</property>

<property name="jca.retry.backoff" type="xs:int" many="false" override="may">2</property>

Values of properties above are.
Count= 7
 Interval = 1
Backoff = 2

The first retry will start at an interval of 1 second
The second retry will start at an interval of 2 second and
The third retry will start at an interval of 4 second.
The fourth retry will start at an interval of 8 second.
The fifth retry will start at an interval of 16 second.
The sixth retry will start at an interval of 32 second.
The seventh retry will start at an interval of 64 second.
So total 7 retries will be made.

Ex 3 : Using count, interval, backoff and MaxInterval properties.
If composite.xml file is as below.
jca.retry.count=7
jca.retry.interval=1
jca.retry.backoff=2
jca.retry.maxInterval=30

The first retry will start at an interval of 1 second
The second retry will start at an interval of 2 second and
The third retry will start at an interval of 4 second.
The fourth retry will start at an interval of 8 second.
The fifth retry will start at an interval of 16 second.
The sixth retry should start at an interval of 32 second. But it will not since we have defined max retry interval can be 30 and it cannot exceed above 30.


Tuesday, 21 February 2017

Unable to find .net framework data provider in WFR Designer

Getting error Unable to find requested .net framework data provider in WFR Designer



When selecting use database check box under setting in designer getting error "Unable to find requested .net framework data provider in WFR Designer".




Resolution:

            First you should check if .net framework is installed or not.
Even if it is installed, you may also get this error because somehow the "machine.config file" for .net was not updated properly. So you should update it as below.
1. Goto "C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG"
2. Open "machine.config" file present under this folder and make sure you have required rights to edit this file.
3. Find "DbProviderFactories" tag which is under "system.data" tag.
4. Add below line under "DbProviderFactories" tag and but make sure not to delete existing data which is already present.

<system.data>
    <DbProviderFactories>
            <!-- You have to add below line in existing <DbProviderFactories> tag -->
            <add name="EF Oracle Data Provider" invariant="EFOracleProvider" description="EF Provider for Oracle testing"                type="EFOracleProvider.EFOracleProviderFactory, EFOracleProvider, Version=1.0.0.0, Culture=neutral,                PublicKeyToken=def642f226e0e59b"/>    
     </DbProviderFactories>
  </system.data>

5. Save changes.
6. Reopen WFR designer.