Creating a sample
Data Source in WebLogic server.
1 .Log on to weblogic
admin colsole.
2 .Go to Servicesà Data Sources or in main
page you can see the Data Source tab
under services as shown below.
Click on NEW, select
Generic Data Source out of 3 options .
Data Sources description:-
·
Generic Data Sources—Generic data sources and
their connection pools provide connection management processes that help keep
your system running efficiently.You can set options in the data source to suit
your applications and your environment.
·
GridLink Data Sources—An event-based data
source that adaptively responds to state changes in an Oracle RAC instance. See Using
GridLink Data Sources.
·
Multi data sources—A multi data source is
an abstraction around a group of generic data sources that provides load balancing
or failover processing.
Select Database
Type is Oracle.
Don’t change anything let it use XA driver, If you need any
other driver you can select as per your requirement unless use the default one.
Click Next
Enter DB connection
properties
Click “Next” and
Click “Test Configuration” you can see the test success result, then only the
connection will take the action or else connection may not be created. Click “Next”.
Now a New JDBC data
source will be created .Select a server (Admin Server).
Data Source creation done. You can see the data source in
the list.
Now you have to create a connection factory for an outbound.
Go to Domain
Structure à Deployments à
Click on DB Adapter à Configuration à
Outbound connection pools. Expand list.
Click “NEW” enter
JNDI name that you have to create for outbound connection.
(Note:-Remember you
should not use the same JNDI name while creating the data source. Use another
JNDI name.
You have to use this JNDI name in DB Adapter configuration
while design in JDeveloper.)
Finish. Then go to outbound
connection pools that you have created recently .
Go to properties à Go to xADataSourceName --property Value enter the JNDI name that you
have given while creating the data source. Press Enter (Mandatory press enter save button will not work here).
(Note:-Here you have to enter only the JNDI name that you
have given while creating the data source then only it will point to the data
source.)
Save.
Go to deployments,
select DB Adapter click on update.
Then the plan.xml file will be updated. Then you will
the below success message.
Now you have created a data
source successfully.
Remember when you
create a data source use one JNDI name ,this you have to enter in xADataSourceName ,When you are creating
the outbound connection in deployments use another JNDI name , this you have to
use this JNDI name in design time while DB Adapter configuration in JDeveloper.
WoW…Done…..!!
Happy Learning.
No comments:
Post a Comment