Thursday, November 17, 2011

How to Play / Embed Flash .swf file in Oracle ADF application

Share this Post

I got this questions couple of times so i decided to write another quicky here. You can play flash in 2 ways
  • Using af:inlineFrame component 
  • Using af:media component
As an example we have .swf file in your imgs folder as shown in the slide

The difference would be af:inlineFrame will show the flash on page

af:media will display it as a link (unless you have a video as source) clicking on the link will open flash file

The output would be similar as follows

Have a nice day,
Zeeshan Baig

Tuesday, November 15, 2011

Book Review: Oracle Weblogic Server 11g Administration Handbook By Sam Alapati

Share this Post

Here is my first book review Oracle Weblogic Server 11g Administration Handbook by Sam R. Alapati.

Where to get the book:
You can buy the book from following suppliers
Oracle Weblogic Server is a huge subject and this book covers a lot about it from installation, configuration, managing, deployment to securing topics.
Book is almost 500 pages and has lot of detailed topic and sometimes it overwhelm the reader but that is the requirement of the handbook it has be to be in detailed.

Structure of the book:
Topics are mostly explained in detail first then provided step by step instructions to configure with screen shots.

Chapter wise Review:

Chapter 1: Installing Weblogic Server and using Management Tools
First chapter will take you through a journey with weblogic terminologies then installation, un-installation, re-instillation, upgrade of the product later it touches different sections of weblogic administrator console as well as using WLST (Weblogic scripting tool).

Chapter 2: Administering Weblogic Server Instances
This chapter starts with setting up weblogic environment, node manager configuration including how to setup node manager to run as windows service was a treat. The real deal of this chapter is it covers various ways to start and stop weblogic server instances in a great detail.

Chapter 3: Creating and Configuring Weblogic Server Domains
As title said this chapter covers creating and configuration of weblogic server domains. Author showed us various techniques to create a domain templates using command line as well as GUI covering Admin, Managed Servers with clustering. Later part of the chapter explains about configuring the environment including persistent store, HTTP server, weblogic proxy plug-in, virtual host and backing up the domain.

Chapter 4: Configuring Naming, Connections, Transactions and Messaging
With this chapter you moved into the day to day practical stuff for weblogic. Chapter covers JNDI, directory, data sources, JMS and java mail configurations.

Chapter 5: Configuring Weblogic Server Environment
This chapter touches topics with thread management and work managers mostly used for load distribution in weblogic environment.

Chapter 6: Monitoring and Troubleshooting Weblogic Server
This chapter explains through different diagnostic options weblogic provides, It covers JRockit flight control and new weblogic monitoring dashboard console. Later part of the expert explain troubleshooting with weblogic administration console, logging, thread and memory management. 

Chapter 7: Working with Weblogic Server Clusters
Weblogic clusters is the most important feature for real world projects and this chapter did a justice with it, as the title says it covers the clusters architectures, configuration, deployments and management. later part of the chapter covers weblogic load balancing and failover capabilities

Chapter 8: Understanding Weblogic Server Application Deployment
This chapter covers application deployments starts with application types. deployment tools like weblogic.Deployer, Admin console, WLST, wldeploy Ant. The chapter also covers the deployment plans and monitoring applications as well.

Chapter 9: Managing Weblogic Server Security
Weblogic security is a deep sea and with this chapter get ready to take a scuba dive. Chapter covers from basic info to security realm, providers, users, groups, roles, policies and at the end author explain in detail configuring SSL to trust between different weblogic domains and chapter ends with weblogic best practices.

Chapter 10: Weblogic Server Performance Tuning
The book ends with the encore weblogic performance tuning in detail like thread management, JVMs, garbage collections, persistent stores, JDBC datasource pools, JMS and little intro about Oracle Coherence.

About the Author:
Sam R. Alapati is an Oracle ACE and has written many books on Oracle technologies on different topics and have many years of experience in the industry. He blogs at and have twitter account

Final Thoughts:
I think the book shares a valuable knowledge for professional who wants to get in to weblogic server admin chair as well as consultants, developer who likes to get familiar with typical concepts of weblogic world.

I have this is in my shelf and this book helped me to tune my current weblogic environment and i definitely this a recommend read and i hope you will get this too

Have a nice day,
Zeeshan Baig

Saturday, November 12, 2011

How to Right Align Column Data in af:table Footer

Share this Post


When you display any data in footer facet of  af:column (or af:table) in af:table by default the data aligns to left even you set the af:column align property to right as shown in the following slide.


Solution is simple all you need is to wrap your data with af:panelgrouplayout

  • set Halign = "right"
  • layout="horizontal"

The output would be similar as shown in the slide

Thursday, November 10, 2011

User Lockout feature in Weblogic Server

Share this Post


In real life projects generally we use LDAP server possibly Microsoft Active Directory (AD) to authenticate and authorize Users security.

One common security policy is to lock the user account after few invalid attempts for some period of time. As a end user and system administrators you think that this is responsibility of  LDAP authentication provider which makes sense.

One should be aware of that in addition to LDAP authentication provider weblogic server also has a user lockout feature which actually locks the user at weblogic level as well when end user tries 5 invalid login attempts  for 30 minutes this is the default behavior.


  • We have default weblogic User lock settings enabled

  • User zbaig tries 5 invalid login attempts and got "Invalid username or password" message in the application

Solution 1 Unlock the user in Weblogic Server:

  • To allow zbaig to login again we need to either wait 30 minutes or unlock the user (default behavior or you can change the settings as per your requirement)
  • To unlock user from weblogic server 
  • Click on your domain name on the left pane in domain structure
  • Go to security tab then unlock user tab 
  • Enter username you want to unlock and press save

  • Try again with user zbaig you will see the welcome page of the application

Solution 2 Disable weblogic locking feature:

  • To allow Active directory to control user account lock and unlock you can disable this feature as shown in the following slide
  • Remove Locked Enabled check box and restart all managed servers including AdminServer

Final thoughts:
Personally i would go for solution 2 for ease of administration in large numbers of users this solution also helps if you have other single sign on solutions for many domains like Oracle access manager OAM.

If you are using embedded LDAP server of weblogic then solution 1 is your only choice :)

Have a nice day,
Zeeshan Baig

Tuesday, November 8, 2011

Configuring Oracle Forms11gR2 for Development Environment

Share this Post

In this video we will see how to configure the latest and greatest Oracle Forms11gR2 for development environment.

To follow this video you first must install products in following order

  1. Oracle Weblogic 10.3.5
  2. Oracle Forms11gR2 (Do not configure Just install)
I will post the videos of above steps later.

Hope you like the video,
Zeeshan Baig

Thursday, November 3, 2011

Oracle ADF How to get Managed Server name in Java

Share this Post

A little quicky here. If you want to know which managed server is your application currently running at you could use the similar code.

This code could be useful in cluster environment fail-over test. (I will cover in separate post)

1. Create a backing bean with request scope with following methods

    public String retrieveManagedServerName()
           String instance = System.getProperty("weblogic.Name");
           return instance;

       public String getManagedServer()
           return retrieveManagedServerName();

2. Use the method as value of af:output text

Have a nice day,
Zeeshan Baig