Thursday Jan 02, 2014

WebLogic 12.1.2: Derby database and elastic JMS by Qualogy

A while ago Oracle released its new version of WebLogic Server 12.1.2 with lots of new cool features such as dynamic clustering and elastic JMS. Now there have been a lot of improvements from an administrative point of view, nevertheless JMS version is still at 1.1 (already since 2002!) Version 2.0 is out but not for this release yet.

For doing some testing I didn’t have an Oracle database present, so why not use WebLogic’s embedded database Derby?

Derby Database configuration
If you have a WebLogic environment configured and you need to test against a database, a quick and easy solution is offered to you. Shipped  from version 10.3.3 WebLogic uses Apache’s Derby database built in (previous versions were shipped with PointBase). Derby is Apache’s OpenSource database based on Java, it’s JDBC drivers and SQL. It has a small footprint so it’s ideal for lightweight operations. Very easy to set up, as you will read in this blog.

You could start the derby database ( on *nix systems) from command line. In the WebLogic server home the derby libraries, binaries and scripts are located under

<WL_HOME>/common/derby.

First start the connection interface:
/u01/app/middleware_1212/wlserver/common/derby/bin/startNetworkServer -h <hostname> (I used localhost, but better use your FQDN)

A more concise way to do is to embed this into your WebLogic domain. This can be done very easily by setting derby tor true in your setDomainEnv file:

DERBY_FLAG="true"
export DERBY_FLAG

Now, there are several ways to create a database:

  • Through derby command line ij:
    /u01/app/middleware_1212/wlserver/common/derby/bin/ij
    connect 'jdbc:derby://localhost:1527/qnlel1dbs;ServerName=localhost;databaseName=qnlel1dbs';
    create=true';
  • In the WebLogic console, which is a very easy way
    derby1

After the test is successful, and you’ve targeted the datasource to the proper servers, it is ready for use. Now, for my test I needed to create some tables and sequences. This can be done through command line with sql: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Search

Archives
« January 2014 »
SunMonTueWedThuFriSat
   
1
3
4
5
12
14
15
18
19
22
23
24
25
26
27
28
29
 
       
Today