Friday, February 24, 2012

Establish a DBAdapter Deployment Plan Directory

In my previous post here. I posted about JCA adapter service. The below picture:

What mean JNDI name?
I get service datas from Hr schema. The first I need to create Hr Data Source in weblogic. here How to create Data source in weblogic 11g console.

Create an Outbound Connection Pool
1. Click Deployments in Domain Structure pane.

2. Click DBadapter in Summary of Deployments pane.
3. Click Configuration -> Outbound Connection Pools tab.
4. Click New button.

5.Select javax.resource.cci.ConnectionFactory and click Next.

6. Enter JNDI Name: eis/DB/HrDS

Click finish.

7. Assign Data Source to Connection Pool
a. Click newly created outbound connection pool. eis/DB/HrDS

b. Click properties tab and enter xADataSourceName. Insert jdbc/HrDS value.

8. Redeploy DbAdapter.
select DbAdapter from deployments. Click Update button then select Redeploy this application using the following deployment files. click finish

select DbAdapter from deployments. select Start dropdown and select Servicing all requests.

How to create a DataSource in WebLogic Server 11g console

In this post, You will learn how to create data source in weblogic 11g administration console.


Monday, February 13, 2012

Oracle Service Bus 11g and SOA Suite DB Adapter

I have not enough experience for Oracle Service Bus and SOA Suite. I have been working on Web Service(OSB) for about 2 years.
In today, I am posting about DB adapter to use create business service on OSB.

The post will show How to get data rows from any Database . My Data is into HR schemas. HR schema is oracle database demo schema and you can download if you have not. First project is SOA SUITE application on JDeveloper.

1. Start jdeveloper IDE. Create new Application. New Gallery dialog will show.

select SOA Project from items and click Ok.insert to Application name "SOA_HR".
2. Create new SOA Project. right click in the application project and new project.

3. Create Inbound DB adapter.

select DB Adapter and drag to SCA Composite. follow dialog appear. Click next.

4. Insert service name and click next. Service named "Department".

5. Service connection dialog appear. select a database connection already defined in your project or create new connection. HrDS connection is HR schemas. I hope You can create database connection for JDeveloper IDE. You need to attension to JNDI name. This string configured on DbAdapter jar. click next.

6. DbAdapter have some operation types. You can call procedure or function already defined in Database. else execute Insert,Update and Delete operations. or execute pure SQL query. select statement from dialog. click next.

7.Click Import tables. click next.

8. If your imported tables are relationship tables You can set relationship between tables. If no , click next button.

9. Attribute filtering choose dialog. If you would like to exclude all attributes from the database, check all.Primary key attributes cannot be excluded. That's are disabled.

10. You can define selection criteria.

11.Click next .

12.Import jdeveloper project to eclipse workspace. You need to do follow steps.
The first, you must be create OSB Configuration project and OSB project into workspace.

13. then Run JCA business service and input dep_id parameter. click execute.

well, I hope this post help you teaching adapter service and osb. next time I will post get data to use FTP and FILE adapters.