Archive

Author Archive

OSB11G Dynamic Routing Sample

March 24, 2014 Leave a comment

Dynamic Routing in OSB cab be used when the BusinessService endpoint required to be determine at runtime in message flow.

In this example , will see how BusinessService end point determined dynamically during runtime based on value in consumer request

Here the consumer will pass the below as request xml. On this based on the Country Code Value, BusinessService endpoint will be determined at runtime.

<cus:getCustomerStatus xmlns:cus="http://com/wordpress/rathinasaba/ws" xmlns:java="java:com.wordpress.rathinasaba.view">
         <cus:customer>
            <java:Name>
               <java:FirstName>Rathina</java:FirstName>
               <java:LastName>Sabapathy</java:LastName>
            </java:Name>
            <java:Occupation>Software Engineer</java:Occupation>
            <java:Address>
               <java:FlatNumber>6</java:FlatNumber>
               <java:Street>Sutherland Road</java:Street>
               <java:State>NSW</java:State>
               <java:Country>AU</java:Country>
            </java:Address>
         </cus:customer>
</cus:getCustomerStatus>



My Project Structure

ProjectStructure

ProjectStructure





Complete Service Overview
ProxyServiceOverview

ProxyServiceOverview





BusinessService :
I have created a Customer WebService ear. On deploying this component into Weblogic Server10.3.6 ,it will generate 3 WSDL files.
I have created 3 business service from Customer Service WSDLs.

Download this Customer WebService Component from here



ProxyService overview
1. In the first Assign activity based on the Country value, the Business Service will be decided and assigning the result to variable “serviceName”

Expression

if($body/cus:getCustomerStatus/cus:customer/java:Address/java:Country eq "AU")
then
    "OSB11G_DynamicRouting/bs/BS_AU_CustomerService"
else if($body/cus:getCustomerStatus/cus:customer/java:Address/java:Country eq "FJ")
then
    "OSB11G_DynamicRouting/bs/BS_FIJI_CustomerService"
else
	"OSB11G_DynamicRouting/bs/BS_NZ_CustomerService"



The namespaces “cus” and “java” used in XPath has been declared as shown in screeshot below.

DecisionPoint4BS

DecisionPoint4BS





2. In the second assign activity , am forming the below route element and assigning to a variable “dynaRoute”
Expression

<ctx:route>
	<ctx:service isProxy="false">{data($serviceName)}</ctx:service>
	<ctx:operation>{data("getCustomerStatus")}</ctx:operation>
</ctx:route>



RouteElementFormation

RouteElementFormation



3. Created Route node. Inside Route node , created Dynamic Routing node and entered $dynaRoute variable assigned in Proxy Service as shown below



DynamicRouting

DynamicRouting





Testing
Testing

Testing

Advertisements
Categories: OSB Tags: ,

OSB11G calling RESTful Web Service Example

March 3, 2014 Leave a comment

In this post will see how the RESTful Web Service can be invoked from OSB11G Proxy Service with dynamic relative-URI
This RESTfull service respond with JSON message format. Used one JavaCallout to convert the JSON message into XML

1.RESTful Web Service
Here retrieving employee details by passing name is exposed as RESTful web service by deploying it on Tomcat server.
Below is the code used for building this simple RESTful service



Employee.java

package com.wordpress.rathinasaba.RESTws;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlRootElement;


@XmlRootElement(name="employee")
public class Employee implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
    private Long id;
    private String name;
    private String dept;
 
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDept() {
        return dept;
    }
    public void setDept(String dept) {
        this.dept = dept;
    }

}



EmployeeResource

package com.wordpress.rathinasaba.RESTws;

import java.util.ArrayList;
import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

@Path("/services/emp")
public class EmployeeResource{

	private Employee emp1, emp2,emp3,emp4;

	public EmployeeResource() {
		emp1 = new Employee();
		emp1.setId(Long.valueOf(100));
		emp1.setName("Rathina");
		emp1.setDept("ResearchDevelopment");

		emp2 = new Employee();
		emp2.setId(Long.valueOf(101));
		emp2.setName("Sabapathy");
		emp2.setDept("InnovationQuality");
		
		emp3 = new Employee();
		emp3.setId(Long.valueOf(102));
		emp3.setName("Ganesh");
		emp3.setDept("Development");

		emp4 = new Employee();
		emp4.setId(Long.valueOf(103));
		emp4.setName("Praveen");
		emp4.setDept("Testing");
	}

		
	@GET
	@Path("/{name}")
	@Produces("application/json")
	public List<Employee> getEmployeeByName(@PathParam("name") String name){
		List<Employee> coll=new ArrayList<Employee>();
		List<Employee> all=getEmpList();
		if("all".equalsIgnoreCase(name)){
			return all;
		}else{
			for(Employee empObj:all){
				if(empObj.getName().equalsIgnoreCase(name.trim())){
					coll.add(empObj);
				}
			}
			return coll;
		}
	}
	
	private List<Employee> getEmpList(){
		List<Employee> empList = new ArrayList<Employee>();
		empList.add(emp1);
		empList.add(emp2);
		empList.add(emp3);
		empList.add(emp4);
		return empList;
	}

}



web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	id="WebApp_ID" version="2.5">
	<display-name>EmployeeREST</display-name>
	<servlet>
		<servlet-name>RESTWS</servlet-name>
		<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
		<init-param>
		     <param-name>com.sun.jersey.config.property.packages</param-name>
		     <param-value>com.wordpress.rathinasaba.RESTws</param-value>
		</init-param>
	</servlet>
	<servlet-mapping>
		<servlet-name>RESTWS</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
	</welcome-file-list>
</web-app>



OSB11G with RESTfull service
1. My Project structure will look like the shown below.

ProjectStructure

ProjectStructure





2. Complete flow will look like the below screenshot

CompleteOSB11G_RESTful

CompleteOSB11G_RESTful





2. Created a Proxy Service with Message Type as “Any XML Service” along with the below settings

PS_Employee_REST_config

PS_Employee_REST_config





3. Created a Business Service with the deployed RESTful Web Service URI. Below shown is the Business Service configuration
3.1. Selected the Message Type as “Any XML Service”
3.2. Request Message Type and Response Message Type as “None” and “Text” correspondingly
3.3. HTTP Request Method as “GET”



Below is the Business Service “BS_Employee_REST.biz” configuration

BS_Employee_REST_Config

BS_Employee_REST_Config





4. The consumer request will be look like the below given XML. In the request pipeline, getting the value of “employee/name” from input xml and assigning it on variable “name”

<employee>
	<name>rathina</name>
</employee>
AssignVariable_Name

AssignVariable_Name



5. Next in Insert activity , forming the transport header value and assigning it on inbound variable which is passed as input of Business Service as shown below.

dynamicRelativeURI

dynamicRelativeURI




6. Added Routing inside Route.
6.1. In the first insert activity forming complete URI for RESTful service by appending relative-URI along with Business Service URI and assigning to transport header outbound variable of Business Service as shown below

Business Service Endpoint URI :http://localhost:8090/EmployeeREST/services/emp
Relative URI received in the inbound variable of Business Service: {$name}

Form_REST_URI

Form_REST_URI




6.2. In the next insert activity http-method is set and assigning to transport header outbound variable as shown

SetHttpMethod

SetHttpMethod





7. In the response processing pipeline, the JSON response received from RESTful Web Service is passed to Java utility to convert into XML and using the replace activity this response XML is set into response body varibale as an output of this OSB Proxy service.

ResponseJavaCallout

ResponseJavaCallout


AssignResponseToBody

AssignResponseToBody





8. Below is the Java class used to convert the JSON message into XML

package com.wordpress.rathinasaba.utility;

import net.sf.json.JSON;
import net.sf.json.JSONSerializer;
import net.sf.json.xml.XMLSerializer;

public class JsonXmlManager {
	
	public static String jsonToXml(String jsonResponse, String rootName) {
		String xml = null;
		XMLSerializer serializer = new XMLSerializer();
		JSON json = JSONSerializer.toJSON(jsonResponse);
		serializer.setRootName(rootName);
		serializer.setTypeHintsEnabled(false);
		xml = serializer.write(json);
		System.out.println(xml);
		return xml;
	}
	
	public static void main(String[] args) {
		String json="{\"employee\":[{\"dept\":\"ResearchDevelopment\",\"id\":\"100\",\"name\":\"Rathina\"}]}";
		
		System.out.println("JSON to XML Response :"+jsonToXml(json, "root"));
		
	}
	
}



8.1. Below are the supporting jars should be placed in the Server classpath
Jar location in Server : {FMW_HOME}/user_projects\domains\osb_domain\lib
List of jars:
a. commons-beanutils-1.7.0.jar
b. commons-lang-2.6.jar
c. commons-collections-3.2.jar
d. commons-logging-1.1.1.jar
e. ezmorph-1.0.6.jar
f. json-lib-2.4-jdk15.jar
g. xom-1.2.10.jar

9. Test OSB11G_RESTfulService

Testing

Testing


Download Json to xml converter supporting jars from here

Download the JSONtoXMLConverter jar from here

Download the RESTful Web Service source from here

Download OSB11_RESTfulService source from here

Categories: OSB Tags: ,

OSB11G Java Callout Example

February 15, 2014 Leave a comment

In this example , will see how the JavaCallout activity can be used in OSB11G.



* This Java Callout activity is used to invoke java custom code.
* This is used when the OSB predefined functions is not sufficient to complete the requirement.
* This Java code must be packages as jar
* The method written for java callout must be static method. Then only the method will be visible in OSB Proxy Service for selection.

Here the requirement is , the partner system will recognize request passed from consumer, if the request passed is Base64 Encoded.

I have written one simple Java class to encode the content passed to Base64 and packaged it as Base64Encoder.jar
Placed this Base64Encoder jar inside OSB Project.

My OSB project structure is look like the below

ProjectStructure

ProjectStructure





1. Created a sample partner webservice WSDL just to accept the encoded request value and give back response as “Success”.
Attached the sample partner service AmazonWSDummy.war used to create AmazonWSDummy.WSDL

2. Created proxy service PS_SendMessage.proxy with AmazonWSDummy.WSDL.
And added a log activity to print consumer input.

ProxyServiceWLog

ProxyServiceWLog

3. Added Java Callout activity to encode the consumer message and pass it to partner service.
3.1. Select the Base64Encoder.jar by browsing to the location resources/jar.
Then Click Ok to select method.
3.2. Select decode method. Then Click OK.
3.3. The consumer request is passed to this Base64Encoder for encoding and the response is stored in encodedValue variable.

JavaCallout_SelectJar

JavaCallout_SelectJar


JavaCallout_SelectMethod

JavaCallout_SelectMethod


JavaCallout_Complete

JavaCallout_Complete





3.4. Java code is written using Apache commons-codec-1.9.jar to encode and decode the content.
This supporting jar should be in server classpath to execute the custom java encoding or decoding. This jar commons-codec-1.9.jar is placed in OSB server domain lib location

			${MIDDLEWARE_HOME}/user_projects/domains/osb_domain/lib
		 



Java Code

		 package com.wordpress.rathinasaba.encoder;

import java.io.UnsupportedEncodingException;

import org.apache.commons.codec.binary.Base64;

public class Base64Encoder {
	
	public static void main(String[] args) {
		String encoded=testEncode();
		testDecode(encoded);
	}

	public static String encode(String xmlString) throws UnsupportedEncodingException {
		byte[] encodedBytes = Base64.encodeBase64(xmlString.getBytes("UTF8"));
		return new String(encodedBytes);
	}
	
	public static String decode(String xmlString) throws UnsupportedEncodingException {
		byte[] decodedBytes = Base64.decodeBase64(xmlString);
		return new String(decodedBytes);
	}
	
	private static String testEncode(){
		String xmlStr="<root>TestEncoding</root>";
		String encodedResponse=null;
		try {
			encodedResponse=encode(xmlStr);
			System.out.println("Encoded content:"+encodedResponse);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return encodedResponse;
	}
	
	private static void testDecode(String xmlStr){
		try {
			String decodedResponse=decode(xmlStr);
			System.out.println("Decoded content:"+decodedResponse);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}
}

		 



5. Added Replace activity to replace value need to be passed to partner system with encoded content as shown.
And Log action is added to verify the content passing to partner is correctly encoded.

ReplaceWithEncodedContent

ReplaceWithEncodedContent

6. Business Service BS_SendMessage.biz has been created with the partner WSDL AmazonWSDummy.wsdl
This Business Services is used in Routing activity to send the encoded message to partner system from Proxy Service.

RoutingToPartner

RoutingToPartner



7. Download this OSB11G Java Callout sample : OSB11G_JavaCallout.zip

Categories: OSB Tags: ,

OSB11G – Sample With Assign, Replace, Insert, ServiceCallOut, Log and XQuery

February 9, 2014 Leave a comment

In this example, I have shown how the OSB activities (Assign, Replace, Insert, ServiceCallout and Log) activities and XQuery transformation can be used to accomplish the sample requirement.

This is a WSDL based service. Two WSDL has been used.
1. Student.wsdl (ProxyService)
2. Customer.wsdl (BusinessService)

Downnload this EAR files and deploy it in weblogic service to get the “Student.wsdl” and “Customer.wsdl”
CustomerService-1.0.0.ear
StudentService-1.0.0.ear

Here the requirement considered as student is givinng his information using Student Sertvice and the informations has been inserted as Customer Details in an Organisation and returning the success massage after sucessfull insertion.

And this example shows how the above mentioned OSB activities used across flow to achieve the requirement.
Complete Flow would look like the below shown diagram.

CompleteFlow

CompleteFlow

Below is the Project Structure created for this sample.

ProjectStructure

ProjectStructure

1. Assign:
Assign the soap body received from consumer into a variable.

Assign

Assign

2. Log:
This activity will log the variable content to server log based on the LOG LEVEL set in server.
Defaultly the INFO level will be enabled in server.
The logs will be writtem to the following server location.
For OSB the log location : ${MW_HOME}/user_projects/domains/osb_domain/servers/osb_server1/logs/osb_server1.log

LogActivity

LogActivity

3. ServiceCallout:
OSB makes call to a Proxy or Business service to construct the message content using the message value received from ServiceCallout.
Here the activity has been used to retrieve the address by calling another proxy service.
Just passing the body variable and getting the response in address variable.

ServiceCallout

ServiceCallout

4. This OSB Proxy stub will respond back with address element for any request.

OSBProxyStub

OSBProxyStub

For any input “XPath” , replace response “body” with the below address element from Stub.

<sch:address>
            <sch:number>6</sch:number>
            <sch:street>Sutherland road</sch:street>
            <sch:city>Chatswood</sch:city>
            <sch:state>NSW</sch:state>
            <sch:zip>2067</sch:zip>
            <sch:country>Australia</sch:country>
</sch:address>

5. Insert:
This activity is used to insert this “address” element received as result of “ServiceCallout” activity into the request received from consumer.

Insert

Insert

6. Replace:
This is used to transform the enriched message of Student to Customer service and assign to request “body”.
Here the Xquery is used to transform the Student to Customer.
The log activity below is to verify the transformed Student request as Customer

Replace

Replace

XQuery Source

(:: pragma bea:global-element-parameter parameter="$processStudentRequest1" element="ns1:processStudentRequest" location="../xsd/Student.xsd" ::)
(:: pragma bea:global-element-return element="ns0:insertCustomerRequest" location="../xsd/Customer.xsd" ::)

declare namespace ns1 = "http://com.wordpress.student/Student/schema";
declare namespace ns0 = "http://com.wordpress.customer/Customer/schema";
declare namespace xf = "http://tempuri.org/XQuery_SB/resources/trasformations/XQ_Student_Customer_Request/";

declare function xf:XQ_Student_Customer_Request($processStudentRequest1 as element(ns1:processStudentRequest))
    as element(ns0:insertCustomerRequest) {
        <ns0:insertCustomerRequest>
        	<ns0:firstname>{ data($processStudentRequest1/ns1:student[1]/ns1:studentFirstName) }</ns0:firstname>
            <ns0:lastname>{ data($processStudentRequest1/ns1:student[1]/ns1:studentLastName) }</ns0:lastname>
            {
                for $address in $processStudentRequest1/ns1:student[1]/ns1:address
                return
                    <ns0:address>
                        <ns0:number>{ data($address/ns1:number) }</ns0:number>
                        <ns0:street>{ data($address/ns1:street) }</ns0:street>
                        <ns0:city>{ data($address/ns1:city) }</ns0:city>
                        <ns0:state>{ data($address/ns1:state) }</ns0:state>
                        <ns0:zip>{ data($address/ns1:zip) }</ns0:zip>
                        <ns0:country>{ data($address/ns1:country) }</ns0:country>
                    </ns0:address>
            }
            <ns0:age>{ data($processStudentRequest1/ns1:student[1]/ns1:age) }</ns0:age>
            <ns0:gender>{ data($processStudentRequest1/ns1:student[1]/ns1:gender) }</ns0:gender>
            <ns0:email>{ data($processStudentRequest1/ns1:student[1]/ns1:email) }</ns0:email>
            <ns0:phone>{ data($processStudentRequest1/ns1:student[1]/ns1:phone) }</ns0:phone>
        </ns0:insertCustomerRequest>
};

declare variable $processStudentRequest1 as element(ns1:processStudentRequest) external;

xf:XQ_Student_Customer_Request($processStudentRequest1)

7. Routing:
This Routing node is processing the request and response communication with another service.
As shown below the routing communicate with Customer service for inserting the student information.

Routing

Routing

BusinessService:

BusinessService

BusinessService

Download this OSB sample from here XQuery_SB.zip

Categories: OSB Tags:

OSB11G_SayHello Sample ( WSDL Based )

February 8, 2014 Leave a comment

This is to show how to create a simple OSB WSDL based service.

1. Created OSB Configuration Project “OSBConfigurationProject” and create OSB project as OSB11G_SayHello

OSBProjectCreation

OSBProjectCreation

2. Placed “SayHello.wsdl” inside the folder created with name “wsdl”.
WSDL URL: http://localhost:7001/SayHello/SayHello?WSDL

3. Created Proxy Service with the name PS_SayHello.proxy as shown

OSBProxyService

OSBProxyService

ProxyService

ProxyService

4. Open the proxy service .
4.1.On General Tab , Select “WSDL Web Service” in “Service Type”, Select “SayHello.wsdl”‘s port or binding as shown.

ProxyServiceWSDL

ProxyServiceWSDL

ProxyServiceGenaralTab

ProxyServiceGenaralTab

4.2. Go to “Transport” tab, Based on the service you are going to expose , select the “protocol”
Then based on preference change the “Endpoint URI” or leave it as it is.

ProxyServiceTransport

ProxyServiceTransport

4.3. Go to “Message Flow” tab. Right Click on “PS_SayHello” The select “Insert Into” -> “Pipiline Pair”

PSMessageFlow

PSMessageFlow

4.3 It will look like as shown below. For any activity , the “Properties” tab will appear to provide and update information about the activities.

Pipeline

Pipeline

4.4. Now use OSB activities to achieve requirement
In this we are going to pass aguments received from consumer to Business service to get the work done.
Now this SayHello service will accept string , then “Hello” will be appended before the String passed. Else “Hello” there will be replied.

5.1. Add a “Stage” on right click of “Request Pipeline” , Then select stage to rename with any name.

5.2. Added “Log” activities to log the input received in logs.

Select Log activity and selected the body variable in “Expression” field to verify what is coming as part of request.

Enter some identification String to check it from log.
Example: “************* ST_SayHello_Request *****************”
Select “Severity” for level of logging as shown

LogActivity

LogActivity

5.3. Added a assign activity just to get the name coming in request and assigning it on “requestName” variable.
Then logging that “requestName” variable just to verify from the log.

Assign1

Assign1



6. Now the request body is going to be passed to Business Service “BS_SayHello”.
Right Click Pipeline Pair “PL_SayHelloService” to add “Route” node to pass the request body to Business Service.
Right Click “RN_SayHello” to add “Routing” node to pass the request and get the response back in body variable.



6.1. Select “OSB11g_SayHello” project to create “BS_SayHello” business Service.
Then Select “SayHello.wsdl” which is going to act as external business Service.

BusinessService

BusinessService



6.2. Right Click “Routing” node to add “BS_SayHello” business servie for connecting Proxy and Business service.

ConnectBS

ConnectBS



6.3 Create a Stage in “Response Pipeline” side. Base on the requestment , the transformation of business service response will be done in this.
Here added a log activity to check the response body received from business service.

ResponsePLWithLog

ResponsePLWithLog

7.1. Create the OSB Domain, Deploy the “OSB11G_SayHello” OSB Project into server.
Select the Proxy Service and select “Run As” the “Run On Server”, the OSB Test console will open to test this service.

Enter the “name” and Click on “Execute” to trigger the test.

TestConsole

TestConsole

Categories: OSB, SOA Tags:

EJB3 Sample application in Weblogic 10.3

February 19, 2013 2 comments

In this post will see how to create and test a EJB3 SayHello application.
Here I have created a simple stateless session bean and packaged it as EAR using ANT script.

Jars required :
1. javaee-api-5.0-2.jar
2. wlfullclient.jar

EAR Structure :

ApplicationStructure

ApplicationStructure


 

SayHello Sample Structure

SayHelloEclipseStructure

SayHelloEclipseStructure


 

SayHello.java remote interface

package com.wordpress.rathinasaba.ejb3;

import javax.ejb.Remote;

@Remote
public interface SayHello {
	public String sayHello(String name);
}

 
SayHelloBean.java
This Stateless session bean implements Remote interface SayHello.java
name
mappedName
description
the above three attributes can be used in Stateless session bean.

Here the mappedName attribute is used from Client

package com.wordpress.rathinasaba.ejb3;

import javax.ejb.Stateless;

@Stateless(mappedName = "SayHello")
public class SayHelloBean implements SayHello {
	
	public String sayHello(String name) {
		return "Hello " + name + " welcome to EJB 3 In Action!";
	}
}

 

application.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
	id="Application_ID" version="5">
	<display-name>SayHello EJB3 Sample</display-name>
	<module>
		<ejb>SayHello-ejb.jar</ejb>
	</module>
</application>

 

weblogic-application.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
	<wls:application-param>
		<wls:param-name>webapp.encoding.default</wls:param-name>
		<wls:param-value>UTF-8</wls:param-value>
	</wls:application-param>
</wls:weblogic-application>

 

build.properties

wls.home=C:\\Saba\\soa11g\\soa11.1.1.5\\Middleware

ANT Script – build.xml
The below ANT script file will compile the EJB3 Code and pack it as SayHello.ear file.

<?xml version="1.0" encoding="UTF-8"?>
<project name="SayHello-ejb" default="buildEar" basedir=".">
	<property file="build.properties" />
	<property name="ear.name" value="SayHello" />
	<property name="src.server" value="${basedir}/src/server" />
	<property name="src.common" value="${basedir}/src/common" />
	<property name="build" value="${basedir}/build" />
	<property name="dist" value="${basedir}/dist" />
	<property name="wl.home.lib" value="${wls.home}/wlserver_10.3/server/lib" />

	<echo message="${wl.home.lib}" />

	<path id="classpath">
		<fileset dir="${wl.home.lib}">
			<include name="*.jar" />
		</fileset>
	</path>

	<target name="clean">
		<delete dir="${build}" />
		<delete dir="${dist}" />
	</target>

	<target name="init" depends="clean">
		<mkdir dir="${build}" />
		<mkdir dir="${dist}/META-INF" />
		<mkdir dir="${dist}/APP-INF/lib" />
		<mkdir dir="${dist}/APP-INF/classes" />
		<mkdir dir="${dist}" />
		
	</target>

	<taskdef name="wlappc" classpathref="classpath" classname="weblogic.ant.taskdefs.j2ee.Appc" />

	<target name="compile" depends="init">
		<echo> "Compiling Java" </echo>
		<javac srcdir="${src.server}" destdir="${build}" debug="on">
			<classpath refid="classpath" />
		</javac>
	</target>

	<target name="ejb3Compile" depends="compile">
		<echo> "Compiling EJB" </echo>
		<wlappc source="${build}" output="${build}" keepgenerated="true" verbose="true"/>
	</target>
	
	<target name="buildEar" depends="ejb3Compile">
		<echo> "Building EJB JAR" </echo>
		<copydir dest="${dist}/META-INF/" src="${src.common}/META-INF/"/>
		<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build}" />
		<jar jarfile="${dist}/${ear.name}.ear" basedir="${dist}" />
	</target>
	
</project>

 
Deployment and Client Testing
1. Deploy the SayHello.ear in weblogic server by targetting managed server.
2. Use the below Client Code to Test the EJB3 Sample from main method.

SayHelloClient.java

package com.wordpress.rathinasaba.ejb3.client;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import com.wordpress.rathinasaba.ejb3.SayHello;

public class SayHelloClient {

	private static SayHello client;

	public static void main(String[] args) {
		println(invokeEJB3());
	}

	public static String invokeEJB3() {
		println("===============================================");
		println("                Invoking EJB                   ");
		println("===============================================");
		String response = null;
		try {
			Context ctx = new InitialContext(getInitialContext());
			client = (SayHello) ctx.lookup("SayHello#com.wordpress.rathinasaba.ejb3.SayHello");
			response = client.sayHello("Rathina Sabapathy");
			println("--- Invoked EJB successfully ---");
		} catch (NamingException e) {
			e.printStackTrace();
		}
		return response;
	}

	private static void println(Object content) {
		System.out.println(content);
	}

	private static Hashtable<String, Object> getInitialContext() {
		Hashtable<String, Object> props = new Hashtable<String, Object>();
		props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
		props.put(Context.PROVIDER_URL, "t3://localhost:8011");
		return props;
	}

}
Categories: EJB3 Tags:

XA error: XAResource.XAER_RMFAIL start()

February 15, 2013 Leave a comment

Exception :
————————

Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'update' failed due to: DBWriteInteractionSpec Execute Failed Exception. update failed. Descriptor name: [Update_ALERT_HISTORY.AlertHistory]. Caused by java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMFAIL start() failed on resource 'xxx-DataSource-domain': XAER_RMFAIL : Resource manager is unavailable javax.transaction.xa.XAException: Internal error: XAResource 'xxx-DataSource-domain' is unavailable at weblogic.transaction.internal.XAResourceDescriptor.checkResource(XAResourceDescriptor.java:951) at weblogic.transaction.internal.XAResourceDescriptor.startResourceUse(XAResourceDescriptor.java:634) at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1246) at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1180) at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:285) at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:561) at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:488) at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1673) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1577) at weblogic.jdbc.jta.DataSource.getConnectionInternal(DataSource.java:478) at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:462) at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:512) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:293) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1508) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305) at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:141) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1707) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.commitTransaction(DatabaseAccessor.java:408) at org.eclipse.persistence.internal.sessions.AbstractSession.basicCommitTransaction(AbstractSession.java:567) at org.eclipse.persistence.sessions.server.ClientSession.basicCommitTransaction(ClientSession.java:131) at org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction(AbstractSession.java:762) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction(UnitOfWorkImpl.java:1574) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1515) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1325) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:1087) at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:196) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:326) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:528) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:511) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:547) at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:256) at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:142) at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:197) at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:215) at sun.reflect.GeneratedMethodAccessor1353.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:71) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy314.post(Unknown Source) at oracle.fabric.CubeServiceEngine.postToMesh(CubeServiceEngine.java:763) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:262) at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1070) at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke(InvokeHandler.java:584) at com.collaxa.cube.engine.ext.common.InvokeHandler.handle(InvokeHandler.java:132) at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:74) at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:166) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2687) at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1190) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1093) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:76) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:218) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:297) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4609) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4540) at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:713) at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:560) at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:608) at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:295) at sun.reflect.GeneratedMethodAccessor1308.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:103) at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:113) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:100) at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:154) at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:113) at sun.reflect.GeneratedMethodAccessor1113.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:68) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34) at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54) at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy296.handleInvoke(Unknown Source) at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.__WL_invoke(Unknown Source) at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39) at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.handleInvoke(Unknown Source) at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:35) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:140) at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88) at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at com.collaxa.cube.engine.dispatch.Dispatcher$ContextCapturingThreadFactory$2.run(Dispatcher.java:850) at java.lang.Thread.run(Thread.java:722) at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1678) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1577) at weblogic.jdbc.jta.DataSource.getConnectionInternal(DataSource.java:478) at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:462) at weblogic.jdbc.common.internal.RmiDataSource.getConnectionInternal(RmiDataSource.java:512) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:498) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:491) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:293) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:565) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1508) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:305) at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:141) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1707) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.commitTransaction(DatabaseAccessor.java:408) at org.eclipse.persistence.internal.sessions.AbstractSession.basicCommitTransaction(AbstractSession.java:567) at org.eclipse.persistence.sessions.server.ClientSession.basicCommitTransaction(ClientSession.java:131) at org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction(AbstractSession.java:762) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction(UnitOfWorkImpl.java:1574) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1515) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1325) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:1087) at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:196) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:326) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:528) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:511) at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:547) at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:256) at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:142) at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:197) at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:215) at sun.reflect.GeneratedMethodAccessor1353.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:71) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy314.post(Unknown Source) at oracle.fabric.CubeServiceEngine.postToMesh(CubeServiceEngine.java:763) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:262) at com.collaxa.cube.engine.ext.common.InvokeHandler.__invoke(InvokeHandler.java:1070) at com.collaxa.cube.engine.ext.common.InvokeHandler.handleNormalInvoke(InvokeHandler.java:584) at com.collaxa.cube.engine.ext.common.InvokeHandler.handle(InvokeHandler.java:132) at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:74) at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:166) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2687) at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1190) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1093) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:76) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:218) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:297) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4609) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4540) at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:713) at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:560) at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:608) at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:295) at sun.reflect.GeneratedMethodAccessor1308.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:103) at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:113) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:100) at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:154) at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:113) at sun.reflect.GeneratedMethodAccessor1113.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:68) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34) at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54) at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy296.handleInvoke(Unknown Source) at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.__WL_invoke(Unknown Source) at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39) at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.handleInvoke(Unknown Source) at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:35) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:140) at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88) at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at com.collaxa.cube.engine.dispatch.Dispatcher$ContextCapturingThreadFactory$2.run(Dispatcher.java:850) at java.lang.Thread.run(Thread.java:722) . Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.

 
Solution:
————————-
(1). Increase the InitialCapacity and MinimumCapacity to 50

IncreaseConnectionPoolCapacity

IncreaseConnectionPoolCapacity

 

(2). Enable the Set XA Transaction Timeout check box and set XA Transaction Timeout to 0 as shown in below screenshot.

When this XA Transaction value is set to 0, then the XAResource Session Timeout will be set to global WebLogic Server transaction timeout.

If set, this value should be greater than or equal to the global WebLogic Server transaction timeout.

Note: You must enable XaSetTransactionTimeout to enable setting the transaction timeout.

SetTransactionTimeout

SetTransactionTimeout