Friday, 10 February 2017

Data Source Configuration Steps

Creating a Data Source
1.      In the Domain Structure Section, expand Services and then click on Data Sources
Select Data Sources
2.      In the Change Center section on the top left corner of the screen, click Lock & Edit. If you don’t have this option, don’t worry. That just means that in Preferences (which can be found at the top center of the screen), you’ve unchecked the option for “Automatically Acquire Lock and Activate Changes.”
Lock And Edit
3.       In the Summary of JDBC Data Sources section in the center of your screen, click New and then click Generic Data Source
New Generic Data Source
4.       Since we’re going to connect to the CUSTOMER_STAGING database, let’s set the name as “CustomerStaging” and then set the JNDI Name as “jdbc/CustomerStaging”. You can leave the database type as “Oracle”. Click Next
Create a new JDBC Data Source
5.       On the next screen, you can leave the default Oracle Thin XA driver. However, you should always choose the appropriate database driver for your project. The support matrix for the Oracle Database Adapter is located on the following spreadsheet http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls. This spreadsheet came from the following page which contains information about all Fusion Middleware Supported Configurations: http://www.oracle.com/technetwork/middleware/ias/downloads/fusion-certification-100350.html. For our purposes here, accept the default and click Next
Database Driver
6.       The next screen, for our purposes, presents a message informing you that the XA driver you’ve chosen supports global transactions and uses the 'Two-Phase Commit' global transaction protocol. Whenever possible, always choose XA drivers when you’re using them for database adapters within BPEL or BPMN projects. This is because if you execute several database scripts within a single scope and then experience an exception, the process engine will be able to roll back these changes in order to recover cleanly. If you want to learn more, I would highly recommend the following article which does the best job I’ve seen so far of discussing how XA transactions work in a business process: http://www.oracle.com/technetwork/articles/soa/wli-bpel-transactions-088255.html. For this example, you don’t have to do anything on this screen but click Next.
7.       Here you will define the connection properties. Please note that the ones I’ve listed are specific to the Oracle VM VirtualBox instance I’m using for this demo. Click Next when finished
·         Database Name: xe
·         Host Name: soabpm-vm
·         Port: 1521
·         Database User Name: CUSTOMER_STAGING
·         Password: CUSTOMER_STAGING
Define Connection Properties
8.       Here you will define the connection properties. Please note that the ones I’ve listed are specific to the Oracle VM VirtualBox instance I’m using for this demo. Click Next when finished
http://www.avioconsulting.com/sites/default/files/page-images/u67/CreateNewDataSource5.jpg
8.       On the Summary page, be sure to click “Test Configuration” and even more importantly, be sure that you see a success message stating “Connection test succeeded.” If you don’t see this, go back and correct any problems you have in the prior screens. Once you get a success message you can click Next.
Test Configuration
9.       For this example, simply choose “AdminServer” as your target. However, for a real project, this will depend greatly upon how your environment is configured. In a real implementation, you would probably target your SOA or ADF cluster rather than the admin server. Click Finish.
Select Target
10.   In the Change Center section in the upper left of your screen, click Activate Changes and be sure that you see a message saying “All changes have been activated. No restarts are necessary.” It’s important to note that if you ever need to update your data source, you will need to restart your WebLogic server before the changes will take effect. This message at the top of your screen will always inform you if a restart is necessary.
Activate Changes

Creating a Database Connection Pool
1.       In the Domain Structure panel on the left, click on Deployments
Deployments
2.       In the Summary of Deployments panel in the middle of the page, click on the DbAdapter link
DB Adapter
3.       In the Settings for DbAdapter panel in the middle of the page, click on the Configuration tab
Configuration Tab
4.       Click on the Outbound Connection Pools tab
Outbound Connection Pools
5.       In the Change Center section on the top left corner of the screen, click Lock & Edit.
6.       In the Outbound Connection Pool Configuration Table, click New
New Outbound Connection Pool
7.       In the Outbound Connection Groups table, select the radio next to javax.resource.cci.ConnectionFactory and click Next
Choose a Connection Group
8.       Set the JNDI Name to “eis/DB/CustomerStaging”. This is how we’ll identify this Outbound Connection Pool. Click Finish
Set Pool JNDI Name
9.       In the Outbound Connection Pool Configuration Table, expand javax.resource.cci.ConnectionFactory and click on “eis/DB/CustomerStaging”
Select New Connection Pool JNDI
10.   In the Settings for javax.resource.cci.ConnectionFactory panel, click on the Property Value column within the last row, which is labeled “xADataSourceName”. It is important to note that before click away from this cell, you must hit the Enter key for this change to register on the screen. The following link describes specifics around each of these settings: http://docs.oracle.com/html/B25307_02/adptr_db.htm#CHDDCFDJ. If you are connecting to a non-Oracle database, you will need to change the platformClassName, which is also discussed in the link. For our purposes here, once you see the new xADataSourceName in the table, click Save
Set xADataSourceName
11.   Be sure that you see a message at the top of the screen saying “Deployment plan has been successfully updated.”
Deployment Plan Successfully Updated
12.   In the Domain Structure panel on the left, click Deployments
13.   In the Summary of Deployments panel in the center of your screen, click the checkbox next to DbAdapter and then click Update
Update DB Adapter
14.   In the Update Application Assistant panel in the center of your screen, be sure that the following radio button is chosen: “Redeploy this application using the following deployment files”. Note that this screen shows the location of 2 files that are about to be changed. Click Finish
Update Deployment Files
15.   Make sure you see a message at the top of the screen saying, “Selected Deployments were updated.”
Deployments Updated Msg
16.   In the Change Center panel in the upper left corner of your screen, click “Activate Changes”
17.   Again, ensure that the message that the top of the screen reads, “All changes have been activated. No restarts are necessary.”
Changes Activated


No comments:

Post a Comment