Debu Panda

Subscribe to Debu Panda feed
Rumblings from a Technologist and Book author
Updated: 17 hours 8 min ago

Using SQL*Plus to Seed your Dockerized Oracle Database

Sat, 2018-01-20 19:28
In my last blog, you learned  to create a containerized Oracle database for your development/testing purpose. You also know how to connect to your container and run command in the container.

Most applications require some reference data e.g. example,my  OrderApp application based on Apache Tom EE  requires catalog data to be pre-populated before I can test my application. 

One of the readers asked me how can we run a SQL script on his local or shared drive to seed the containerized database.

In this blog, I will show how you can execute scripts with SQL*Plus inside the container to seed your dockerized Oracle database.

Connecting to SQLPlus

In the last blog, we learned that ORACLE_HOME for the database running in the container is /u01/app/oracle/product/12.1.0/dbhome_1.

I can connect to the database by running the following command:

docker exec -it orcldb /u01/app/oracle/product/12.1.0/dbhome_1/bin/sqlplus system/welcome1@ORCL

SQL*Plus: Release Production on Sat Jan 20 06:22:58 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Sun Jan 14 2018 03:09:54 +00:00

Connected to:
Oracle Database 12c Standard Edition Release - 64bit Production


You might remember ORCL was the instance name that provided for my database.

Also note that when I run the command, SQL*Plus is getting executed inside the container.

Running a SQL script Using SQLPlus

As the command is getting executed inside the container running the Oracle database, the SQL script has to be accessible from the container.

My Script

My application depends upon a user in the PDB. My script creates the user, creates tables in that user's schema and populates data in those tables. 

I have a script named user.sql that I want to execute and here are the contents of /Users/dpanda/orderapp2/orcl/sql/user.sql script.

create user orderapp identified by orderapp2
default tablespace users temporary tablespace temp

alter user orderapp quota unlimited on users
grant connect, resource to orderapp
connect orderapp/orderapp@pdb1

As I am invoking the SQL*Plus inside the container, I have to specify the drive inside the container.

Mapping Volume from the Container to Local or Shared Drive

You might remember from the last blog that when I started the Database container, I mapped the drive in /u04/app in the container to /Users/dpanda/orderapp2/orcl by using –v option as below:

docker run -d --env-file -p 1521:1521 -p 5500:5500 --name orcldb --net appnet  --shm-size="4g" -v /Users/dpanda/orderapp2/orcl:/u04/app:/u04/app

The script directory has to be specified as /u04/app/sql as my script is located in /Users/dpanda/orderapp2/orcl/sql directory on my MAC .

Here is the docker command I can use to run my script:

docker exec -it orcldb
/u01/app/oracle/product/12.1.0/dbhome_1/bin/sqlplus system/welcome1@PDB1 @/u04/app/sql/user

As you can see, I can connecting to the pdb1 database by executing SQLPlus command and running the user.sql script.

Here is the output you will get

SQL*Plus: Release Production on Sat Jan 13 06:16:32 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Sat Jan 13 2018 06:16:19 +00:00

Connected to:
Oracle Database 12c Standard Edition Release - 64bit Production

User created.

User altered.

Grant succeeded.


1 row created.

1 row created.

1 row created.

Commit complete.

Disconnected from Oracle Database 12c Standard Edition Release - 64bit Production

Hope this helps to automate your script to seed your containerized Oracle database.

In a future blog, I will demonstrate how can you Oracle Instant Client in a Docker container to automate your scripts.

Dockerizing Your Development and Test Oracle databases

Sat, 2018-01-13 19:07
You are probably reading this blog because your application depends on Oracle database. Most enterprises in the world depend on Oracle database to run their business. If you are a developer using Oracle database and getting started with Docker, you must be wondering how can you use a containerized Oracle database. 

In my last blog, I outlined how you can use a Dockerized Tomcat /Tom EE with an Oracle database. In this blog, I will describe how you can use Dockerized Oracle database for your development or test activities.

If you want to get started with Docker, review their getting started guide.

Getting Docker Images
Oracle provides Docker images for Oracle Database and you don't have to build using Dockerfile. You can get Oracle Database Docker images either from Docker store or Oracle Container Registry.

You have to register and accept licenses in Docker store or Oracle Container Registry.

In this blog, I will outline the steps required for the Docker image downloaded from Oracle Container Registry.

Login to Container-Registry 
You can log in to the Oracle Container Registry as follows:

docker login
Username :      

The Oracle Container Registry provides option to  download images for Oracle Standard or Enterprise Edition (

Note that the download may take several minutes or up to couple of hours based on your internet bandwidth. 
Download Oracle Database EE
If you want to download the docker image for Oracle Database Enterprise Edition, you can use the Docker pull command as follows:

docker pull

You will get output as below if the your command is successful: Pulling from database/enterprise
cbb9821ba51c: Downloading [>                                                  ]  1.599MB/81.5MB
9bd4d110366e: Downloading [>                                                  ]  1.067MB/143MB
af8b29651e27: Download complete 
4c242ab1add4: Download complete 
7bda1e55bd08: Downloading [>                                                  ]  1.599MB/2.737GB

Download Oracle Database SE
In my example, I am going to use Oracle Database Standard Edition. You can download the image for Oracle DB SE as below:

docker pull

You will see output as below:

Using default tag: latest
latest: Pulling from database/standard
Digest: sha256:fad41f7b4b885f13943872218a73c7f051e2caed0b5d5620d8f6f1287cf44918
Status: Image is up to date for

Download Issues
You will get authentication errors if you have not logged to the Docker registry.

Ensure that you accepted the Oracle license agreement in the Oracle Container Registry, otherwise you will get an error message as below:

Error response from daemon: pull access denied for database/standard, repository does not exist or may require 'docker login'

Checking Docker Images
You can check Docker images available by using the following command:

docker images | grep oracle           8                   daea2cf635d1        5 weeks ago         280MB   latest              fda46de41de3        4 months ago        407MB        latest              faa877d7fbdd        7 months ago        5.16GB

DB Config file
The Oracle DB container requires a configuration file where you can specify few parameters such as Database SID, Password, etc.

Here is the file that I used. As you can see I changed the default password and the domain for my database.


## db passwd
## default : Oracle


## db domain
## default : localdomain

## db bundle
## default : basic
## valid : basic / high / extreme
## (high and extreme are only available for enterprise edition)


Starting Database Container
You can start the Database container by using the command as shown below. If you have not downloaded the database image, then database image will be automatically pulled from the container repository. 

docker run -d --env-file -p 1521:1521 -p 5500:5500 --name orcldb --net appnet  --shm-size="4g" -v /Users/dpanda/orderapp2/orcl:/u04/app:/u04/app

The container will start and database will be ready to use within few minutes.

Reviewing Key Parameters 

Let’s review some of the key parameters I specified.

·       The --shm-size="4g" parameter sets the size of shared memory i.e. /dev/shm for the container to 4GB. 

·       The --name orcldb parameter sets the name of the container to orcldb. You can login to the container with that name or other containers can communicate to this container in that name when using SQLNet or JDBC. You can use this name to stop or remove the container.

·       The --net appnet is connecting the container to the bridge network named appnet.

·       The -v /Users/dpanda/orderapp2/orcl:/u04/app option lets the container map the /u04/app drive to the local volume (/Users/dpanda/orderapp2/orcl) of my MAC. This mapping allows the database to create the redo logs into my local drive. Also this will enable me run the SQL scripts that I have in my local drive to run inside the container.

You can check the status of the running containers by using the docker ps command as below:

CONTAINER ID        IMAGE                                             COMMAND                  CREATED             STATUS              PORTS                                            NAMES
9101006044e9   "/bin/sh -c '/bin/..."   2 minutes ago       Up 2 minutes>1521/tcp,>5500/tcp   orcldb
fccce8035b91        orderapp                                          " run"        46 hours ago        Up 46 hours>8080/tcp

As you can see, the orcldb container running my Oracle database started up 2 minutes ago.                           

Executing Commands in the Container
Now that the container is running you can run commands inside the container by executing docker exec command

You can login to the container as below and check whether things are set properly.

Note that these are purely optional steps and are not required.

1. Login to the Container

docker exec -it orcldb /bin/bash
[root@9101006044e9 /]# 

2. Switch Linux user to oracle user from root

su – oracle

Last login: Sat Jan 13 05:50:33 UTC 2018 on pts/0

3. You can check few things such as Oracle Environment Variables



4. Connect to SQLPlus 

sqlplus sys/welcome1 as sysdba

SQL*Plus: Release Production on Sat Jan 13 07:03:14 2018

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Standard Edition Release - 64bit Production


Accessing the Oracle Enterprise Manager Database Console

You can access the EM Console as https://localhost:5500/em

You can login with the user id as sys or system and password you specified in the file while starting the container. 

After you login you will see the Database Home Page as below. You can see the name of your container as your database host.

Your Dockerized Oracle Database is now ready for use! 

Try exploring until I next time !  We will see how you can run use SQLPlus with the Dockerized database.

Dockerize Tomcat/Tom EE and Oracle database applications

Fri, 2018-01-12 19:29

Docker ... Docker -- everywhere ..

Docker has gained quite a bit of popularity in simplifying operations for micro services applications. It also helps reduce cost of development and testing applications improves developer productivity it’s the portable characteristics and by allowing them to create local development environment that mimics production.

In this article, I will show how you can containerize or Dockerize a simple web application application that uses Apache Tomcat / Tom EE and Oracle database. This article assumes that you have Docker installed.

If you want to get started with Docker, review their getting started guide.

The Application
The following diagram shows the architecture for my application. I have several micro-services those are deployed in a separate Tom EE clusters and they depend on Oracle Database.  

In this blog, I will deploy all my micro services into a single container and these micro services depend on an Oracle database that is running in a separate container.  In my next blog, I will write about how to configure Oracle database in Docker.

In a future blog, I will show how you can deploy multiple services in different containers and how they can communicate with each other. 
Application Content 
Here are the war files that make different micro-services for my application.

Micro service
WAR running in Tomcat
Web front
Credit Card

Database Configuration
The micro services depend on a database running on a separate container named orcldb.  The database is connected to a Docker bridgenetwork named appnet.

Here is the content of the context.xml (DataSource configuration) that enabled Tom EE to connect to Oracle Database.

="jdbc/HRDS" type="javax.sql.DataSource"
          driverClassName="    "

Also Tomcat needs Oracle JDBC drive to connect to Oracle database and hence you need to deploy the JDBC driver (ojdbc6- in the $CATALINA_HOME/lib of the Tom EE server.

The Dockerfile – Building your Docker image

Let’s see how you can use Docker to build an image that contains all artifacts you need to run your application.

You can download the Dockerfile from GitHub

Following is the content of my Dockerfile. This downloads JRE image from Docker repository, Tom EE from Apache Maven and copies all application contents (WAR files), JDBC driver, context files. You have to make appropriate changes for your environment that includes the values in the context.xml and additional JARs you might need.

FROM java:8-jre

ENV PATH /usr/local/tomee7/bin:$PATH
RUN mkdir -p /usr/local/tomee7

WORKDIR /usr/local/tomee7

223D3A74B068ECA354DC385CE126833F9CF64915 \
    678F2D98F1FD9643811639FB622B8F2D043F71D8 \
    7A2744A8A9AAF063C23EB7868EBE7DBE8D050EEF \
    82D8419BA697F0E7FB85916EE91287822FDB81B1 \
    9056B710F1E332780DE7AF34CBAEBE39A46C4CA1 \
    A57DAF81C1B69921F4BA8723A8DE0A4DB863A7C1 \
    B7574789F5018690043E6DD9C212662E12F3E1DD \
    B8B301E6105DF628076BD92C5483E55897ABD9B9 \
    BDD0BBEB753192957EFC5F896A62FC8EF17D8FEF \
    C23A3F6F595EBD0F960270CC997C8F1A5BE6E4C1 \
    D11DF12CC2CA4894BDE638B967C1227A2678363C \
    DBCCD103B8B24F86FFAAB025C8BB472CD297D428 \
    F067B8140F5DD80E1D3B5D92318242FE9A0B1183 \

RUN set -xe \
     for key in $VALID_GPG_KEYS; do \
        gpg --keyserver --recv-keys "$key"; \

RUN set -x \
       curl -fSL -o tomee.tar.gz.asc \
         curl -fSL -o tomee.tar.gz \
     gpg --batch --verify tomee.tar.gz.asc tomee.tar.gz \
         tar -zxf tomee.tar.gz \
         mv apache-tomee-plus-7.0.4/* /usr/local/tomee7 \
         rm -Rf apache-tomee-plus-7.0.4 \
         rm bin/*.bat \
         rm tomee.tar.gz*
COPY *.war /usr/local/tomee7/webapps/
COPY context.xml /usr/local/tomee7/conf
COPY ojdbc6- /usr/local/tomee7/lib/
CMD ["", "run"]

Alternate Dockerfile with my local tar of TomEE

Here is an alternative Dockerfile that uses a Tar file that contains binary files for Tom EE version. 

FROM java:8-jre
ENV PATH /usr/local/tomee7/bin:$PATH
RUN mkdir -p /usr/local/tomee7

WORKDIR /usr/local/tomee7
COPY tomee7.tar /usr/local/tomee7
RUN tar xvf tomee7.tar
COPY *.war /usr/local/tomee7/webapps/
COPY context.xml /usr/local/tomee7/conf
RUN mkdir -p /usr/local/$host_name
COPY ojdbc6- /usr/local/tomee7/lib/

CMD ["", "run"]

Build Your Image

You have to change to your directory that has the Dockerfile and you can use the following command to build your image. This assumes that all files such as all .war modules, context.xml, JDBC JAR files are 

docker build . -t orderapp

You will output like this. This might take few minutes to pull/download images for JRE and Tom EE from Apache Maven.

Sending build context to Docker daemon  106.4MB
Step 1/16 : FROM java:8-jre
 ---> e44d62cf8862
Step 2/16 : ENV PATH /usr/local/tomee7/bin:$PATH
 ---> Using cache
 ---> 1f4e8721dfa6
Step 3/16 : RUN mkdir -p /usr/local/tomee7
 ---> Using cache
 ---> 353199e9f026
Step 4/16 : WORKDIR /usr/local/tomee7
 ---> Using cache
 ---> bc846fadf403
Step 5/16 : ENV GPG_KEYS 223D3A74B068ECA354DC385CE126833F9CF64915     678F2D98F1FD9643811639FB622B8F2D043F71D8     7A2744A8A9AAF063C23EB7868EBE7DBE8D050EEF     82D8419BA697F0E7FB85916EE91287822FDB81B1     9056B710F1E332780DE7AF34CBAEBE39A46C4CA1     A57DAF81C1B69921F4BA8723A8DE0A4DB863A7C1     B7574789F5018690043E6DD9C212662E12F3E1DD     B8B301E6105DF628076BD92C5483E55897ABD9B9     BDD0BBEB753192957EFC5F896A62FC8EF17D8FEF     C23A3F6F595EBD0F960270CC997C8F1A5BE6E4C1     D11DF12CC2CA4894BDE638B967C1227A2678363C     DBCCD103B8B24F86FFAAB025C8BB472CD297D428     F067B8140F5DD80E1D3B5D92318242FE9A0B1183     FAA603D58B1BA4EDF65896D0ED340E0E6D545F97
 ---> Using cache
 ---> a8c51cf94777
Step 6/16 : RUN set -xe     && for key in $GPG_KEYS; do         gpg --keyserver --recv-keys "$key";     done
 ---> Using cache
 ---> ea35e9b7b56c
Step 7/16 : RUN set -x && curl -fSL -o tomee7.tar.gz.asc    && curl -fSL -o tomee7.tar.gz     && gpg --batch --verify tomee7.tar.gz.asc tomee7.tar.gz     && tar -zxf tomee7.tar.gz   && mv apache-tomee7-plus-7.0.4/* /usr/local/tomee7   && rm -Rf apache-tomee7-plus-7.0.4 && rm bin/*.bat     && rm tomee7.tar.gz*
 ---> Using cache
 ---> 26089304122d
Step 8/16 : COPY *.war /usr/local/tomee7/webapps/
 ---> Using cache
 ---> d69955ca9ee3
Step 9/16 : COPY context.xml /usr/local/tomee7/conf
 ---> Using cache
 ---> fb8e27bf03b0
Step 10/16 : COPY server.xml /usr/local/tomee7/conf
 ---> Using cache
 ---> 2f613f7784a4
Step 11/16 : COPY /usr/local/tomee7/conf
 ---> Using cache
 ---> 5643d6775598
Step 12/16 : RUN mkdir -p /usr/local/$host_name
 ---> Using cache
 ---> acd8a6c8c765
Step 13/16 : COPY ojdbc6- /usr/local/tomee7/lib/
 ---> Using cache
 ---> c9ec6ee71283
Step 14/16 : COPY /usr/local/tomee7/bin
 ---> Using cache
 ---> cab1d0202a73
Step 15/16 : EXPOSE 8080
 ---> Using cache
 ---> 83a3d3559705
Step 16/16 : CMD run
 ---> Using cache
 ---> eab0027728a7
Successfully built eab0027728a7
Successfully tagged orderapp:latest

Starting Your Container

My image is now ready! You can see your images by using the following command:

docker images

The application connects to an Oracle database and the database is connected to a Docker bridge network named appnet and hence I have to connect the order app container I created in the previous step to the same bridge network. 

To create a bridge network, you have to use the following command

docker network create appnet

Let’s now start the container using the docker run command. Ensure that you have the –p parameter to map your container port to the port of your host where you are running container.

docker run -p 8080:8080 --net appnet  orderapp

Your container should start as below and you will see the standard output in the console.

11-Jan-2018 07:31:09.529 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["http-nio-8080"]
11-Jan-2018 07:31:09.547 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Starting ProtocolHandler ["ajp-nio-8009"]
11-Jan-2018 07:31:09.558 INFO [main] sun.reflect.DelegatingMethodAccessorImpl.invoke Server startup in 12272 ms

If you don’t want to see the standard output then ensure that you change the command parameter in the Docker file to instead of as follows:

CMD ["", "run"]

Your Container in Action
Now you should be able to access your application as below:

Apache Tom EE Home page: http://localhost:8080

Application Home page: http://localhost:8080/yourAppURI

Hope this blog helps to get your application Dockerized!

Oracle Management Cloud – An Overview

Tue, 2015-12-01 07:30
Most organizations are transforming themselves to digital enterprises, and IT plays a key role in this transformation. The ways applications are built, delivered, and consumed have significantly changed in the last few years. Organizations have adopted agile methodologies and delivering applications very rapidly, adopted hybrid Cloud, and many of the applications are now consumed from mobile devices. This transition poses a lot of challenges to IT Organizations, and they need new generation tools that can manage their applications and infrastructure.

Oracle Management Cloud is a suite of next generation integrated monitoring, management, and analytics solution for IT organizations that enables a real-time, collaborative environment in which all stakeholders have a clear end-to-end view to the applications and technologies that support business services. Oracle Management Cloud is a part of Oracle Cloud (platform) offerings.

Top Concerns for DevOps/IT Ops

The following figure shows the top concerns for DevOps/IT Ops.

Many organizations lose a lot of revenue and credibility due to unplanned application outages and they spend a lot of expensive hours in war rooms instead of focusing on innovation. Oracle Management Cloud aims to remove the unnecessary time spent in War Rooms by eliminating multiple information silos in management that exist across end user, applications, infrastructure, and machine data.

Oracle Management Cloud is designed for modern heterogeneous IT environment running either Oracle or non-Oracle software/infrastructure. It supports applications either deployed in on-premises, private cloud, Oracle Public Cloud or third-party cloud services.

Following are the three services available now:

I have summarized the high-level features supported by these services. I will write more about these services in future blogs.

Cloud Service
IT Ops
App Support
  • End User Monitoring
  • Server Request Performance
  • Application Topologies
  • Integrated Log Visibility
  • Integration with Analytics

IT Ops (DBA, MW Admin, Sys Admin)
App Support
  • Light Touch Data Aggregation of all kinds of machine data
  • Topology-Aware Exploration
  • Machine Learning
  • APM Integration
  • Dashboards

Business Analyst
Capacity manager
IT Ops
  • Analyze Resource Usage
  • Discover Systemic or common performance problems
  • Plan for the Future

Key Benefits
 Following are some of the few key benefits that you can get from Oracle Management Cloud:
  • Gain 360-degree insight into the performance, availability, and capacity of your applications and infrastructure investments
  •  Find and fix application issues fast by eliminating the unnecessary complex manual application monitoring processes and multiple toolsets
  • Improve efficiency of IT organizations by reducing dependence on large groups of IT staff participating in war rooms
  • Search, explore, and correlate machine data data to troubleshoot problems faster, derive operational and business insight, and make better decisions.
  • Makes IT organizations proactive by identifying systemic problems and capacity issues
  • Reduce Cost of Operations as these services are offered in the cloud and customers do not have to maintain any underlying infrastructure 

Here are links to few resources if you want to learn about Oracle Management Cloud

My OOW Session: IT Analytics for DBAs and Middleware Administrators

Wed, 2015-10-21 08:00
I have been presenting at Oracle Open World for past 15 years. I will be speaking at Oracle Open World 2015 again. My session is on a completely different topic and I will be showcasing an exciting new Cloud Service.  If you are a DBA or WebLogic Administrator and you are attending Oracle Open World 2015, you probably do not want to miss this exciting session!

You can use this following link to register to my session.

Tuesday, Oct 27, 5:15 p.m. | Moscone South—300

DBAs and middleware administrators need tools that go beyond monitoring to analyze their application infrastructure and get insight on resource capacity and performance bottlenecks to improve application performance and availability. Come to this session to learn about Oracle IT Analytics Cloud Service, the next-generation management cloud service built on a unified data platform and designed to help DBAs and middleware administrators plan for capacity based on real workloads and identify and remediate common problems across their database and application servers.

Oracle Management Cloud Launch Event

Mon, 2015-10-19 10:33
Wow… I have not blogged for a while. I joined back Oracle last year to work on an exciting new product named OracleManagement Cloud.  Oracle Management Cloud will be unveiled during Oracle World 2015.  If you are attending Oracle Open World 2015, don’t miss the opportunity to attend the exciting launch event on October 27, 2015 (Tuesday) 11am, presented by our SVP, Prakash Ramamurthy.

GEN9778 - Oracle Management Cloud: Real-Time Monitoring, Log, & IT Operations Analytics

Tuesday, October 27 at 11AM in Moscone South Room 102

Hereyou can find more about the launch event and Oracle Management Cloud.

Register for this event here

Poem: "Wrong Address" - a tribute to victims of Newtown massacre

Fri, 2012-12-21 13:49

When I dropped you off at the school last Friday
Your eyes were so bright
Face so charming;
You told me with your sweet voice
The weekend plans of your choice
The ballet class on Saturday
Bowling on friend’s birthday;
Helping your mom in Christmas shopping
Putting more decorations and lightings
Every itty-bitty thing that ran through your mind;
Without which I am deaf, dumb and blind.
You were so excited
To paint your walls blue and roof with red
And a new white bed
To match with the fury cat.
All your dreams and wishes
Shattered like glass
When the devil sprayed bullets in your class  
Death arrived at the wrong address
Making you an angel and driving us hapless.

I found a piece of your shattered dream
In your Barbie bag
 The incomplete Christmas drawing
Vivid and enigmatic;
Holding that your mom
Inconsolable and desolate
Sitting by the Christmas tree
Decorated by thee
 With colorful ornaments
Candy canes and reindeers
The shiny golden stars
How proud they are
That you have become a tiny star in the sky
To give light to the stranger who lost his way.

The mailman returned your letter to Santa Claus
Marking “Undeliverable address”;
You wrote in big letters
With your tiny hands 
Asked for a cute little brother
And a new dollhouse for you
A purse for your mommy
A new job for me
Happiness for your grandma
And world peace for your grandpa
Probably your letter arrived at wrong address
Saint of Death delivered your sacrifice as our present.
We are hapless
Powerless living cadavers
We forgive the devil for the sin
We cannot stop his toy named “Gun”!

I still miss
Your goodnight kiss
I want to cuddle you again
But I don’t know the address for heaven.

(Note: The recent massacre at Sandy Brook Elementary has probably broken everybody’s heart. I wrote this poem to express my feelings as a father as a tribute to the victims of that mindless killing. I do not know any victims personally)

What Customers expect in a new generation APM (2.0) solution

Tue, 2012-12-11 13:31
As an application owner, architect or application support personnel, you want to exceed service levels and avoid costly, reputation-damaging application failures through improved visibility into the end-user experience. The blog discusses some of the top features the new generation APM solutions provide that help you achieve your business objectives.

Here is the direct link to the blog.

Challenges with APM 1.0 product

Tue, 2012-12-04 11:38
Customers have been managing application performance since early days of mainframe evolution. However, Application Performance Management as a discipline has gained popularity in the past decade.

See my blog in BMC communities for challenges with old generation of APM products.

Here is the direct link :

JavaOne Next week

Wed, 2012-09-26 16:55
I will be at JavaOne next week. I have two sessions at JavaOne this year. Here are the details for these two sessions.

Session : BOF6019 - Diagnosing Performance Issues in Cloud-Based Java Applications
Venue / Room: Parc 55 - Market Street
Date and Time: 10/2/12, 17:30 - 18:15

Session : CON6173 - Making Sense out of the Java PaaS Platforms
Venue / Room: Parc 55 - Market Street
Date and Time: 10/2/12, 11:30 - 12:30

I hope to see some of you next week.

Are Java PaaS platforms ready for enterprise?

Thu, 2012-08-30 17:38
Cloud computing bubbles are still rising and there is a great hype for Java PaaS. Java PaaS vendors are still growing like mushrooms. Remember the good old early J2EE / EJB 1.0 days! They hold a lot of promise. Are they really ready for deploying enterprise grade applications? I spent few weeks looking at few Java PaaS vendors and I will present my thoughts at my JavaOne presentation.

Have you deployed your enterprise application in a Java PaaS? I would be interested to know your thoughts.

Here is a survey on Java PaaS

Best practices for building cloud based applications

Fri, 2011-03-25 00:07
I wrote another article outlining some best practices for building cloud based applications. You can read the article at

I am writing this blog using my iPad and blogger is not iPad friendly

Cloud Computing for Java Developers

Mon, 2011-03-21 13:38
I wrote an article Java Cloud Development: What Developers Need to Know at This provides an introduction to Cloud Computing from Java Developers perspective. You can read the article here.

EJB 3 In Action, 2nd Edition

Thu, 2011-03-17 00:00
The second edition of EJB 3 In Action was announced recently. Ryan Cuprak joined as a new author of the book. Ryan and Reza are doing most of the work on the book. We have made a lot of changes in the content to include EJB 3.1 and other Java EE features such as CDI.
Here is the table of contents for the book:

Part I: Overview of the EJB landscape
1. What's what in EJB 3.1
2. A first taste of EJB 3

Part II: Working with EJB 3 components
3. Building business logic with session beans
4. Messaging and message-driven beans
5. EJB runtime context, dependency injection, and aspect oriented programming
6. Transactions and security
7. Scheduling and timers in EJB
8. Exposing EJBs as SOAP and REST web services

Part III: Using EJB 3 with JPA and CDI
9. JPA entities
10. Managing entities
11. Using CDI with EJB 3

Part IV: Putting EJB 3 into action
12. Packaging EJB 3 applications
13. EJB 3 testing
14. Designing EJB-based systems
15. EJB performance and scalability
16. EJB 3, Seam, and Spring
17. The future of EJB 3

A. RMI primer
B. Migrating from EJB 2.1 to EJB 3
C. Annotations reference
D. Deployment descriptors reference
E. Installing and configuring the Java EE 6 SDK
F. EJB 3 developer certification exam
G. EJB 3 tools support

The book is available on Manning Early Release Program. You can join MEAP and help improve the program

Webinar: Event Processing for Java Developers

Mon, 2010-11-08 11:00
I'll be speaking at a webinar Event Processing for Java Developers arranged by Starview Technology, Inc tomorrow (Nov 9) at 10am PST. Register here.

Introducing an Event Server Platform

Thu, 2010-11-04 15:30
After working for about seven years shaping and evangelizing for a Java Application Server platform and J2EE, I decided to move on. For the last year or so I’ve been spending my energy shaping up the next-generation middleware platform for building, deploying, and managing event-processing applications.

Most vendors have focused on providing limited functionality such as windowing, filtering, and pattern matching, often known as Complex Event Processing (CEP).These vendors have also been targeting limited use cases in the Financial Services sector. As CEP did not take off, many vendors have buried their offerings inside their SOA and BPM solutions. However, I think event processing is pervasive inside all businesses. Whenever you tweet or send a text/sms it generates an event. Whenever you plug in your electric vehicle to the grid, whenever you have a power outage, or whenever a machine breaks down in a factory – events are generated. A smart business needs to analyze and exploit these messages to make the right decision to take the right decision at the right time. Many of the new generation of applications are being built using an event-driven paradigm and need a new generation of middleware platform named an Event Server Platform. In this article, I will introduce an event server platform.

What is an Event Server?

Why do you use an application server? Because you do not want to reinvent the wheel and take advantage of several services the application server provides to quickly build your application. An event server provides similar functionality for users to rapidly build and deploy event-processing applications – optimized for event processing. I will discuss why traditional application servers are not suitable for event processing in a future article. One of the key points here is that traditional application servers are optimized for request-response applications and not for event processing.

In all practical senses an event server is an application server optimized for event processing applications. Let us look at an example architecture. The following figure shows the architecture for the Starview Event Server that is built on OSGi:

You have to build an application before you deploy it to an event server. So you need tools and languages to build an application.

Development Tool

You will need to build, test, and debug your event-driven application and hence you will need an IDE. Here is an example of Starview ACE that uses a model-driven approach to build an event-driven application. Starview ACE is an Eclipse plug-in and application models are based on the Eclipse Model Framework:

Connectivity Adapters

You will need to capture an event stream at its source and in-bound adapters provide this connectivity. The event source can be a messaging system, SNMP traps, socket reader, log files, database updates, and so on. An event server provides out–of-the-box adapters to simplify reading event sources without much programming. The adapters also generate outbound events or integrate with third-party systems and resources for correlating events.

Programming Language aka Event Processing Language

In order to process the events you need an Event Processing Language. The CEP vendors often refer to Stream SQL as their EPL. However, as you know SQL is quite limiting in nature and you will need the full semantics of a programming language built for event processing that provides fast and efficient in-memory structures to represent complex data types, andin-stream processing and analytics. The Event Processing Language must provide the ability to maintain state and support the concept of an event-processing agent for implementing complex event-processing rules.

Also, you do not want your event-processing rules to be static in nature: you want to enable your business users to author rules. Hence the programming language must provide a foundation to develop Domain-Specific Languages.

Here is a typical architecture for such an Event Processing Language:

This diagram shows the architecture for the Star language.

You may ask, “where is Java in this equation?” The event servers must integrate with existing Java applications, and provide the ability to build applications using Java. You have to remember, though, that Java has its limits and you have to explore the capabilities provided by Event Processing Languages.

Distributed Application

Many of the event processing applications are distributed in nature and require event processing at the edge. These are prevalent in many use cases such as Quality of Service, Smart Grid optimization, and manufacturing automation, where you want to process events locally and filter out unnecessary events at the edge. The event server platform must provide mechanisms to deploy a lightweight version of the event server at the edge and collaborate with a centralized event server without requiring hundreds of lines of code!

Management Infrastructure

You need a good management infrastructure for managing your event servers and applications. This becomes challenging when applications are distributed in nature. The management infrastructure should provide the ability to deploy, manage, and monitor applications, event servers, and server groups. And the infrastructure must be built using an event-driven paradigm.

The following screen shot shows the management console for Starview Enterprise Hub that provides such a management infrastructure:

These are the basics of an Event Server Platform. You will several advanced features such as high-availability, caching, etc.

We will discuss some of these topics in detail in future blog entries.

References and Suggested Reading

SOA Management - Sample Chapter from Middleware Management Book

Tue, 2010-01-12 14:11
Oracle Technology Network published sample chapter SOA Management (Oracle Service Bus) of my Middleware Management book.

You can access the chapter at

This book covers management of both Oracle Fusion Middleware (WebLogic/OC4J, SOA Suite, IDM, Coherence, Forms/Reports, etc. and non-Oracle Midddleware such as JBoss, Tomcat, Apache Http Server IBM WebSphere and Microsoft .Net/IIS, etc

You can purchase the book at Amazon at

Also see details at

Should Java be free from Sun/Oracle?

Wed, 2009-11-18 00:17
There was an interesting blog from SAP CTO “Freedom of Java”! He has a very absurd comparison of freeing Java from Sun/Oracle’s clout with falling of Berlin wall. Should we free Java from Sun? My answer is an emphatic No! I have been a Java enthusiast for about a decade. Although I never liked Sun’s control over Java/JCP, I have to admit that Java flourished under Sun’s stewardship. I hope Sun/Oracle will continue the leadership in taking Java to the next level. Oracle once claimed they support 300% Java! As an ex-employee of Oracle I know that Oracle’s business is completely dependent on success of Java, all of fusion middleware, applications, management products (enterprise manager) developed in Java. Oracle cannot gamble or bungle on Java. SAP’s concern seems to be too unjustified and seems to be politically motivated.

They are suggesting that Java/JCP should be freed from Sun/Oracle and controlled by some independent consortium (Java foundation) and have volunteered to throw money, time and energy behind Java. I don’t think SAP has contributed much to Java community in the past 15 years, besides furthering its own NetWeaver platform to attract developers to their proprietary application platform.

Interestingly enough they claim to have Java EE 5 certification for past two years. Note that Java EE 5 was finalized about two and half years back. I think they still do not have a production version of application server that supports Java EE 5. I could not find in their website about their production support even for J2EE 1.4. Their website still claims support for J2EE 1.3 as shown below:

They still have a developer preview for Java EE 5 at

How can we believe that SAP will pump millions of dollars to an open consortium to support Java’s future growth when they have not invested money to build an application server that supports latest Java standards? I think they are just playing a devil’s role here to complicate matters with Oracle’s pending acquisition of Sun.

Without strong leadership, Java will perish. If we leave it to open source then it may fork and we will end up with several Java flavors and that will be a death blow to Java. Sun has invested billions of dollars on research, development and building the community around Java and should control it. If Oracle’s acquisition of Sun succeeds then Oracle should control Java/JCP, if it fails for some reasons then who should take over Sun (if SAP does!) should own Java!

That’s my 2 cents!

Book: Middleware Management with Enterprise Manager Grid Control

Tue, 2009-10-06 23:46
I coauthored another book Middleware Management with Oracle Enterprise Manager with Arvind Maheshwari. This covers managing both Oracle Fusion Middleware and non-Oracle Middleware such as IBM WebSphere, JBoss, Microsoft Middleware with Oracle Enterprise Manager.

My JavaOne Presentation:

Tue, 2009-06-02 13:24
I'm co-presenting with my co-author (EJB 3 In Action) Reza Rahman on JPA Application Tuning.

Here are details for the talk:

TS-3977 -Keeping a Relational Perspective for Optimizing the Java™ Persistence API

Thursday June 04 4:10 PM - 5:10 PM Hall E 134

If you are attending JavaOne this year, please attend the presentation. Also we have a book signing scheduled tomorrow (Wednesday June 3, 2pm at Java Book Store) so stop by if you want your book to be signed