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/
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.
Ei kommentteja:
Lähetä kommentti