Wednesday, June 29, 2011

Overview of Coherence Web 3.7

Coherence*Web is an HTTP session management module dedicated to managing session state in clustered environments. Built on top of Oracle Coherence, Coherence*Web:

1) Enables session sharing and management across different web applications, domains and heterogeneous application servers;
2) Brings Coherence data grid's data scalability, availability, reliability and performance to in-memory session management and storage;
3) Supports all the mainstream application servers such as Oracle WebLogic Server, IBM WebSphere, Tomcat etc. (Coherence Web Support Matrix);
4) Supports numerous portal containers including Oracle WebLogic Portal.
5) Allows session state to be managed in the various caching topologies available in Coherence (i.e. Replicated, Partitioned, Near Caching, Read-Through, Write-Through, Write-Behind and Refresh-Ahead Caching etc.);
6) Allows storage of session data outside of Java EE application server – freeing up application server heap space and enabling server restarts without session data loss;
7) Supports multiple advanced session models which define how the session state is physically managed, serialized and deserialized in the cluster;
8) Supports fine-grained session and session attribute scoping by way of pluggable policies

Coherence*Web is an alternative to the WebLogic Server in-memory HTTP state replication services. Consider using Coherence*Web if you are encountering any of these situations:

1) Your application works with large HTTP session state objects
2) You run into memory constraints, due to storing HTTP session object data
3) You want to offload HTTP session storage to an existing Coherence cluster
4) You want to share session state across enterprise applications and Web modules

Refer the below mwntioned links to read more about Coherence Web:

1) http://www.oracle.com/technetwork/articles/entarch/session-management-092739.html
2) http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Models
3) http://tomhofte.blogspot.com/2009/11/oracle-coherenceweb-easy-in-memory.html

Other useful documents are listed below:

1) Coherence Web Push Replication:
2) Caching HTTP Sessions with Coherence Web 3.7 Example
3) Coherence Management from Weblogic Console
4) JMX Monitoring and Running Examples
5) Customer Success

Oracle OSB Sample Examples (Getting Started with Oracle OSB)

http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/examples/samples.html
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/tutorial/tutGettingStarted.html
http://www.oracle.com/technology/sample_code/products/osb/samples/osb_examples_tutorials_0.pdf
http://www.oracle.com/technology/products/soa/service-bus/collateral/osbsamples.html
http://www.oracle.com/technetwork/articles/jumpstart-for-osb-development-page--084104.html

Guide to install Eclipse for Oracle OSB

http://blogs.oracle.com/middleware/entry/installing_eclipse_for_osb_development

How to start viewing Composite Name on the EM Console/Dashboard?

You need to set the ora:setCompositeInstanceTitle("Composite Name") in the BPEL pocess or mediator using the Assign activity to a dummy variable as under,

WSDL Caching in SOA Server

Yes all the partner WSDLs are cached in the SOA Server and by default they are cached for 24 hours. In order to change the cache time do the following,

Farm_soa_domain > Weblogic Domain > soa_domain* > Right Mouseclick > System MBean Browser > Application Defined MBeans > oracle.as.soainfra.config > Server: soa_server > SoaInfraConfig > soa-infra > Attributes

There is an Attribute "UddiCacheLifetime" defining the external WSDL cache time. By default, the value is set to 24 hours and the minimum time of 300 seconds could be set.

Accessing Custom JAVA Code in BPEL (Eg. ora:custom code)

If you would like to use some code in your BPEL processes (Eg: ora:custom implementation, Java Embedded Activity) then create a JAR file of your Java project and do the following,

1) cd to /soa/modules/oracle.soa.ext_11.1.1
2) Copy in your custom jar file
3) run ant (make sure ant is installed and available in this directory) on command prompt. This will run the build.xml file located in the above directory
4) Restart the Server

A "readme" file, is available in the above directory that provides instructions to add the custom jar to manifest of oracle.soa.ext.jar that is picked up the class loader.

Where can you find the older versions of Java?

http://www.oracle.com/technetwork/java/archive-139210.html

Error: “\Java\jre6\lib\ext\QTJava.zip was unexpected at this time.”

After installation of Weblogic Server if you get an error: “\Java\jre6\lib\ext\QTJava.zip was unexpected at this time.” This can be solved as under,

Check if QTJava.zip is set in %CLASSPATH% environment variable CLASSPATH=.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip

Remove C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip from %CLASSPATH% environment variable and restart the computer.

OSB Cluster- WSDL Endpoint changes to Managed Server Host/Port on fetch

On fetching a WSDL from a OSB Cluster (ManagedServer1 ... ManagedServerN) with a load balancer sitting in front and if the endpoint URL gets set to a particular ManagedServer (Host/Port), then you cluster is not load balanced. If the client application caches the WSDL then you are in deep trouble and is not the right behaviour. In order to make it correct, do the following:

Put the LoadBalance (IP/Port) in Weblogic Admin Console at the following location:

Home -> osb_cluster ->Summary of Environment ->Summary of Clusters -> osb_cluster -> configuration -> HTTP sub-tab

Restart the managed servers and try fetching the WSDL and the endpoint service URL should be set to LoadBalancer (IP/Port) and not any of Managed Server (IP/Port). This should be done for every OSB Cluster with a load-balancer in front

BPEL Exception (Caused By: ORABPEL-20301 Data Publisher failed)

If you are trying to publish the Sensor Data to the JMS Queue/Topic and getting any of the below mentioned excpetions in the log files as below,

********************
Caused By: ORABPEL-20301

Data Publisher failed.
The Reporting Data Publisher SensorAction_error fails.
The data publisher reported an exception.
Examine the log file for more details.

at com.collaxa.cube.engine.sensor.sa.BpelPublisher.publish(BpelPublisher.java:152)
at com.collaxa.cube.engine.sensor.registry.BpelSensorActionInfo.publish(BpelSensorActionInfo.java:148)
********************

********************
Caused By: java.lang.ClassCastException: oracle.tip.adapter.jms.JmsConnectionFactory cannot be cast to javax.jms.QueueConnectionFactory
at com.collaxa.cube.engine.sensor.sa.publisher.QueuePublisher.lookupQCF(QueuePublisher.java:106)
at com.collaxa.cube.engine.sensor.sa.publisher.QueuePublisher.publish(QueuePublisher.java:172)
at com.collaxa.cube.engine.sensor.sa.FilteredDataPublisher.publish(FilteredDataPublisher.java:119)
at com.collaxa.cube.engine.sensor.sa.BpelPublisher.publish(BpelPublisher.java:144)
at com.collaxa.cube.engine.sensor.registry.BpelSensorActionInfo.publish(BpelSensorActionInfo.java:148)
*********************

The problem is tha the Oracle JMS Adapter uses the default connection factory "oracle.tip.adapter.jms.JmsConnectionFactory" which will work if you are using AQ as the JMS but if you are using Weblogic JMS Server then this should be type casted to "javax.jms.QueueConnectionFactory". The following steps should be taken to fix the problem,

1. Under Deployments-> JMS Adapter in Weblogic Console
-> Under Configuration -> OutboundConnectionPool :
Set the ConnectionFactoryLocation = weblogic.jms.XAConnectionFactory

2. Add the property in the sensorAction.xml in BPEL project
<property name = “JMSConnectionFactory”>weblogic.jms.XAConnectionFactory</property>

Jdeveloper could not make connection with Application Server

If you are unable to make the connection with the Weblogic Application Server then do the following:
  • Uncheck the "Use HTTP Proxy Server" checkbox, if checked under Tools->Preferences->Web Browser and proxy.
  • Oracle BPEL XPath: How to check if a value exists in a list of values?

    Use the following XPath function available within the BPEL XPath function library:

    xp20:matches(string(bpws:getVariableData('inputVariable','payload','/ns1:RuntimeFaultMessage/ns1:code')),'^(ABCD)$') = true()

    Things to remember:

  • Use string (element data) since the bpws:getVariableData returns an Object and not a string and should be converted to string using th string() function.


  • The above function matches if the variable data has the value equals A or B or C or D using the '^(ABCD)$' and this expression can be replaced with other regular expressions for similar comparisons


  • Use true() and not true for comparing the condition
  • Skipping Activities in BPEL Processes

    Using the skip condition available in the activities configuration, you have flexibility to skip activities based on a condition as under,
  • Create a process level variable in BPEL process as under,
  • <variables>
    <variable name="skip" type="xsd:int"/>
    </variables>
  • Update the variable "skip" equals 1 to skip the activities

  • Update the activity configuration by using the "Skip Condition" tab and put the value as skip=1

  • The benefit of using this conditional skipping is designing managable and readable BPEL processes.

    Setting Configurable Properties in Oracle SOA (BPEL) 11g

    In Oracle BPEL 11g, the configurable properties that can be updated at runtime can be accessed using the following:

    • Set the property in the composite.xml:
    <component name="SampleBPELProcess">
    <implementation.bpel src="SampleBPELProcess.bpel"/>
    <property name="bpel.preference.codeSummary">Testing</property>
    </component>

    • Accessing the value in the BPEL:

    ora:getPreference('codeSummary')

    • Dynamically updating the value of the property in EM Console:

    Farm_soa_domain > Weblogic Domain > soa_domain* > Right Mouseclick > System MBean Browser > Application Defined MBeans > oracle.soa.config > Server : soa_server* > SCAComposite > project* > SCAComposite.SCAComponent > bpel_process*> attributes > properties

    *Environment dependent

    Search This Blog