Showing posts with label bpel. Show all posts
Showing posts with label bpel. Show all posts

Friday, 18 April 2014

soa project migration from 10g to 11g

Do the following:

First create a soa project, give the same name as the project you are going to migrate.

Use ant script that comes with jdeveloper i.e. in  "jdeveloper\bin"  directory use ant-sca-upgrade.xml to upgrade the 10g project.


This is the syntax "ant -f ant-sca-upgrade.xml -Dsource sourceDir -Dtarget targetDir -DappName app_name"

Here sourceDir is the 10g project directory, targetDir is the project directory that you have created in step 1 and appName is the name of the composite.

Monday, 30 December 2013

Using Spring Context in SOA

ref : http://oraclefusion1011.blogspot.com/

Use case : Use spring in Bpel to read,write huge files. Since default File Adapter works in Bpel memory this would be good for heavy lifting. I know we have options of java embedd and EJB, but since springs are considered as best java option I would like to explore this option.

Steps:
1. Create a SOA Project , Composite.
2. Create a java interface that has method for reading/writing files : IFileUtils.java
   method readWriteFile(String filename)
3. Create a java class that implements the  IFileUtils interface for reading/writing files : FileUtils.java
4. Now if you dont see spring option in composite , update the Jdeveloper with "Spring & Oracle WebLogic SCA" using help->updates.

5. Create a Bpel process that will invoke the spring.
6. Drop a Spring context in composite :
Name : FileUtilsSpring
Create a new context : FileUtilitySpring.

7. Open FileUtilitySpring.xml and add below lines of code inside the bean tag aftre the below comment
<!--Spring Bean definitions go here-->
  <bean class="pc.com.fileutils.FileUtils" id="Fileimpl" />
  <sca:service name="test" target="Fileimpl" type="pc.com.fileutils.IFileUtils" />

The file should look like :





8. Now you should be able to wire the Bpel and spring component. It will generate the WSDL and load java classes, Composite should look like :



9. Add invoke to Bpel to add the spring context, assign required values
10. Deploy the code and Test in EM