Showing posts with label SOA11g. Show all posts
Showing posts with label SOA11g. Show all posts

Tuesday, 13 November 2012

DB Adapter Singleton behaviour in High Availability Environment

There was a problem which one can face in high availability environment (clustered) . 

We had one Integration between Oracle Ebiz and third party system in which we get data from Oracle Ebiz and send them to third party application. This integration was running fine till the time our server environment upgraded for high availability means clustered ones...
We had two clustered which were configured to be synchronous to idealised HA situation. But this causes one design issue in that Integration. 

The issue starts coming in our DB Adapter that now the DB Adapter starting polling Staging table(OEBS)  in parallel with the initialised interval. Cluster1 and Cluster2 starts initiating DB Adapter instances in parallel and if we increase the clusters form 2 to 3. The same way three instances of pooling components started. Which leads to a situation in which if we increase the clusters in future from 2 to 50 then in parallel 50 instances of pooling component will be created in parallel and will hit the third party application in parallel. This could be a problem for a target system if it doesn't supports parallel processing.

The solution to this problem was that we need a concept of singleton pattern in our pooling component / DB Adapter.

There's a property of Inbound endpoint lifecycle support within Adapters called Singleton.
To enable this feature for high availability environment for a given inbound adapter endpoint, one must add the singleton JCA service binding property in the composite.xml within the <binding.jca> element and set it to a value of true as shows.


Singleton Property in composite.xml

    <binding.jca config="bindin_file.jca">
        <property name="singleton">true</property>
    </binding.jca> 
 
This was our finding to the problem we faced in clustered environment.

I hope this helps others as well.

 
 

Monday, 14 May 2012

Root cause of ServletException java.lang.AssertionError: CurrencyKey not preserved


After finishing up with the installation of AIA on SOA 11g when I access AIA home I was disappointed to see empty tabs of AIA including Project Life Cycle, CAVA, ect. When I check server log file I found following big error log.. which says....

Referer: http://localhost:7001/AIA/faces/oracle/apps/aia/home/ui/page/Home.jspx?_afrWindowMode=0&_afrLoop=8046694499161&_adf.ctrl-state=1b2migk5rh_9
Cookie: JSESSIONID=82k3PwvbRfLGCv3hGL5rK2sHQPJlzsWyBSmylvLLRptRhcmjS1T2!273321565; ADMINCONSOLESESSION=LMKjPwnCf10njbLYhNKwbPFGHX7cW2L94zgT7TC1jyYhJrJpyMyM!273321565
Content-Type: application/x-www-form-urlencoded
Content-Length: 263

]] Root cause of ServletException.
java.lang.AssertionError: CurrencyKey not preserved
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:540)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:769)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1140)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:348)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:313)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeTopFacet(PanelStretchLayoutRenderer.java:781)

Solution
For this we need to update your Environment file which is available at following location
  
  <MiddlwareHome>/user_projects/domains/<Domainname>/bin/setSOADomainEnv.cmd  
                                                               OR
<MiddlwareHome>/user_projects/domains/<Domainname>/bin/setSOADomainEnv.sh 



set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -da:org.apache.myfaces.trinidad.component.UIXCollection
 
and restart the server... 
Now tabs will be successfully visible with no error