Thursday, 2 February 2012

Configuring DBAdapter in SOA 11g


Establish a DBAdapter Deployment Plan Directory 


* Create a directory on the host machine where the deployment plan for the DbAdapter application can be saved.
* This only needs to be done once.
* Example:

Command: mkdir /opt/oracle/Middleware/home_11gr1/Oracle_SOA1/soa/DBPlan
(OR) 
Go to SOA installed home directory (.../home_11gr1/Oracle_SOA1/soa) and create DBPlan folder manually .


Acquire Change Lock :

* Click Lock & Edit button in the Change Center pane.

1) Create a Data Source:


* Follow below steps to create a Data Source to point to your database.
* Example:
- Name: myDS
- JNDI Name: jdbc/myDS




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.
* Click Finish.

Activate Changes:


* Click Activate Changes button in the Change Center pane.

Finally ,..Enjoy with SOA 11g...!!!

No comments:

Post a Comment