Thursday, October 24, 2013

Apache Derby DataSource configuration in Weblogic Server

Most of you might already worked on this. Anyone who has not got chance to work on it and a note to myself on the step by step Apache Derby datasource configuration in Weblogic.

Steps to Configure Apache Derby Datasource in Weblogic

A. Weblogic v10.3.3 and below
Pre-requisites:
--JDK 1.7 with Java DB [Apache Derby distribution] included.
   Java DB is Oracle's supported distribution of the Apache Derby open source database. It supports standard ANSI/ISO SQL through the JDBC and Java EE APIs.

1a. Java DB startup - 
Navigate to JDK7 <JAVA_HOME_JDK7>/db/bin directory and execute the startNetworkServer.bat or startNetworkServer.sh per your OS preference.
By default, the Java DB listens on TCP/IP port 1527. The listen port can always be modified, refer this documentation.
1b. Download and supplement the Derby JDBC driver jar files to the Weblogic domain classpath in setDomainEnv.cmd or setDomainEnv.sh under <DOMAIN_HOME>/bin. Restart the Weblogic domain for the Derby JDBC driver class to be accessible.
   derbyclient.jar - <JAVA_HOME_JDK7>/db/lib/derbyclient.jar
   derbytools.jar - <JAVA_HOME_JDK7>/db/lib/derbytools.jar

Example:

     set JAVA_HOME_JDK7=E:\Java\jdk1.7.0_25
     set PRE_CLASSPATH=%JAVA_HOME_JDK7%\db\lib\derbyclient.jar;%JAVA_HOME_JDK7%\db\lib\derbytools.jar



B. Weblogic v10.3.4 and above
Starting version Weblogic 10.3.4 the Apache Derby DB is included in the installation along with Weblogic. 

1a. Java DB startup - Set DERBY_FLAG to true in your setDomainEnv.cmd or setDomainEnv.sh under <DOMAIN_HOME>/bin. This setting would launch Java DB startup during the startup of Weblogic instance. Restart the Weblogic instance to bring up the Java DB along with Weblogic.


2If you have not already done so, in the Change Center of the Administration Console, click "Lock & Edit"


3. In the left pane, navigate to Services > JDBC > Data Sources

4. On the right pane, click on New to add new Data Source

5. Specify Name and JNDI name of the Data Source per your preference. Select the Database Type as Derby and appropriate Database Driver. Click Next

6. I have unchecked the Supports Global Transactions option.Again it is per your preference.

7. Specify the Connection properties and click Next
     Database Name can be absolute path location of the database files to be saved.
     Example: E:\DerbyDB\ApacheDerbyDB
     Or
     It can be relative path location, you will have to just mention dbName and the database files will be created under <JAVA_HOME_JDK7>\db\bin\ [Option A] or <WEBLOGIC_HOME>\common\derby\bin\ [Option B]
     Example: If the dbName is blogdomain_db, E:\Java\jdk1.7.0_25\db\bin\blogdomain_db or C:\Middleware_10.3.4\wlserver_10.3\common\derby\bin\blogdomain_db would be the location of the database files.
     Host Name where the database runs.
     Port on which the database listens for connections
     Username and Password

8. Verify Connection properties, click Test Configuration and proceed Next. If you notice under properties create=true is automatically added, the database will be automatically created if not present already.

9. Select targets for the Data Source. Click Finish

10. In the Change Center of the Administration Console, click "Activate Changes".



32 comments:

  1. I need to perform this task in part of my weblogic training in hyderabad and I don't know working methods to configure Apache Derby datasource in Weblogic. many thanks to your post.
    Regards,
    Lucidtechsystems.

    ReplyDelete
  2. Great article filled with resources.Thank you for disclosing it is not a bug, it is a feature.


    Weblogic Server 12cR2 Training

    ReplyDelete
  3. I was looking for this kind of valuable information. Your article is really helpful for me. Thanks a lot.

    Steepster

    3D Artist Online

    Photoshop Creative

    Udemy

    Colour Lovers

    Wanelo

    Intensedebaite

    4Shared

    500Px

    PublicLab

    ReplyDelete
  4. I was looking for this kind of valuable information.
    Your article is really helpful for me. Thanks a lot.


    CodeChef

    EverPlaces

    GrabCad

    InPrnt

    SmackJeeves

    Ultimate Guitar

    RauteMusik

    OpenSit

    Eyeka

    LetterBoxd

    ReplyDelete
  5. I was looking for this kind of valuable information.
    Your article is really helpful for me. Thanks a lot.


    Wanelo

    Intense Debate

    4shared

    500Px

    Public lab

    Xooit

    Steinberg

    Torgi

    Its my URL's

    Manozaidimai

    ReplyDelete
  6. I was looking for this kind of valuable information.
    Your article is really helpful for me. Thanks a lot.


    Balconytv

    PressBook

    Subrion

    Hackster

    Turnkey

    GameKyo

    Whazzup

    Quibblo

    PeopleSap

    Forexfactory

    ReplyDelete
  7. I was looking for this kind of valuable information.
    Your article is really helpful for me. Thanks a lot.


    Sinesparks

    Diebythesword

    NetworkingPeople

    Pipelineae

    Darksminky

    WowGuildPortal

    Electrokilla

    ReplyDelete
  8. I was looking for this kind of valuable information.
    Your article is really helpful for me. Thanks a lot.


    TheDailyRadish

    TechnoZooo

    TechStrange

    LifeStyleByPs

    GetinFoon

    EasyLifeJourney

    MyInfoExpert

    ReplyDelete
  9. Wow really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    Ello

    Anotepad

    Google

    Uniquethis

    Diigo

    Kinja

    ReplyDelete
  10. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    BecomeGorgeous

    ReplyDelete
  11. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    DivePhotoGuide

    ReplyDelete
  12. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    DeviantArt

    ReplyDelete
  13. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    Aunbox

    ReplyDelete
  14. Awesome article, I appreciate your efforts.

    Picturepush

    ReplyDelete
  15. Awesome article, I appreciate your efforts.

    FunnyOrDie

    ReplyDelete
  16. Awesome article, I appreciate your efforts.

    Worldcosplay

    ReplyDelete
  17. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    Mixcloud

    ReplyDelete
  18. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    SLIDES

    ReplyDelete
  19. Awesome article, I appreciate your efforts.

    Ghanathings

    ReplyDelete
  20. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    BEHANCE

    ReplyDelete
  21. Awesome article, I appreciate your efforts.

    ATLASOBSCURA

    ReplyDelete
  22. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    DEVIANTART

    ReplyDelete
  23. Wow, really impressive guide about the topic that I was looking for. Thank you so much for this awesome guide.

    TTLINK

    ReplyDelete
  24. Give your furry friend the gift of comfort with this super soft CLAMING PET BED "BestVetOnline" for dogs and cats.
    Our beds feature a round design, creating a cozy and protective atmosphere.
    Pets will feel surrounded by love and warmth, allowing them to experience truly restful sleep.
    The bolstered edge also acts as a headrest, offering additional orthopedic support.

    ReplyDelete
  25. Give your furry friend the gift of comfort with this super soft Vingtage Motorcycle Helmet "Spreaker" for dogs and cats.
    Our beds feature a round design, creating a cozy and protective atmosphere.
    Pets will feel surrounded by love and warmth, allowing them to experience truly restful sleep.
    The bolstered edge also acts as a headrest, offering additional orthopedic support.

    ReplyDelete
  26. Thanks for sharing information, excellent article, keep continue this....
    Data science is an inter-disciplinary field that uses scientific methods, processes, algorithms and systems to extract knowledge and insights from many structural and unstructured data. Data science is related to data mining, machine learning and big data.
    Data Science Training In Chennai

    ReplyDelete