Showing posts with label SOA suite. Show all posts
Showing posts with label SOA suite. Show all posts

Wednesday, October 7, 2009

Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig

After setting up a few jms queues, if the oc4j did not shutdown properly, (ie) shutting down the machine without issuing "opmnctl stopall", the above error is very likely to occur.

To fix this just rename the <ORACLE_HOME>/j2ee/<soa_instance>/persistence folder and create an empty folder in its place.

Now if you start the server, it should startup fine.

Thursday, December 4, 2008

ESB rejected Message Handlers doesnot work

If you ever wondered to change the default place where the ESB drops the files it rejected, you might have came across the endproperty "rejectedMessageHandlers". However JDeveloper 10.1.3.3 does not allow to add this property. You have to close the jDeveloper, edit the file manually and re-register the service. I also noticed that the property seems to be disappearing some times. (so keep a backup handy all the time)

There is also another catch to the way you specify the value of the property. The developer guide example specifies a sample value as below.

<property name="rejectedMessageHandlers" value="file://c:\rejectSample\reject"/>


However, it will not work. As pointed out in the OTN thread
you need to add a additional slash after the file: as shown below.

<property name="rejectedMessageHandlers" value="file:///c:\rejectSample\reject"/>


I agree this is pretty dump. However it if you are reading this you might be already used to such dump things from the SOA suite.


P.S. In case you are wondering the location of the default folder for the rejected messages, it is /j2ee/home/jca/service.name.routingservice.name/rejectedMessages.
I have not yet found a way to keep the name of the original input file.
rejectedMessageHandlers

Sunday, November 23, 2008

Where to find Oracle ESB documentation

Here is a list of ESB documentation files I found useful. You can check them out at http://www.technogemsinc.com/clientFile/esb.htm

For details about configuring the AQ, database, file, FTP, JMS, and MQ adapters in Oracle JDeveloper, see Oracle Application Server Adapter for Files, FTP, Databases, and Enterprise Messaging User's Guide. For details about configuring the Oracle application adapter for Oracle E-Business Suite, see Oracle Application Server Adapter for Oracle Applications User's Guide.

How to set the name of the file dynamically during transformation time in ESB fileAdaptor

Oracle ESB provides header functions that allows designers to access inbound and outbound header functions. The following are the functions available.

1. String getRequestHeader(String xpathExpression,String namespaceDecl)
2. void setOutboundHeader(String xpathExpression,String value, String namespaceDecl)
3. String getInboundResponseHeader(String xpathExpression,String namespaceDecl)
4. void setResponseHeader(String xpathExpression,String value, String namespaceDecl)
Where,
xpathExpression : XPath expression to get/set
value : value to be set for the xpathExpression
namespaceDecl : namespace declarations in the form ‘prefix=namespace;’


You can use the following code snippet in your transformation xslt to set the name of the file that is about to written by the ESB File adaptor. This overrides the name given in the design time.

<xsl:variable name="SET_OUTFILENAME"
select="ehdr:setOutboundHeader('/fhdr:OutboundFileHeaderType/fhdr :fileName', $GET_INFILENAME, 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/>


The variable GET_INFILE is the name of the input file name as referred in the previous post.
If you like an example project, you can download it from oracle site here The sample project is under HeaderSupportDemo folder.

How to get the name of an ESB instance in transformation

A new XPath function was added in Oracle 10.1.3.3 to get instance IDs. If you are running an older version you have to upgrade to get this working. One note of caution is, after making the edits to your xslt, the designer view will not work. This is a limitation of jDeveloper.
Here is an example on how to get the instance id in the transformation.

1. Define a simple ESB project and define a simple File Adapter.
2. Perform a transformation in the routing service.
3 Perform the following steps to get the instance ID:

a. Go to Design View.
b. Select Advanced Functions in the Component Palette.
c. Select xpath-expression and drag it to the middle column.
d. Double-click the function icon.
e. Enter ehdr:getInstanceID() in the XPath Expression field.
f. Click OK

4. Click Yes when prompted with a warning.
5. Map the function to the InstanceID element and save the project.
6. Return to the routing service where the XSL transformation activity is defined.
7. Double-click the routing service.
8. Expand the Properties section and add the following property:
Map the function to the InstanceID element and save the project.
6. Return to the routing service where the XSL transformation activity is defined.
7. Double-click the routing service.
8. Expand the Properties section and add the following property:(Note this property is case sensitive.)
enableAccessBusinessEvent=true

9. Save and deploy the project.