Friday, August 14, 2009

11g-Creating connection pool/data source

Go to weblogic console

navigate to services->jdbc->data sources



go to data source and click on new

Once you will click on new you will get a new window like this




Provide the name of the data source and a jndi name.

Let all the other configuration be unchanged.



Say next and you will get the following page




Provide the details for the database you are trying to connect.



Test the configuration



Say next and target to SOA_SErver and say finish




Now you can get the newly created dataosurce in the list






We have completed how to create a data source however we still need to create connection pool and data sources to connect to the data base.So we will create a connection pool.

go to console and click on deployment



then all the deployments will appear up in the right screen.click on db adapter



Click the Configuration tab, and then click on the Outbound Connection Pools tab



Cilck on new

In the next page select javax.resource.cci.ConnectionFactory and say next



Provide some jndi name for the connection and say finish




The deployment plan will be saved in the location by default or you can provide your own directory structure and save the file.Say ok




Verify the deployment plan



Now go to configuration tab and select the connection pool you have created



Now provide the data source name in the xa data source.Press enter key to save the value and verify if it is saved.Using mouse to save it will not save the data so use enter key.



Save the changes and Go to the Deployments page to Update the DbAdapter. Click
Deployments and select the db adapter and say update



Let the default option be there to redeploy the application.Verify the deployment plan and say finish.



Now go back to connection pool verify the configuration again and check if you have all the entries data sources correctly mentioned there.NOw you have configured a connection pool and data source which can be used to connect to database.We will see some example later.

No comments: