keskiviikko 10. huhtikuuta 2013

Tutorial 1. Part 5 - creating database resources

Creating database resource
Practically all composite services need to use a database. To prepare for this we need to create a database resource in Weblogic Admininstration Console. There is also scripting support via WLST (Web Logic Scripting Tool) but yours truly has never used it.

By default the console is installed at:

http://localhost:7001/console/

First logon may take some time as the system is deploying the management apps only when the first page fetch is received.

Main page opens that shows a generic view of your environment.
A database resource contains a set of database connections that are pooled together. This connection pool is created when the data source is created and the connections are also always created when the server starts. Applications use a JNDI name to gain access to the data source.
Defining the database resource contains four steps:
  • Defining the datasource
  •  Define the connection pool
  •  Create a DB plan (should be already done if you followed installation instructions but for different user)
  • Link data source and connection pool together
Go to Service-Data Source


Select new->Generic Datasource (new is a button with a downarrow at end). Add name for datasource and jndi name (there is a convention that jndi names start with jdbc if they are db related). 
Press next. Select thin driver there. Press next again twice until you reach a page that asks for database name, user name etc.
On the following page test the connectivity – i.e. that you used right username and password.


Press next. Select admin server as target. This means that admin server is the managed server creating the connections. We do not need them from back and the deployment would result in error as the bam is currently not even started. Press finish




Ei kommentteja:

Lähetä kommentti