Wednesday, February 6, 2013

Configuring DB Adapter in SOA11g

Outbound connection pools in a resource adapter are configured in the ra.xml and weblogic-ra.xml deployment descriptors. You can also use the Administration Console to modify the pool's properties. Properties you modify in the console will be saved in a deployment plan.

1.  Create  data source
2..  Create outbound connection
3.Assign the newly created outbound connection to the data source .

* Follow below steps to create a Data Source to point to your database.


* Example:

- Name: myDS

- JNDI Name: jdbc/myDS


1. Login Admin Console.


* In Domain Structure pane, click soa_domain -> Services -> Data Sources.

* In Summary of JDBC Data Sources -> Configuration page, click New -> Generic Data Source.


* In JDBC Data Source Properties screen, enter:

- Name: myDS

- JNDI Name: jdbc/myDS

- Database Type: Oracle

  * Click Next

* Select

- Database Driver: Oracle's Driver (Thin XA) for Instance connections; Verions:9.0.1 and later

- Click Next.

* Click Next on Transaction Options screen.

* On Connection Properties screen, enter:

- Database Name: orcl

- Host Name: localhost

- Port: 1521

- Database User Name: scott

- Password: tiger

- Click Next.

* On Test Database Connection screen, click Test Configuration button. Make sure the response is Connection test succeeded.



* Click Next.

* On Select Targets screen, select the target server instance. For example,



Click Finish...

2) Create an Outbound Connection Pool:


* Click soa_domain > Deployments in Domain Structure pane.

* Click DBadapter in Summary of Deployments pane.

* Click Configuration -> Outbound Connection Pools tab.

* Click New button.



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

Enter

JNDI Name: eis/DB/myDB


Click Finish

Assign Data Source to Connection Pool:


* Click Configuration tab -> Outbound Connection Pools tab.

* Expand javax.resource.cci.ConnectionFactory.

* Click the newly created outbound connection pool, e.g eis/DB/myDB.



* Click Properties tab and enter

xADataSourceName: jdbc/myDS

* Hit Enter key.

* Click Save button.



3) Redeploy DbAdapter :

* Click soa_domain > Deployments in Domain Structure pane.

* Click thecheckbox to select DBAdapter.

* Click Update button.


* Select Redeploy this application using the following deployment files

* Check deployment plan file is correct:

- Deployment plan path:/opt/oracle/Middleware/home_11gr1/Oracle_SOA1/soa/DBPlan/Plan.xml



Click Next ..Finish

click Activate Changes...








No comments:

Post a Comment