Monday, 23 September 2013

Weblogic Basic Interview Questions

1. What is Weblogic?
Weblogic is a server software application that runs on a middle-tier between the Database and related applications and browser-based thin clients.
Weblogic is a leading e-commerce online transaction processing (OLTP) developed to connect users in a distributed computing environment and to facilitate the integration of mainframe applications with distributed corporate data and applications.

2. What is Administration Server?
Administration server is weblogic server instance that maintains configuration data for a domain.
You can deploy your application on administration server but it is recommended to create managed server
and deploy your application in managed server and leave Administration server for configuration and maintenance. 
In weblogic, each domain will have one Administration Server and Multiple Manage servers.

3. What is Managed server?
Any weblogic server instance apart from administration server is called as Managed servers.
Though you can deploy your application in Administration server as well but it is not recommended in production/UAT instance. so, you can deploy your application in Managed server for high availability.

4. What is Node Manager?
Node manager is a weblogic server utility that enables you to start, shut down, and restart administration server and managed server instances from a remote location (weblogic console).
There are two types of Node manager . 1)Java-Based Node manager 2)Script-Based Node manager.
Java-Based Node manager:Java-based Node manager runs within a Java Virtual Machine (JVM) process.
It is recommended that you run it as a Windows server and VBox UNIX platforms.
Script-Based Node manager:For UNIX and Linux systems, Weblogic Server provides a script-based version of Node manager.
5. What are the Important configuration files in Node Manager?
The following are the important configuration files is Node manager. 
Nodemanager.properties:This is the configuration file used by the Java-based version of Node manager.
This file is located in
 WL_HOME/common/nodemanager.
startup.properties:Each Managed server instance has its own
 startup.properties file with properties that control how           Nodemanager starts up and controls the server.
Nodemanager automatically creates this file by using properties passed to Nodemanager when the
Administration Server was last used to start the server.
This allows a Nodemanager client or startup scripts to restart a Managed server using the same
properties last used by the Administration Server.
Nodemanager.domains:This file contains mappings between the names of domains managed by Nodemanager and their corresponding directories.
This file is located in
 WL_HOME/common/nodemanager.
nm_data.properties:This file stores the encryption data the Nodemanager uses as a symmetric encryption key.
This file is located in
 WL_HOME/common/nodemanager.
nm_password.properties:This file stores the Nodemanager username and password.
This file is located in
 DOMAIN_HOME/config/nodemanager.
boot.properties:Nodemanager uses this file to specify user credentials when starting a server.
This file is located in
 DOMAIN_HOME/servers/server_name/data/nodemanager.

6. What is Cluster in Weblogic ?
Group of Weblogic Managed Server Instances that work together to provide high availability and scalability for applications is called cluster. Weblogic Servers with in cluster can run on same machine or different machines. These are also called as managed Server cluster.
7.What are the prerequisits for webloic installation?
Selected OS(Including RPM's), JDK and Weblogic software.
8.What are the prerequisits for installing database for weblogic ?
      character set              :  AL32UTF8 character set
      Shared Pool Size        : 144 MB
      SGA Maximum Size   : 144MB
      Block Size                 : 8KB
      Processes                  : 500
9. What is Garbage collection?
Garbage collection (GC) is a form of automatic memory management. The garbage collector attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.
10. How to Increasing JVM Size (heap size) of Admin Server?
JVM size of Admin server can be increased by changing Xmx and Xms  values in setDomainEnv.sh
which is located in $MW_HOME/user_projects/domains/base_domain/bin

11. What is RCU? why we are Installing RCU?
RCU is Repository creation utility. RCU provides the flexibility to create custom schemas and tablespaces in databse. You can choose to rename schemas, or change the tablespace allocation so that components can share a single or multiple tablespaces. In addition, auxiliary schemas can be mapped to additional tablespaces.

12.Difference between the production mode and development mode in Weblogic server?
Development Mode:
  ü  The Default JDK for development domain is Sun jdk.
  ü  you can use the demo certificates for SSL.
  ü  Auto deployment is enabled.
  ü  server instances rotate their log files on startup.
  ü  Admin server uses an automatically created boot. Properties during startup.
  ü  The default maximum capacity for JDBC Data source is 15.
Production Mode:
  ü  The default JDK for production domain is JRocket.
  ü  If you use the demo certificate for SSL a warning is displayed.
  ü  Auto deployment is disabled.
  ü  server instance rotate their log files when it reaches 5MB.
  ü  Admin server prompts for username and password during startup.
  ü  The default maximum capacity for JDBC Data source is 25.

13. What is Domain?
Domain is a collection of logical grouping of resources and services and consist of Administration server, Managed server and cluster. There can only be one admin server and zero-n Managed servers in domain. These total domain information is stored in config.xml file.

14. What is config.xml file?
  ü  This file specifies the configuration of each server instance, cluster, resource and services in the domain. This file located in MW_HOME/user_projects/domains/doamin_name/config/config.xml(DOMAIN_HOME/config/config.xml).
  ü  Each time the Administration server starts successfully, a backup configuration file config.xml booted file is created in domain directory.

15.How many modes of Installation of Weblogic server?
There are Three modes of Installations of Weblogic server.
  ü  Graphical Mode:
 Windows>double click on .exe file.
Unix > chmod a+x filename.bin /filename.bin;
  ü  Console Mode:
Windows>WLServerXXX_win32.exe -mode=console
Unix> chmod a+x filename.bin /filename.bin -mode=console;
  ü  Silent Mode:
Windows> WLServerXXX_win32.exe -mode=silent -silent_xml=path_of_silent.xml
Unix>chmod a+x filename.bin -mode=silent -silent_xml=/path_to_silent.xml -log=/home/logs/ platform_install.log;

16. How many ways to startup the Weblogic server?
Weblogic server can be started in the following ways:
  ü  startWeblogic.sh
  ü  Using WLST and ANT scripts.
  ü  Node manager
ü  Weblogic.Admin start command


17. How many types of clustering are there in Weblogic server?
There are Two types of clustering:
1.Vertical clustering.
2.Horizontal clustering.
Vertical clustering:
Group of available weblogic server instances in a single physical machine as cluster is called vertical cluster.
Horizontal clustering:
Grouping of multiple application servers that are run on two or more different physical machines is called Horizontal clustering. It is more reliable than vertical clustering.

In Real Time: Basic Tier cluster with horizontal mc1, mc2.

18.How Weblogic server instance methods to communicate in a cluster and how server detect failure?
Weblogic server instance in a cluster communicate with the following Network technologies:
1)Sockets Communication
2)Heart Beat Communication
Socket Communication:
(one to one or peer to peer) each server instance will communicate with IP socket programming for sharing the information.
Heart Beat Communication:
each server will communicate with the cluster by sending the heart beat for every 10 sec. If does not receive a heart beat from the server for 30 seconds or longer, the monitoring server makes the peer server as "failed".

There are two types of Messaging modes for external communication systems:
1)Unicast Messaging Mode
2)Multicast Messaging Mode
Unicast  Messaging Mode:
Here we have three servers (MS-1,MS-2,MS-3) in a cluster now if they have to communicate with each other            they have to ping (i.e. heartbeats ) the cluster master for informing him that he is alive.
If MS-1 is the master then MS-2 and MS-3 would send the ping to MS-1
Multicast Messaging Mode:
Here there is no cluster master each server has to ping each other to inform everyone that I am alive.
So MS-1 would send the ping to MS-2 & MS-3 same way MS-2 would send the ping to MS-1 & MS-3 and MS-3
would ping MS-1 & MS-3.
Thus if you see in multicast the congestion in sending the pings are more compared to unicast which makes
 multicast much heavier, thus WLS recommends using Unicast of less congestion in the network.
(congestion=overcrowding)

 19. What are the Different states of Server Lifecycle?
Starting state:
When we issue any type of startup command the server instance transitions from the SHUTDOWN to the STANDBY state. During the STARTING state the instance reads the domain configuration data from its config directory, whereas the Managed Servers will get their configuration data from the Admin Server.
Standby state:
During this state all ports are closed, but you can quickly transition to a RUNNING state from here, so this state could be used to keep a server in a hot STANDBY mode.
Admin state:
The ADMIN state permits only administrative tasks such as deploying applications, with those applications being able to process only requests from users with the Admin and AppTester roles.
Resuming state:
This is a purely transitional state the server instance goes through after it transitions automatically through the ADMIN state or you issue the resume command after first placing the instance in the STANDBY or ADMIN state.
Running state:
During the RUNNING state that the server can accept and service client requests for its services.

20. What is WLST?
The Weblogic Scripting Tool (WLST) is a command-line scripting interface that system administrators and operators use to monitor and manage Weblogic Server instances and domains. The WLST scripting environment is based on the Java scripting interpreter, Jython(pure java implementation of python).
Command for Invoking WLST:java>bin>java weblogic.WLST  c:\myscript.py
There are Two types of connection modes:
1)Offline Mode:
WLST helps you to create and extend a domain, and  create domain templates. In offline mode, WLST acts as an interface to the Node Manager and you can issue WLST commands to start and stop Managed Server instances without connecting to the Admin Server.
2)Online Mode:

WLST in online mode acts as a Java Management Extensions (JMX) client that manages the domain’s resources by modifying the server’s Configuration MBeans. Thus, WLST offers you all the domain management configuration capabilities as the Administration Console.

Friday, 20 September 2013

Basic concepts of WebLogic Server

  •  Domain

Domain is a logically related group of WebLogic Server resources that you manage as a unit. A domain always includes only one instance of WebLogic Server called the Administration Server. Administration Server serves as a central point of contact for server instances and system administration tools.
A domain may also include additional WebLogic Server instance called Managed Servers.
wls1
•All domain configuration information is stored in config.xml.Attributes in config.xml are stored a ConfigMbeans within the memory of Admin and managed server.
• Server startup:
Admin server: The server as part of its startup process, would parse the config.xml and create Mbeans.
For eg: <Server ListenPort=”7001″ Name=”myserver”/>
From the above entries, myserver instance would create a ConfigMbean of type ServerMbean object with attributes ListenPort=7001 and name=myserver
 •Administration Server
Admin server is just another server instance but with added unctionality.Admin server is equipped with the functionality to drive the deployment (master deployer), monitor the managed servers etc. All the weblogic.Admin utility commands are initiated from Admin server. Admin server would act as central point for managing the domain.
• Managed Server
Managed server would connect to admin server via http connection and gets a copy of config.xml file and creates the related Mbeans. These Mbeans exists in memory of server for the life time.Once managed server has started up successfully, we do not need Admin server. The application hosted on managed servers can be accessed irrespective whether or not Admin server is up and running. Admin server would be needed for deployments, any administrative activity like accessing the console etc.
wls2

• Managed Server independence Mode
Managed server can also start without Admin server if MSI mode is enabled. In this mode, managed server would look for file “msi-config.xml” under its root directory. It creates Mbeans out of msi-config.xml to startup successfully.
msi-config.xml will be created/copied to managed server by admin server (If MSI replication is enabled- from Admin console)
• Production Vs Development modes
Weblogic Server can be started in development mode or production mode.In dev mode, there is an application poller.This is a simple utility that polls the “<domain>/applications” directory every 3secs (default).If it finds a different version of application in the directory, then weblogic would redeploy the app automatically.Obviously there is a little bit of overhead involved, but this is  justified for dev  environment.In production mode application poller is turned off.User would either have to deploy from console or run  weblogic.Deployer utility.
• Domain-Wide Administration Port
This is an optional feature available that would help in segregating the admin traffic with application related traffic.A different port has to be configured and all admin tasks (including accessing Admin console) are picked up from the configured port.
The cons for this setup are:
1.The Administration Server and all Managed Servers in your domain must be configured with support for the SSL protocol.
2.After enabling the administration port, all Administration Console traffic must connect via the administration port.
• Admin Server recovery
If Admin server machine is down and if we need to migrate to another machine:
1) Backup Config.xml file
2) Backup security data (ldap directory & SerializedSystemIni.dat)
Replace these files in the new domain and start the Admin server.The new Admin server will automatically reconnect with running managed servers Also,
•Managed Servers within the domain can be at different Service Pack levels as long as the Admin Server is at the same Service Pack Level or higher than its Managed Servers.
•All servers that are part of cluster should be of same service pack level.
• WebLogic internal applications
WebLogic has some internal applications deployed by default to perform some of internal activities.
console.war – weblogic Admin console is a webApplication deployed only on Admin server.
FiledistributionServlet: This servlet takes care of communication activities between Admin and managed server.(Deployment, managed server startup etc)
Eg:During deployment, this servlet takes care of copying the application on to all managed servers staging directory.

Oracle SOA 11g installation on Weblogic 11g

Oracle SOA 11g installation on Weblogic 11g
Assumptions:
This article assumes you have an existing server (real or virtual) with Oracle Linux 5.x. installed on it. Here i did the basic Installation of Oracle Linus 5.7 with no extra package groups for this installation.And after Linux you have to Install 11g database.
Everything in the installation will be 64-bit.
Software:
Download Weblogic Server & JDK from following links :
The following actions should be performed by the “root” user.
Make sure the “/etc/hosts” file contains correct entries for both the “localhost” and real host names.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.20 fmw.oracle.com fmw
Install the JDK.
Go to the software location which you have copied and run the jdk directly as below as a root user
[root@fmw ~]$cd /u01/FMW
[root@fmw oracle]# ./jdk-6u38-linux-x64-rpm.bin
Create a new group and user:
You will create this user and group already while doing 11g Installation, so no need to do this step
[root@fmw ~]# groupadd -g 1000 oinstall
[root@fmw ~]# useradd -u 1100 -g oinstall oracle
[root@fmw ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Create the directories in which the Oracle software will be installed.
[root@fmw ~]# mkdir -p /u02/app/oracle/middleware
[root@fmw ~]# chown -R oracle:oinstall /u02
[root@fmw ~]# chmod -R 775 /u02/
Append the following entries into the “/home/oracle/.bash_profile” file.
[root@fmw ~]#su – oracle
[oracle@fmw ~]$vi .bash_profile
MW_HOME=/u02/app/oracle/middleware; export MW_HOME
WLS_HOME=$MW_HOME/wlserver_10.3; export WLS_HOME
JAVA_HOME=/usr/java/jdk1.6.0_38; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH
Installation
Go to the location where you have copied the weblogic software
[oracle@fmw ~]$cd /u01/FMW
Run the installer as the “oracle” user.
[oracle@fmw ~]$$JAVA_HOME/bin/java -Xmx1024m -jar wls1036_generic.jar
Click the “Next” button on the welcome screen.
jdk1
Enter the middleware home (“/u01/app/oracle/middleware”) and click the “Next” button.
jdk2
Either enter your support details, or attempt to uncheck the security updates checkbox. The box doesn’t actually uncheck, but presents you with a warning dialog.If you click the “Yes” button, indicating you don’t want updates, you are returned to the same screen with the box still checked. Click the “Next” button anyway.
jdk3
Assuming you don’t want security updates, click “Yes” and “Yes” on the subsequent warning dialogs and you are presented with the “Connection Failed” screen.Check the “I wish to remain uninformed…” checkbox and click the “Continue” button. This whole process is very confusing at first. Obviously the developers responsible didn’t really expect people to say no to security updates!
jdk4
Accept the typical setup by clicking the “Next” button.
wls5
Accept the default JDK selection by clicking the “Next” button.
jdk6
Accept the default product installation directories by clicking the “Next” button
jdk7
If you are happy with the summary information, click the “Next” button and wait while the installation completes
wls9
On the installation complete screen, uncheck the “Quickstart” checkbox and click the “Done” button.
wls10
Installation of RCU:
go to <rcu_home> which you have unzipped the RCU zipfile
[oracle@fmw ~]$cd /rcu_home/bin
[oracle@fmw ~]$./rcu
rcu1
Click Next
rcu2
Select Create and Click Next
rcu3
Fill the details of your database here as shown above screenshot and click Next
rcu4
Click Ok
rcu5
Create a new prefix as “FMW” and default will be DEV, Select SOA and BPM Infrastructure as shown in the above screen shot and click Next
rcu6
Click ok
rcu7
Select Use Same passwords for all schemas :  <your password> and click Next
rcu8
Click Next
rcu9
Click Ok
rcu10
Click ok
rcu11
Click Create
rcu12
Click Close
Installation of SOA:
Go to the software location where you have copied and unzipped the SOA suite software
Here I have copied software to “/home/oracle/sw” location
[oracle@test ~]cd sw
[oracle@test ~]cd soa/Disk1
[oracle@test ~]pwd
/home/oracle/sw/soa/Disk1
[oracle@test ~]./runInstaller
Please specify JRE/JDK location (Ex. /home/jre), <location>/bin/java should exist:/usr/java/jdk1.6.0_38/jre
soa1

soa2
Click Next
soa3
Select Skip Software Updates and click Next
soa4
Click Next
soa5
Fill the Middleware home details
Oracle Middleware Home: /u02/app/oracle/middleware
Oracle Home Directory: Oracle_SOA1
and Click Next
soa6
Select Weblogic Server and click Next
soa7
Click Install
soa8
Click Next
soa9
Click Finish
Creation of Domain:
[oracle@test ~]cd /u02/app/oracle/middleware/wlserver_10.3/common/bin
[oracle@test ~]pwd
/u02/app/oracle/middleware/wlserver_10.3/common/bin
[oracle@test ~]./config.sh
domain1

domain2
Select “Create a new Weblogic domain” and click Next
domain3
Select products as shown in the above screen shot and click Next
domain4
Fill the details
Domain name: soa_domain
Domain location:/u02/app/oracle/middleware/user_porjects/domains
Application location:/u02/app/oracle/middleware/user_porjects/applications
and click Next
domain5
Fill the details
Name: weblogic
User Password: Oracle123
Confirm user password: Oracle123
and click Next
domain6
select which type of Mode you want either Development or Production Mode,
and check whether the correct JDK is selected or not and click Next
domain7
Select Each Schema and fill the details
domain8
Schema Owner , Schema Password, Service Name, Hostname, port.
Note that Here we are using FADB as prefix to all Schemas
domain9
Click Next
domain10
Select “Administration Server” , “Managed Server, Clusters and Machines” and “Deployments and Services” and click Next
domain11
Enter following values.
Name: AdminServer
Listen address: fa.appsdbatraining.com
Listen Port: 7001
We are not using SSL here so click Next
domain12
Enter Listener address and click Next
domain13
Click Next
domain14
Since we are using Unix machine.
domain15
Click on “Unix Machine” tab and click add button and enter following values. And click Next
Name: soa_server1
Node Manager listen address:192.168.1.143
Node manager listen port: 5556
and click Next
domain16
Select all managed servers on left side
domain17
click on right arrow to assign all servers to our single node. Click Next
domain18
Select servers as shown in the above screen shot and click Next
domain19
Select the servers as shown in the above screen shots and click Next
domain20
Review the summary and click “Create
domain21
Once creation is complete, click Done.

For Fusion Middleware online training contact us at the following url :