WebLogic tutorial


Oracle WebLogic server Road Map
==========================================================================
BEA Systems' WebLogic is a server software application that runs on a middle tier, between back-end databases and related applications and browser-based thin clients. WebLogic is a leading e-commerce online transaction processing (OLTP) platform, developed to connect users in a distributed computing environment and to facilitate the integration of mainframe applications with distributed corporate data and applications.

WebLogic server is based on Java 2 Platform, Enterprise Edition (J2EE), the standard platform used to create Java-based multi-tier enterprise applications. J2EE platform technologies were developed through the efforts of BEA Systems and other vendors in collaboration with the main developer, Sun Microsystems. Because J2EE applications are standardized modules, WebLogic can automate many system-level tasks that would otherwise have demanded programming time.

The main features of WebLogic server include connectors that make it possible for any legacy application on any client to interoperate with server applications, Enterprise JavaBean (EJB) components, resource pooling, and connection sharing that make applications very scalable. An administration console with a user interface makes management tasks more efficient and features such as Secure Sockets Layer (SSL) support for the encryption of data transmissions, as well as authentication and authorization mechanisms, make applications and transactions secure.

Application server:

Also called an appserver, and application server is a program that handles all application operations between users and an organization's backend business applications or databases.
An application server is typically used for complex transaction-based applications. To support high-end needs, an application server has to have built-in redundancy, monitor for high-availability, high-performance distributed application services and support for complex database access.
Road Map:
1.Introduction

2.Installation of WebLogic Application Server

3.Modes of installation

4.WebLogic Application Server Architecture

5.WebLogic Application Server Components

6.Important files and Commands

7.Managed Server Independence Mode

8.Queues in Weblogic

9.Threads in Weblogic

10.Deployments

11.JDBC

12.Clustering Weblogic servers

13.Integration of WebLogic with Apache
===========================================================================
Introduction to Apache Web Server (2.X.XX)
Apache Web server is the most commonly used http server today. About 80% of all websites and Intranets use Apache web server to deliver their content to requesting Browsers.
These will teach you step by step how to download, setup Apache, configure Apache and get Apache webserver to run successfully on M.S. Windows XP and Vista.
These operating systems, are most commonly used by web developers and web application programmer´s today.
While a ton of hosting companies, especially those that offer Linux based hosting, use Apache web server for delivering website content there are several other common implementations where Apache can be used, such as:
On a local machines for developing and testing a web site prior deployment on the Internet
Running a company Intranet on a wired network, where employees use a Browser to access content
Sharing files from a personal computer on the Internet
And more.
While the Apache webserver core has limited functionality, this functionality is greatly extended through a ton of compiled modules that can be embedded within the Apache core and used. You can pick up all the skills necessary to setup Apache. By stepping systematically through each Apache web server tutorial available.
Some examples of such compiled modules included with the Apache core are:
Server side programming languages such as PHP, Perl, Python, Java and many others
User authentication and authorization services provided by mod_access, mod_auth, and a variety of other compiled modules
Secure data transmission, vital when dealing with confidential data, is provided by the mod_ssl compiled module
==============================================================================
Linux Commands :                               
The following table is a list of linux commands found on a Redhat  server.
Command
Description
adduser
Add a new user
arch
Print machine architecture
awk
Find and Replace text within file(s)
bc
An arbitrary precision calculator language
cal
Display a calendar
cat
Concatenate files and print on the standard output
chdir
Change working directory
chgrp
Change the group ownership of files
chkconfig
Tool for maintaining the /etc/rc[0-6].d directory hierarchy
chmod
Change the access permissions of files and directories
chown
Change the user and group ownership of files
chroot
Change root directory
cksum
Print CRC checksum and byte counts
clear
Clear terminal screen
cmp
Compare two files
comm
Compare two sorted files line by line
cp
Copy one or more files to another location
cron
Daemon to execute scheduled commands
crontab
Schedule a command to run at a later time
csplit
Split a file into context-determined pieces
cut
Divide a file into several parts
date
Display or change the date & time
dc
Desk Calculator
dd
Data Dump - Convert and copy a file
df
Display free disk space
diff
Display the differences between two files
diff3
Show differences among three files
dir
Briefly list directory contents
dircolors
Colour setup for `ls'
dirname
Convert a full pathname to just a path
du
Estimate file space usage
echo
Display message on screen
ed
A line-oriented text editor (edlin)
egrep
Search file(s) for lines that match an extended expression
eject
Eject CD-ROM
env
Display, set, or remove environment variables
expand
Convert tabs to spaces
expr
Evaluate expressions
factor
Print prime factors
false
Do nothing, unsuccessfully
fdformat
Low-level format a floppy disk
fdisk
Partition table manipulator for Linux
fgrep
Search file(s) for lines that match a fixed string
find
Search for files that meet a desired criteria
fmt
Reformat paragraph text
fold
Wrap text to fit a specified width
format
Format disks or tapes
free
Display memory usage
fsck
Filesystem consistency check and repair
gawk
Find and Replace text within file(s)
grep
Search file(s) for lines that match a given pattern
groups
Print group names a user is in
gzip
Compress or decompress named file(s)
head
Output the first part of file(s)
hostname
Print or set system name
id
Print user and group id's
info
Help info
install
Copy files and set attributes
join
Join lines on a common field
kill
Stop a process from running
less
Display output one screen at a time
ln
Make links between files
locate
Find files
logname
Print current login name
lpc
Line printer control program
lpr
Off line print
lprm
Remove jobs from the print queue
ls
List information about file(s)
man
Help manual
mkdir
Create new folder(s)
mkfifo
Make FIFOs (named pipes)
mknod
Make block or character special files
more
Display output one screen at a time
mount
Mount a file system
mv
Move or rename files or directories
nice
Set the priority of a command or job
nl
Number lines and write files
nohup
Run a command immune to hangups
passwd
Modify a user password
paste
Merge lines of files
pathchk
Check file name portability
pr
Convert text files for printing
printcap
Printer capability database
printenv
Print environment variables
printf
Format and print data
ps
Process status
pwd
Print Working Directory
quota
Display disk usage and limits
quotacheck
Scan a file system for disk usage
quotactl
Set disk quotas
ram
ram disk device
rcp
Copy files between two machines
rm
Remove files
rmdir
Remove folder(s)
rpm
Remote Package Manager
rsync
Remote file copy (Synchronize file trees)
screen
Terminal window manager
sdiff
Merge two files interactively
sed
Stream Editor
select
Accept keyboard input
seq
Print numeric sequences
shutdown
Shutdown or restart linux
sleep
Delay for a specified time
sort
Sort text files
split
Split a file into fixed-size pieces
su
Substitute user identity
sum
Print a checksum for a file
symlink
Make a new name for a file
sync
Synchronize data on disk with memory
tac
Concatenate and write files in reverse
tail
Output the last part of files
tar
Tape Archiver
tee
Redirect output to multiple files
test
Evaluate a conditional expression
time
Measure Program Resource Use
touch
Change file timestamps
top
List processes running on the system
traceroute
Trace Route to Host
tr
Translate, squeeze, and/or delete characters
true
Do nothing, successfully
tsort
Topological sort
tty
Print filename of terminal on stdin
umount
Unmount a device
uname
Print system information
unexpand
Convert spaces to tabs
uniq
Uniquify files
units
Convert units from one scale to another
unshar
Unpack shell archive scripts
useradd
Create new user account
usermod
Modify user account
users
List users currently logged in
uuencode
Encode a binary file
uudecode
Decode a file created by uuencode
vdir
Verbosely list directory contents (`ls -l -b')
watch
Execute/display a program periodically
wc
Print byte, word, and line counts
whereis
Report all known instances of a command
which
Locate a program file in the user's path
who
Print all usernames currently logged in
whoami
Print the current user id and name (`id -un')
xargs
Execute utility, passing constructed argument list(s)
yes
Print a string until interrupted
==============================================================================
Deployment Process

The term application deployment refers to the process of making an application or module available for processing client requests in a WebLogic Server domain. For an administrator, application deployment generally involves the following tasks:

1.         Preparing applications and modules for deployment. You can deploy applications either as archived files, or as exploded archive directories. WebLogic Server 9.0 also introduces the concept of an application installation directory, which helps you organize deployment files and deployment configuration files for easy deployment using WebLogic Server tools. Before deploying an application, an Administrator typically prepares the deployable modules by creating an application installation directory and copying the application archive file into the appropriate subdirectory.

2.         Configuring the application or module for deployment to the WebLogic Server environment. Administrators typically receive a new application (or a new version of an application) from their development team, and must deploy the application to a staging or production environment that differs from the environments used during development and testing. WebLogic Server 9.0 helps you easily configure an application for a new target domain without having to manually edit deployment descriptor files provided by development. Configuration changes for a specific deployment environment are stored in a new configuration artifact—a deployment plan—which can be stored and maintained independently of the deployment files provided by the development team.

3.         Deploying the application to WebLogic Server. After preparing both the deployment and configuration files, applications are distributed to target servers in a WebLogic Server domain and made active for processing client requests.

Some BEA deployment tools, such as the Administration Console, automatically guide you through each step to help you quickly deploy applications to a WebLogic Server domain. Other tools, such as the weblogic.Deployer tool, provide more control over individual steps in the deployment process, but require additional conceptual knowledge about how WebLogic Server performs each step. This document focuses mainly on using the weblogic.Deployer tool, which provides access to many advanced deployment features. However, the Administration Console is also documented where it provides unique functionality. For example, only the Administration Console provides interactive deployment configuration for applications and modules. For a detailed list of deployment tools, including those documented elsewhere in WebLogic Server documentation, see

Overview of Deployment Tools
Weblogic Server provides the following tools to help you configure and deploy applications.

weblogic.Deployer
weblogic.Deployer provides a command-line based interface for performing both basic and advanced deployment tasks. Use weblogic.Deployer when you want command-line access to WebLogic Server deployment functionality, or when you need to perform a deployment task that is not supported using the Administration Console.

Administration Console
The Administration Console provides a series of Web-based Deployment Assistants that guide you through the deployment process. The Administration Console also provides controls for changing and monitoring the deployment status, and changing selected deployment descriptor values while the deployment unit is up and running.
Use the Administration Console when you need to perform basic deployment functions interactively and you have access to a supported browser.

WLST
The WebLogic Scripting Tool (WLST) is a new command-line interface that you can use to automate domain configuration tasks, including application deployment configuration and deployment operations.
==============================================================================
Threads (part 1)
  Listen threads
◦       plain text (t3, http, etc.)
◦       secure (t3s, https, etc.)
◦       admin port (used to be mixed with secure)
◦       network channels
  Health monitor thread
◦       More information available when using JRockit
  Timed event generator (1 thread only)
◦       Cluster heartbeat
◦       Scheduled jobs
◦       Only high priority thread in the whole server
Threads (part 2)
  Socket Reader threads
◦       % of threads in the default queue
◦       Synchronous reading when using Java IO (haven’t got all the kinks worked out for NIO)
  Would like to have 1 thread per socket
  OK for a client, not so good for a server
◦       Asynchronous when using a performance pack
◦       Fewer threads are necessary due to improved affinity and conservation of sockets
  Thread dumps
◦       weblogic.Admin … THREAD_DUMP
◦       kill -3
◦       Ctrl-Break
◦       JRockit management console
◦       J2SE 1.4 has better deadlock detection then most J2SE 1.3 VMs
==============================================================================


  Domain: A domain is an inter-related set of WebLogic Server resources that are managed as a unit. A domain includes one or more WebLogic Servers, and may include one or more WebLogic Server clusters.
  Admin Server : Each WebLogic Server domain has one server instance that acts as the Administration Server. The managed servers contacts the admin server for it’s configuration information. The Administration Server provides a central point for managing a WebLogic Server domain .
  Managed Server : A Managed Server is a WebLogic Server instance that retrieves its configuration data from the domain's Administration Server All WebLogic server instance in a domain are called managed server
==============================================================================
 Production V/s Development

Function
Development Mode

Production Mode

Deployment



WebLogic Server instances can automatically deploy and update applications that reside in the domain_name/autodeploy directory

The auto-deployment feature is disabled, so you must use the WebLogic Server Administration Console.
Resource

The default capacity is 15 connections

The default capacity is 25 connections.
===========================================================================
Introduction
Apache web server has been developed by a loosely-knit group of programmers form the open source domain. It can be downloaded and used completely free of cost. The first version of Apache web server, based on the NCSA httpd Web server, was developed in 1995.

When Rob McCool, who had developed NCSA HTTPd, left NCSA in 1994, the project fizzled out. Since Apache web server's, source code was publicly available, many people using it had developed their own bug fixes and additional features that they needed for their own sites. The patches were shared via Usenet, as there was no centralized place for collecting and distributing these patches.

Brian Behlendorf and Cliff Skolnick had put up a mailing list and Brain set up a CVS (Concurrent Versioning System) tree, now anyone who wanted to could contribute new features and bug fixes. This led to a place where a group of developers could collect and distribute patches and bug fixes. Thus came into existence - Apache.

Since it was a patchy Web server, the name APACHE evolved from A PAtCHy sErver. The Apache version 0.6.2 was released in April 1995 and the version 1.0 was released on December 1, 1995. Currently there are two versions of Apache available the first is 1.3.X.XX-X the most popular and tried and tested and completely stable. Apache.org, the Apache website indicates that there will be no enhancements made to 1.3.X.XX-X only bug fixes will be done.

Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. Apache is characterized as free software and open source software.
Apache web server is notable for playing a key role in the initial growth of the World Wide Web. In 2009 Apache web server became the first web server to surpass the 100 million web site milestone.

Apache web server was the first viable alternative to the Netscape Communications Corporation web server (currently known as Sun Java System Web Server), and has since evolved to rival other Unix- based web servers in terms of functionality and performance.

2.0.X.XX, is the latest version of Apache web server. This is being constantly bug fixed and enhanced (when creating this material). Either version can be used as a full-fledged production grade Web Server when required.

Apache Web Server can be downloaded from http://www.apache.org for free. Apache Web Server has the highest market share in the web server market (this includes parked web sites without any real content) and is Microsoft IIS's main competitor
The Internet’s Request / Response Way Of Working
Here’s the Internet’s Request / Response paradigm works.
Whenever a Browser makes an http request such as: http://www.wikiconsole.com/index.html
the following happens:
http
This is the protocol used for communication between the Browser and the Web server. Since the Browser initiated the communication it has the privilege of setting the communication protocol.
://
This is a separator that separates the protocol from the URL.
www.wikiconsole.com
This will be translated into a name:value pair i.e. ip:URL
by DNS servers. Hence this will translate to an ip 74.86.170.172:www.wikiconsole.com

Hence only the web server located on the computer identified by the ip 74.86.170.172 will reply to the requesting Browser and a communication link will be established.

As soon as the web server ( apache http server ) receives a request for the file index.html, the web server will search within URL’s folder on its hard disk for the existence of index.html.

If the file is found it is streamed back to the requesting Browser, where its content are processed appropriately and the web page is displayed in the Browser window.

If the file requested is not found an appropriate error message is streamed back to the requesting Browser which is displayed in the Browser window.
All of the above is described in Diagram 1
 HTTP Request And Response
Diagram 1
Hence, to sum up, a Browser requests for a file, the web server searches for this file and responds by delivering it to the Browser. Then the web server breaks all connections with the Browser. The web server does not remember the Browser in anyway.

========================================================================

Installation Methods
========================================================================
The BEA installation program supports the following methods for installing the BEA WebLogic Platform software:

Graphical mode
=========================================================================
Graphical-mode installation is an interactive, GUI-based method for installing WebLogic Platform. It can be run on both Windows and UNIX systems. For installation procedures, see Installing WebLogic Platform Using Graphical-Mode Installation.
Note: If you want to run graphical-mode installation, the console attached to the machine on which you are installing the software must support a Java-based GUI. All consoles for Windows systems support Java-based GUIs, but not all consoles for UNIX systems do. If you attempt to start the installation program in graphical mode on a system that cannot support a graphical display, the installation program automatically starts console-mode installation.

Console mode
==========================================================================
Console-mode installation is an interactive, text-based method for installing WebLogic Platform, from the command line, on either a UNIX system or a Windows system. For instructions for using this method, see Installing WebLogic Platform Using Console-Mode Installation.

Silent mode
========================================================================
Silent-mode installation is a noninteractive method of installing WebLogic Platform that requires the use of an XML properties file for selecting installation options. You can run silent-mode installation in either of two ways: as part of a script or from the command line. Silent-mode installation is a way of setting installation configurations only once and then using those configurations to duplicate the installation on many machines. For instructions, see Installing WebLogic Platform Using Silent-Mode Installation.
C:\ server923_win32.cmd –mode=silent –silent_xml=path_to_silent.xml –log=C:\temp\install.log

The term application deployment refers to the process of making an application or module available for processing client requests in a WebLogic Server domain. For an administrator, application deployment generally involves the following tasks:

1.         Preparing applications and modules for deployment. You can deploy applications either as archived files, or as exploded archive directories. WebLogic Server 9.0 also introduces the concept of an application installation directory, which helps you organize deployment files and deployment configuration files for easy deployment using WebLogic Server tools. Before deploying an application, an Administrator typically prepares the deployable modules by creating an application installation directory and copying the application archive file into the appropriate subdirectory.

2.         Configuring the application or module for deployment to the WebLogic Server environment. Administrators typically receive a new application (or a new version of an application) from their development team, and must deploy the application to a staging or production environment that differs from the environments used during development and testing. WebLogic Server 9.0 helps you easily configure an application for a new target domain without having to manually edit deployment descriptor files provided by development. Configuration changes for a specific deployment environment are stored in a new configuration artifact—a deployment plan—which can be stored and maintained independently of the deployment files provided by the development team.

3.         Deploying the application to WebLogic Server. After preparing both the deployment and configuration files, applications are distributed to target servers in a WebLogic Server domain and made active for processing client requests.

Some BEA deployment tools, such as the Administration Console, automatically guide you through each step to help you quickly deploy applications to a WebLogic Server domain. Other tools, such as the weblogic.Deployer tool, provide more control over individual steps in the deployment process, but require additional conceptual knowledge about how WebLogic Server performs each step. This document focuses mainly on using the weblogic.Deployer tool, which provides access to many advanced deployment features. However, the Administration Console is also documented where it provides unique functionality. For example, only the Administration Console provides interactive deployment configuration for applications and modules. For a detailed list of deployment tools, including those documented elsewhere in WebLogic Server documentation, see

Overview of Deployment Tools
========================================================================
Weblogic Server provides the following tools to help you configure and deploy applications.

weblogic.Deployer
===========================================================================
weblogic.Deployer provides a command-line based interface for performing both basic and advanced deployment tasks. Use weblogic.Deployer when you want command-line access to WebLogic Server deployment functionality, or when you need to perform a deployment task that is not supported using the Administration Console.

Administration Console
========================================================================
The Administration Console provides a series of Web-based Deployment Assistants that guide you through the deployment process. The Administration Console also provides controls for changing and monitoring the deployment status, and changing selected deployment descriptor values while the deployment unit is up and running.
Use the Administration Console when you need to perform basic deployment functions interactively and you have access to a supported browser.

WLST
=========================================================================
The WebLogic Scripting Tool (WLST) is a new command-line interface that you can use to automate domain configuration tasks, including application deployment configuration and deployment operations.

The WebLogic Scripting Tool (WLST) is a command-line scripting environment that you can use to create, manage, and monitor WebLogic Server domains. It is based on the Java scripting interpreter, Jython.

In addition to supporting standard Jython features such as local variables, conditional variables, and flow control statements, WLST provides a set of scripting functions (commands) that are specific to WebLogic Server.

You can use WLST as the command-line equivalent to the WebLogic Server Administration Console (WLST online) or as the command-line equivalent to the Configuration Wizard (WLST offline)

Online
You can use WLST to connect to a running Administration Server and manage the configuration of an active domain, view performance data about resources in the domain, or manage security data (such as adding or removing users).
Offline
Without connecting to a running WebLogic Server instance, you can use WLST to create domain templates, create a new domain based on existing templates, or extend an existing, inactive domain. You cannot use WLST offline to view performance data about resources in a domain or modify security data (such as adding or removing users).
MODES
Interactive Mode
Interactive mode, in which you enter a command and view the response at a command-line prompt
Script Mode
Scripts invoke a sequence of WLST commands without requiring your input, much like a shell script
Embedded Mode
In embedded mode, you instantiate the WLST interpreter in your Java code and use it to run WLST commands and scripts.

Invoking WLST
======================================================
Setting Up Your Environment: Run setDomainEnv.sh under /bin directory.

To use WLST in interactive mode: java weblogic.WLST
To connect to a WebLogic Server instance after you start WLST in interactive mode:wls:/offline> connect('weblogic','weblogic','localhost:7001')
To use WLST in script mode: java weblogic.WLST c:\myscripts\myscript.py
Exiting WLST: To exit WLST, enter the exit() command:
wls:/mydomain/serverConfig> exit()Exiting WebLogic Scripting Tool ...
c:\>
Syntax for WLST Commands
======================================================
Follow this syntax when entering WLST commands or writing them in a script:
§ Command names and arguments are case sensitive.
§ Enclose arguments in single or double quotes. For example, 'newServer' or "newServer".
§ If you specify a backslash character (\) in a string, either precede the backslash with another backslash or precede the entire string with a lower-case r character. The \ or r prevents Jython from interpreting the backslash as a special character.
For example when specifying a file pathname that contains a backslash:
readTemplate('c:\\userdomains\\mytemplates\\mytemplate.jar') or readTemplate(r'c:\userdomains\mytemplates\mytemplate.jar')
§ When using WLST offline, the following characters are not valid in names of management objects: period (.), forward slash (/), or backward slash (\).
If you need to cd to a management object whose name includes a forward slash (/), surround the object name in parentheses. For example:
cd('JMSQueue/(jms/REGISTRATION_MDB_QUEUE)')

Start Node Manager
===========================================================
if Node Manager is not already running, you can log on to the host computer and use WLST to start it:
c:\>java weblogic.WLST
wls:/offline> startNodeManager()
Connect WLST to a Node Manager by entering the nmConnect command.
wls:/offline>nmConnect('username','password','nmHost','nmPort','domainName','domainDir','nmType')

For example,
===============================================================

nmConnect('weblogic', 'weblogic', 'localhost', '5556', 'mydomain','c:/bea/user_projects/domains/mydomain','ssl')
Connecting to Node Manager ... Successfully connected. wls:/nm/mydomain>
Use the nmStart command to start a server.
wls:/nm/mydomain>nmStart('AdminServer')
 starting server AdminServer ... Server AdminServer started successfully wls:/nm/mydomain>
Monitor the status of the Administration Server by entering the nmServerStatus command.
wls:/nm/mydomain>nmServerStatus('serverName')
RUNNING wls:/nm/mydomain>
Stop the server by entering the nmKill command.
wls:/nm/mydomain>nmKill('serverName')
Killing server AdminServer Server AdminServer killed successfully wls:/nm/mydomain>
To start a Managed Server, enter the following command:
start('managedServerName','Server')
where managedServerName is the name of the server.
=========================================

For example,
start('managed1','Server')
To start a cluster, enter the following command:
start('clusterName', 'Cluster')
===================================
where clusterName is the name of the cluster.
For example:    start('mycluster', 'Cluster')
Commands -
wls:/offline>
Take help on online or offline commands
help("online")
help("offline")
Start Node Manager
startNodeManager(verbose="true",NodeManagerHome="D:/Oracle/Middleware/wlserver_10.3/common/nodemanager",ListenPort="5557",ListenAddress="localhost")
where -
Node Manager Home - D:/Oracle/Middleware/wlserver_10.3/common/nodemanager
Node Manager Host host - localhost
Node Manager port - 5556
=====================================================================

Connect with node manager
nmConnect("weblogic","webl0gic","localhost","5556","base_domain","D:/Oracle/Middleware/user_projects/domains/base_domain","plain")

Start Admin server
nmStart("AdminServer")
where "AdminServer" is the name of your admin server.

Check Admin Server Status
nmServerStatus('AdminServer')
where "AdminServer" is the name of your admin server.

Connect to Admin Server
connect("weblogic","webl0gic","localhost:7001")
where -
admin user - weblogic
admin password=webl0gic
weblogic host - localhost
admin port - 7001

Start Managed Server
Start(“MS1”)
Where MS1 is the name of your managed server
=========================================================================================================================
Installation
To install apache web server on Windows / XP / Vista :
Run the setup file of Apache web server which was dowloaded and saved to your harddisk earlier by double clicking on it.
Please take a look at downloads  Download Apache Web Server
Click Next as shown in Diagram 1

Apache Web Server Installation Wizard
Diagram 1











this is the interation of Weblogic with Apache.


On click of Next the Apache License screen will be shown as shown in Diagram 2
Apache Installation License Agreement
Diagram 2
Click Next and a screen will be displayed which contains information that should be read prior the install process starting as shown in Diagram 3
Apache HTTP Server Prior Install Information
Diagram 3
Click Next and enter the Server Information details as explained below and shown in Diagram 4
Network Domain – any name can be given
Server Name – any name can be given
Administrator’s Email Address – should be a valid email address
(If apache server fails, then Apache sends a Email to the Administrators Email address)
Select the radio button - For All Users, on Apache Port 8080, as a service - Recommended
Apache Server Information on Installation Wizard
Diagram 4
Click Next and choose 'Typical' as the type of setup as shown in Diagram 5
Choosing Setup Type During Installation
Diagram 5
The Path to the folder where Apache will be installed is displayed. Change this if you wish Apache to be installed in any folder on your harddisk other than its default. Then Click Next as shown in Diagram 6
Path to the folder where Apache will be installed
Diagram 6
The Apache installation process begins as shown in Diagram 7
Apache installation process
Diagram 7
The installation completes as shown in Diagram 8
Completion of Apache Installation
Diagram 8
The Apache control icon will be displayed in the Window's task bar. It’s the first icon in the image below, with the tiny green triangle as shown in Diagram 9
Apache control icon
Diagram 9
To Restart Apache any time you need to simply double click this icon and from the Apache service monitor select 'Restart' as shown in Diagram 10
Apache service monitor
Diagram 10
Testing Apache
To test Apache Web Server, open any Browser and type http://127.0.0.1 in its address bar and hit GO.
OR
Open any Browser and type - localhost - in its address bar and hit GO.
The page as shown in diagram 11 should be displayed in the Browser window. Apache has been successfully installed if it does.
Testing Apache
Diagram 11
Apache is ready for use
=============================================================================
Turns out, it's as easy as the proverbial:

Install WLS, create a domain, start it up
Download and install Apache (I used 2.2)
Copy the corresponding Apache module (for 2.2 I used mod_wl_22.so) from the WLS installation into $APACHE_HOME/modules directory
Edit $APACHE_HOME/conf/httpd.conf and enable the mod_weblogic as follows:

# Load BEA Module
LoadModule weblogic_module modules/mod_wl_22.so

# Config file for WebLogic Server that defines the parameters
Include conf/mod_weblogic.conf


Create the referenced mod_weblogic.conf file in which you place the configuration elements for mod_weblogic to use:

# Basic config for mod_weblogic to point at my WLS instance

WebLogicHost localhost
WebLogicPort 7001
Debug ON
WLLogFile c:temp\wlproxy.log
WLTempDir c:\temp
DebugConfigInfo On


# Map the URLs to expose via Apache
# Expose the console via Apache

SetHandler weblogic-handler



Test the config with Apache

$APACHE_HOME\bin\httpd -t


Start Apache
Access the console via Apache (assuming all default ports)

http://localhost:8080/console
And that's the basic set of steps -- you should be looking at the WLS console being serviced via Apache.

With the config above, I've enabled the DebugConfigInfo option -- which allows you to see a bunch of useful debug/usage information by entering a URL serviced by mod_weblogic and tacking on a request parameter of the form ?__WebLogicBridgeConfig.

http://localhost:8080/console?__WebLogicBridgeConfig.



























====================================================================
File related commands
cat , more , tail ,touch, mkdir , rm , ln , ls , chmod , cp , tar , jar , find , grep
ln –s  <target> <symblink>
find <dir> –name <filename>
tar –cvf <tarfile> <dir>/*
tar –xvf <tarfile>
Process related commands
     ps , kill -15/9/3 , pfiles , ptree , pstack
ps –fu <user>
ps –ef
kill -15 <pid> - soft kill
kill -9 <pid>  - hard kill
Kill -3 <pid>  - thread dump
pfiles <pid>   - file descriptors
ptree <pid>   - process tree showing ppids

 Taking Thread dump
nohup ./startWeblogic.sh > start.out 2>&1 &
ps –ef|grep startWeblogic.sh (Find processid)
ptree <pid> (Find the child java processid)
kill -3 <pid> (send SIGQUIT to java pid)
Look PROCESS console logfile for thread dump


Resource Utilization/Statistics
                 top , prstat , netstat , iostat , vmstat , df , du , swap
top command
Top command will display the high CPU utilizing processes list
last pid: 16532;  load averages:  1.30,  1.15,  0.79                                                                               08:09:05
116 processes: 113 sleeping, 1 zombie, 1 stopped, 1 on cpu
CPU states: 92.0% idle,  5.8% user,  2.2% kernel,  0.0% iowait,  0.0% swap
Memory: 16G real, 6307M free, 11G swap in use, 36G swap free


PID USERNAME THR PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
  3515 gspace   133  29   10  337M  279M sleep   66.0H  2.09% java
 14169 admin   121   0   10 1330M  825M sleep    8:46  1.74% java
 10150 admin   121   0   10 1330M  771M sleep    8:14  1.55% java
  6076 admin   124   0   10 1351M  701M sleep    5:37  1.32% java
  1925 admin   139   0   10 1347M  801M sleep    8:00  1.31% java


prstat command
prstat -a


   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP   
 14169 admin   1330M  825M sleep    0   10   0:00.42 2.1% java/121
 14757 admin   1266M  865M cpu546  29   10   0:00.50 1.8% java/135
  1925 admin   1348M  801M sleep    0   10   0:00.40 1.7% java/139
 10150 admin   1331M  772M sleep    0   10   0:00.42 1.7% java/121
  6076 admin   1351M  710M sleep    0   10   0:00.41 1.6% java/124
 21947 admin   1266M  789M sleep    0   10   0:00.45 0.8% java/120
 27533 admin   1269M  873M sleep    0   10   0:00.46 0.6% java/117
 23089 admin   1282M  896M sleep    0   10   0:00.47 0.6% java/120
  3515 gspace    337M  279M sleep   29   10   0:02.13 0.1% java/135


NPROC USERNAME  SIZE   RSS MEMORY      TIME  CPU                         
    22 admin     11G 7098M    45%   0:06.25  11%
    87 root      623M  211M   1.2% 126:21.35 0.2%
     2 gspace    458M  343M   2.2%   0:02.17 0.2%
     2 logread  3200K 2424K   0.0%   0:00.00 0.0%
     1 daemon   2752K 1240K   0.0%   0:00.00 0.0%
Total: 114 processes, 1927 lwps, load averages: 1.27, 1.22, 0.88


http://developers.sun.com/solaris/articles/prstat.html

Load Average
Load Average gives the load on the system for the past 1 , 5 and 15 min.
Load Average is a measure of active processes and Ready Queue (Processes waiting to execute).
Load Average below 3 is considered good.
vmstat command
$ vmstat
 procs     memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s2 s3 s4 s1   in   sy   cs us sy id
 0 0 66 1855624 192024 144 545 307 130 162 0 66 6 6 0 0  53  391  910 36 10 53
iostat

$ iostat -xt
   extended disk statistics                       tty       cpu
   disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b tin tout us sy wt id sd0 2.6  10.0 20.7 22.7 0.1  0.2  59.2   6 19  0  84    3 85 11 0
   sd1 4.2  1.0 310.5  8.0 0.0  0.2  47.2   2 23
   sd2 0.0  0.0 0.0   0.0 0.0  0.0  0.0    0 0
   sd3 10.2 1.6 51.4 12.8 0.1  0.3 31.2    3 31
  netstat command
Network statistics
$ netstat -na| grep 8110
      *.8110               *.*                0      0 24576      0 LISTEN
10.171.1.3.35287    10.171.16.3.8110     32768      0 32768      0 ESTABLISHED
10.171.1.3.8110     10.171.16.3.35287    32768      0 32768      0 ESTABLISHED
10.171.1.3.35291    10.171.16.3.8110     32768      0 32768      0 ESTABLISHED
10.171.1.3.8110     10.171.16.3.35291    32768      0 32768      0 ESTABLISHED


Status could be one of the following:
CLOSED        -  Closed.  The socket  is  not  being used.
LISTEN        -  Listening for incoming connections.
SYN_SENT      -  Actively trying to  establish  connection
SYN_RECEIVED  -  Initial synchronization of the connection under way
ESTABLISHED   -  Connection has been established
CLOSE_WAIT    -  Remote shut down; waiting  for  the socket to close
FIN_WAIT_1    -  Socket closed; shutting  down  connection
FIN_WAIT_2    -  Socket closed; waiting for shutdown from remote.
TIME_WAIT     -  Wait after close for  remote  shutdown retransmission.

swapcommand
$ swap -s
total: 6799480k bytes allocated + 1737544k reserved = 8537024k used, 940392k available
$ swap -l
swapfile             dev  swaplo blocks   free
/dev/vx/dsk/swapvol 227,8      16 4094704     16
/dev/vx/dsk/wkstdg/extraswap 227,104002     16 8601584 720896


 Other useful commads
[admin@swsweb016 ~]$ whoami
admin


[admin@swsweb016 ~]$ who am i
jawahd       pts/3        Jun  3 02:13 (10.209.217.245)


[admin@swsweb016 ~]$ w
 08:32:52 up 214 days, 22:20,  1 user,  load average: 1.28, 1.33, 1.09
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
jawahd       pts/3    10.209.217.245    02:13    0.00s  0.07s  0.01s sshd: jawahd     [priv]


[admin@swsweb016 ~]$ finger
Login     Name          Tty      Idle  Login Time   Office     Office Phone
jawahd        Jawad Ahmed   pts/3          Jun  3 02:13 (10.209.217.245)


[admin@swsweb016 ~]$

============================================================================
Difference between Web Server & Application Server
Web logic Server Basics
Understanding TCP/IP and HTTP
Web logic Application server
Web logic 10.3 Features
Web logic system administrator Infrastructure
J2EE Components
Servlets
JSP
EJB

Weblogic Application  Server Installation and configurations
WLS domain Server
Machine
Cluster
Directory structure
Starting WLS
Configuring Domain attributes
Configuring server, cluster
Service configurations
Configuring  JMS options
Configuring Database Connectivity
Connection Pools, Data Sources and Multi Pools
Application Deployment
Auto Deployment
Deployment tools
Cluster Deployment Load balancing and session replication
Setting up a Cluster across multiple machines
Weblogic Virtual Hosting
Configuring Node Manager, Weblogic Server Logging
Weblogic Server threading model and creating own execute queue
Weblogic and J2EE
JMS application
Configuring JMS
Weblogic JNDI
WLS and HTTP servers
WLS HTTP server
Plug-in
Weblogic Performance Tuning Basics
Reduce the application down time OS ,Network tuning Basics
Techniques to troubleshoot and fix the OOM, Memory leak, Server Hang, Server Crash problems
Administration Tools
Web logic java utilities
Licenses,Architecture,Configurations
Monitoring alls the domain resources, Servers, Clusters, JMS, Connection pools etc
Application Security
Managing Web Logic Security and Security providers Authorization framework
============================================================================
web logic topics
Difference between Web Server & Application Server
Web logic Server Basics
Understanding TCP/IP and HTTP
Web logic Application server
Web logic 10.3 Features
Web logic system administrator Infrastructure
J2EE Components
Servlets
JSP
EJB

Weblogic Application  Server Installation and configurations
WLS domain Server
Machine
Cluster
Directory structure
Starting WLS
Configuring Domain attributes
Configuring server, cluster
Service configurations
Configuring  JMS options
Configuring Database Connectivity
Connection Pools, Data Sources and Multi Pools
Application Deployment
Auto Deployment
Deployment tools
Cluster Deployment Load balancing and session replication
Setting up a Cluster across multiple machines
Weblogic Virtual Hosting
Configuring Node Manager, Weblogic Server Logging
Weblogic Server threading model and creating own execute queue
Weblogic and J2EE
JMS application
Configuring JMS
Weblogic JNDI
WLS and HTTP servers
WLS HTTP server
Plug-in
Weblogic Performance Tuning Basics
Reduce the application down time OS ,Network tuning Basics
Techniques to troubleshoot and fix the OOM, Memory leak, Server Hang, Server Crash problems
Administration Tools
Web logic java utilities
Licenses,Architecture,Configurations
Monitoring alls the domain resources, Servers, Clusters, JMS, Connection pools etc
Application Security
Managing Web Logic Security and Security providers Authorization framework
========================================================================
INTERVIEW questions
Q: What do you mean by weighted based server instance? How do you configure it?
Ans: The Weblogic Servers in the clustered environment could be routed in 6 ways ROUND-ROBIN, WEIGHT-BASED, RANDOM and same algorithms with Affinity. Weight is defined as the number of the requests incoming to a managed server that is default 100. As per the machine capacity and Operating environments will make you to deside how much weight is suggested on that managed server. We can control the incoming requests using weights increase or decrease, So, this way we can route all the request to one of the managed server in the Cluster. This Weight differences can be used when there is operating environment differences are there.
Q: How to enable EJB available to servlet? asume servlet on apache, ejb on Weblogic cluster.
Ans:Any external access to EJB is not allowed. if the apache webserver already configure as front-end. then we need to look up by JNDI tree.
Q: What is the silent mode installation file contains root element? When do you require this mode of installation?
Ans:The root element in silent.xml is <install>This kind of mode usually required in two different situations.
Situation1 : Weblogic clusters could be installed/implemented only on homogenous environments. If cluster1 is constructed with MgdServer1, MgdServer2if one server isusing Weblogic 7 environment and other one on Weblogic 8.1 or higher this is not allowed.
Situation 2: When one huge project is migrated from one physical location to other, Where the Application specialist must have the similar environment as the Production Server had. To prepare Development work with similar kind environment we shall install on First system same as Production Server rest of the developers systems could be installed with silent mode.
Q: What are the basic configuraiton requirements for a Cluster? or
Why do you need multicast address in Clustering?
Ans: The Multicast address is must for clustering, If server instance need to join the cluster it will use multicast address. The Administrator server handles the web/resource request which is incoming to the Weblogic server then the admin server will send poll messages for availability to handle the current incoming request by which member server in the cluster with multicasting. The multicast address should not conflict with the Network configurations on every member server. The range of multicast IP address is : 224.0.0.0 to 239.255.255.255.The admin server sends a TTL (Time to Leave) packet,which will acknowledges the readiness of a managed server. If more than one member server is available then it will choose the member server with first come first server bases.
Q: What are all the ANT command options?
Ans:To view all options of ant command is simple, just use the following command :
prompt> ant -help

Note: This will work on Unix and Windows too iff PATH is pointing to ant specific jars
Q: What is the ANT version last you used? How to get it??
Ans: I am using Weblogic 8.1 it internally provides ant support which is 1.5.6 version.To get this simply use :
 prompt> ant -version
Q: How do you config eclipse with Weblogic?
Ans:Weblogic version wise plug-ins are available for free download sites. Eg: lomboz tool it is a very simple tool, my experience is that deployment on WL is very few steps required.Just we need to copy the plug-in extracted to eclipse/plug-ins folder. Here we need to follow the correct J2EE specification for easy deployments of application.
Q: what is the source to identifying the Connection pool failure? What is the remedy?
Ans: In WL 7/8 to identify the Connection pool failure we have 3 options:
1.The Connection pool hosting Server instance healthchecking by Monitoring tab where we need to find the idle thread availability.2. Checking in the weblogic log of that corresponding server instance. Usually we get broken pipe Exception.This could be generated due to overload on connection pool. To resolve we can tune the execute threads for the corresponding server instance.3. Look for Thread dump and identify the which thread is doing which task execution?
Q: What is Thread Dump? Why we need it? How do we get it?
Ans:Thread dump concept is used only by Admin users who operates the production server; it is the dump of the behavior of the WebLogic server instance’s execute threads.When the thread dumps helpful? If WLS execute threads misbehaving due to following reasonsMaybe you just need more threads. Maybe you need some of your application to use a different queue. Maybe your application needs tuning.There is a need of trouble shoots the issues due to various reasons:
1. Requests overloaded
2. Connection Pool fails
3. File cannot read/write for any application (which might be xml file too)
4. Queues are overloaded
or back-end legacy connection issues

In windows CTRL + Break , There is another common method to get thread dump:a) Open a cmd window (in Windows) or shell (in Unix/Linux)b) Set the proper java path and add weblogic.jar to the classpathc) Run the following command script :prompt >java weblogic.Admin -url t3://host:port -username weblogic -password weblogic THREAD_DUMP Here please replace with the correct host, port number, username and password. You can get the thread dump from the standard output.

Best WebLogic (JVM ) Thread Dump analyzer are:
1. Samurai
2. Java TDA
3. Thread Dump Viewer
4. Eclipse lock analyzer plugin

Q: What is the procedure for Queues config? How to make them to free?
Ans: 1. The Queues configuration requires persistence storage which could be a File on operating system or a DataSource.
2. The queue configuration requires JMSConnectionFactory, JMSServer, jms module Queue or topic as per the application need
You can created using the Weblogic Administration console or using WLST in latest versions 9.x onwards.
=======================================================================
=============================================================================

Web server:

Web servers are computers that deliver (serves up) Web pages. Every Web server has an IP address and possibly a domain name. For example, if you enter the URL http://www.wikiconsole.com/xxx.html in your browser, this sends a request to the Web server whose domain name is pcwebopedia.com. The server then fetches the page named index.html and sends it to your browser.

Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet. There are many Web server software applications, including public domain software from NCSA and Apache, and commercial packages from Microsoft, Netscape and others.

Proxy Server:

A proxy server, in a general sense of the term proxy, is a stand-in server. In a network, a proxy server is the entity that sits between corporate client machines and the Internet. For example, it may sit between a client application, such as a Web browser and the corporate server. Proxies are used to intercept incoming and outgoing requests to see if it can fulfill the requests itself. If not, it then forwards the request to the real server.
Forward and Reverse Proxies
The most common types of proxy servers are called forward and reverse proxies. A forward proxy is used to forward outgoing requests from a private network or intranet to the Internet, usually through a firewall. The main goal of the forward proxy is to provide a level of security and also to reduce network traffic. For example, if a Web browser is configured to do so, all requests will be made through the proxy, which in turn will apply filtering rules. The proxy will then request the site the user was trying to reach on his or her behalf, or more accurately: "by proxy."
In contrast, a reverse proxy handles requests coming from the Internet to the private network or intranet. This provides a level of security that prevents the Internet clients from having direct access to data on the corporate servers. The reverse proxy sits between your Web server and the world. When an HTTP connection comes in, the reverse proxy will decide what to do, and then make a request to the appropriate backend Web server. Reverse proxies are very important, and they are commonly used to secure and load balance Web servers and also act as a content filter.


Take an interactive tour::  The IBM SmartCloud gives your business the IT resources it needs.

Proxy servers can also be chained. This is not a type of proxy server, but rather a method for using reverse and forward proxy servers across your network or across multiple networks in cases where the number of requests to the proxy may exceed its limits causing it to slow down. A proxy server chain lets you assign a specific number of clients to each proxy within the chain.

The Purpose of a Proxy Server

Proxy servers have two main purposes:
Improve Performance:

Proxy servers can dramatically improve performance for groups of users. This is because it saves the results of all requests for a certain amount of time. Consider the case where both user X and user Y access the World Wide Web through a proxy server. First user X requests a certain Web page, which we'll call Page 1. Sometime later, user Y requests the same page. Instead of forwarding the request to the Web server where Page 1 resides, which can be a time-consuming operation, the proxy server simply returns the Page 1 that it already fetched for user X. Since the proxy server is often on the same network as the user, this is a much faster operation. Proxy servers can support hundreds or thousands of users.
Filter Requests:

Proxy servers can also be used to filter requests. For example, a company might use a proxy server to prevent its employees from accessing a specific set of Web sites.
===========================================================================
Weblogic 8

Weblogic 9/10
Console is an applet and uses JCX JCS JPF and Netui page flows
Console is portal and uses JSTL (JSP 2.0)
No folder called config Folder called config is available
No Prepare state for application. Only active state
Prepare state for application, This optimises memory utilization.
No app inf lib and classes App inf lib and app inf classes are added
Persistant store is defined Under JMS Persistant store is defined Under JDBC
We have connection pools and datasources We have datasources and connection pools are inside datasources.
We have exclude queues. We have work managers
No lock and edit Lock and edit is the new feature
We need to delete and redeploy from admin console We can update the application using admin console
All configuration information is in one config.xml Seperate xml files for domain config and jms modules are added
No concept of JMS modules and sub deployments Jms modules and subdeployments are included.
Queue/topic is configured under distributed destination Queue/topic/dd etc are all clubbed in a JMS modules
Side by site deployment is not possible Side by side deployment is possible
Server dosent come up if deployment fails Server boots in ADMIN mode if deployment failes
*JMS servers are always defined individually under messaging in weblogic 8 9 and 10. JMS queues or topics will be deployed onto jms clusters. In weblogic 9 and above while creating jms queues and topics we need to choose the jms server for deployment. Whereas in weblogic 8 we need to choose the destination (queue or topic) from jms servers options. In weblgic 10 we can configure jms queues and topics to jms servers/weblogic servers.

*App inf and classes enables sharing resources at application level.

Comments

Popular Posts