Weblogic Application Server PDF
Weblogic Application Server PDF
Weblogic Application Server PDF
The primary function of a web server is to deliver web pages (HTML documents) and
associated content (e.g. images, style sheets, JavaScript's) to clients. A client, commonly a
web browser or web crawler, makes a request for a specific resource using HTTP and, if all
goes well, the server responds with the content of that resource. The resource is typically a
real file on the server's secondary memory, but this is not necessarily the case and depends
on how the web server is implemented.
While the primary function is to serve content, a full implementation of HTTP also includes a
way of receiving content from clients. This feature is used for submitting web forms,
including uploading of files.
Many generic web servers also support server-side scripting (e.g. Apache HTTP Server and
PHP). This means that the behavior of the web server can be scripted in separate files, while
the actual server software remains unchanged. Usually, this functionality is used to create
HTML documents on-the-fly as opposed to return fixed documents. This is referred to as
dynamic and static content respectively.
History of web servers
In 1989 Tim Berners-Lee proposed to his employer CERN (European Organization for Nuclear
Research) a new project, which had the goal of easing the exchange of information between
scientists by using a hypertext system. As a result of the implementation of this project, in
1990 Berners-Lee wrote two programs:
o a browser called Worldwide Web;
o the world's first web server, later known as CERN httpd, which ran on NeXTSTEP.
Between 1991 and 1994 the simplicity and effectiveness of early technologies used to surf
and exchange data through the World Wide Web helped to port them to many different
operating systems and spread their use among lots of different social groups of people, first
in scientific organizations, then in universities and finally in industry.
In 1994 Tim Berners-Lee decided to constitute the World Wide Web Consortium to regulate
the further development of the many technologies involved (HTTP, HTML, etc.) through a
standardization process.
Common features
o Virtual hosting to serve many web sites using one IP address.
o Large file support to be able to serve files whose size is greater than 2 GB on 32 bit
OS.
o Bandwidth throttling to limit the speed of responses in order to not saturate the
network and to be able to serve more clients.
Webserver serves pages for viewing in web browser, application server provides exposes
business logic for client applications through various protocols
Webserver exclusively handles http requests. Application server serves business logic to
application programs through any number of protocols.
Webserver delegation model is fairly simple, when the request comes into the webserver, it
simply passes the request to the program best able to handle it(Server side program). It may
not support transactions and database connection pooling.
Application server is more capable of dynamic behavior than webserver. We can also
configure application server to work as a webserver. Simply application server is a superset
of webserver.
WEB Server
Web Server serves static HTML pages or gifs, jpegs, etc., and can also run code written in
CGI, JSP etc. A Web server handles the HTTP protocol. Eg of some web server are IIS or
apache.
An Application Server is used to run business logic or dynamically generated presentation
code. It can either be .NET based or J2EE based (BEA WebLogic Server, IBM WebSphere,
JBoss).
A J2EE application server runs servlets and JSPs (infact a part of the app server called web
container is responsible for running servlets and JSPs) that are used to create HTML pages
dynamically. In addition, J2EE application server can run EJBs - which are used to execute
business logic.
An Application server has a 'built-in' web server; in addition to that it supports other
modules or features like e-business integration, independent management and security
module, portlets etc.
o Domain is a logically related group of Oracle WebLogic Server resources that are
managed as a single unit
o Domain Provides one point of administration
o Can logically separate:
Development, test, and production applications
Organizational divisions
o The Administration Server stores the master copy of the domain configuration,
including the configuration for all Managed Servers in the domain.
o Each Managed Server stores a local copy of the domain configuration file.
o When a Managed Server starts, it connects to the Administration Server to
synchronize the configuration.
o When the configuration is changed, the Administration Server sends the changed
configuration to the Managed Servers.
A Node Manager is a utility or process running on a physical server that enables starting, stopping,
suspending or restarting the Administration and Managed servers remotely. It is not associated with
a Domain. [Node manager can start any server instances that are resides on the same physical
server].
13.How many ways we can install Oracle Weblogic Server?
You can install Oracle Weblogic server in three different ways.
o weblogic.Server
o DOMAIN_DIR/bin/startManagedWebLogic.sh
o Administration Console
o WLST and Node Manager
If you create a domain in production mode, or if you want to change user credentials in an existing
boot identity file, you can create a new boot identity file. WebLogic Server does not support copying
a boot identity file from one server root directory to another. For information on creating and using
boot identity files, see Boot Identity Files in Administration Console Online Help.
Where WL_HOME is the directory in which you installed WebLogic Server. For more information, see
"Setting the Classpath" in the WebLogic Server Command Reference.
24.How do I edit the config.xml file?
The persistent configuration for a domain of WebLogic Servers and clusters is stored in an XML
configuration file (config.xml). You can modify this file in the following ways:
25.Is there a quick way to create and start a remote Managed Server?
The recommended approach is to use the Domain Configuration Wizard, as described in "Setting Up
and Starting Managed Servers on a Remote Machine" in Creating WebLogic Configurations Using the
Configuration Wizard at
http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/multi.html.
For a streamlined approach, follow the instructions at "Starting Managed Servers From a WebLogic
Server Script" in the Administration Console Online Help.
8 DURGASOFT,Plot No : 202,IInd Floor ,HUDA Maitrivanam,Ameerpet, Hyderabad-500038.
ADV.JAVA means DURGA SIR...
26.The Tree View pane of the WebLogic Console is not visible in my browser. How do I enable it?
27.What is the importance of the Boot Identity file and how will you create it?
o If you create boot identity file, it will not ask the user name and password at server
startup time.
o Create a file called boot.properties in the
<DOMAIN_HOME>\servers\<server_name>\security directory that contains two
lines:
username=username
password=password
o The first time you start the server; the server reads the Boot Identity file and
overwrites it with an encrypted version of the username and password.
o Thereafter, the server remembers the credentials for subsequent startup cycles.
28.What is the MSI mode in Weblogic? How can you enable and disable this option?
29.If the Administration server not available while starting the Managed server which is already
enabled MSI, what are the files it will look for?
o If the Administration Server is unavailable at boot time, Managed Servers search for:
config.xml
SerializedSystemIni.dat
boot.properties(optional)
o Each Managed Server looks in its local config directory for config.xml, a replica of the
domain’s config.xml.
o You cannot change the configuration of the Managed Server that is running in MSI
mode until it restores communication with the Administration Server.
30.What if Administration server goes down? What is the behavior of the managed servers? What
are all the things will available or not available?
31.If an administration server running machine got crashed, how will you restart the server with
same configuration on new machine?
o Oracle WebLogic Server allows the creation of a backup of the server as follows:
Install Oracle WebLogic Server on a backup machine.
Copy the application files to a backup machine.
Copy the configuration files to a backup machine.
Restart the Administration Server on a new machine.
o The new Administration Server contacts the Managed Servers and informs them
that it is running on a new IP address.
32.How can you run Multiple Weblogic server instances in a same physical machine?
o You can run multiple instances of WLS using different configurations on the same
physical machine at the same time by either:
Assigning multiple IP addresses to a machine (multihoming) and defining
each server to use a unique IP address
Specifying the same IP address but using different listen ports
o A multihomed machine:
Is a machine with multiple IP addresses
Can run a different WLS instance that is bound to each IP address
Can be used to configure a cluster on a single machine
34.What are the default Weblogic provided Groups for security realm?
Administrators
Deployers
Operators
Monitors
AppTesters
CrossDomainConnectors
AdminChannelUsers
35.What are the default Weblogic provided Roles for security realm?
Admin
Deployer
Operator
Monitor
AppTester
CrossDomainConnectors
AdminChannelUsers
Anonymous
36.What is the default Weblogic provided domain template file name and location?
Wls.jar is the default domain template and the location is WL_HOME\common\templates\domains
37.What are the elements of the Administration console?
Change Center
Domain Structure
How do I…
Tool Bar
Breadcrumb Navigation
System Status
38.What are the Node elements of the Administration console or Domain Structure?
Welcome Message
Connected to
Home
Log Out
Preferences
Record
Help
Search
41.How will you Enable and disable the domain configuration lock?
The Administration Console Change Center provides a way to lock a domain configuration so you can
make changes to the configuration while preventing other accounts from making changes during
your edit session.
The domain configuration locking feature is always enabled in production domains. It can be enabled
or disabled in development domains. It is disabled by default when you create a new development
domain.
In the banner toolbar region at the top of the right pane of the Console, click Preferences.
Click User Preferences.
Select or clear Automatically Acquire Lock and Activate Changes to enable or disable the
feature.
Click Save.
After you finish
When you enable domain configuration locking, you must use the Change Center to lock and edit for
the domain configuration.
42.What are Dynamic and Non-Dynamic Changes in the Weblogic Console? what is the difference?
Some changes you make in the Administration Console take place immediately when you activate
them. Other changes require you to restart the server or module affected by the change. These
latter changes are called non-dynamic changes. Non-dynamic changes are indicated in the
Administration Console with this warning icon,.
Changes to dynamic configuration attributes become available once they are activated, without
restarting the affected server or system restart. These changes are made available to the server and
run-time hierarchies once they are activated. Changes to non-dynamic configuration attributes
require that the affected servers or system resources be restarted before they become effective.
Note that WebLogic Server’s change management process applies to changes in domain and server
configuration data, not to security or application data.
43.What is the information is going to store in the “security” folder of the Domain directory
contents?
This directory holds the security-related files that are the same for every WebLogic Server instance
in the domain:
SerializedSystemIni.dat
This directory also holds security-related files that are only needed by the domain’s Administration
Server:
DefaultAuthorizerInit.ldift
DefaultAuthenticatorInit.ldift
DefaultRoleMapperInit.ldift
If the SerializedSystemIni.dat file is destroyed or corrupted, you must reconfigure the WebLogic
Server domain. Therefore, you should take the following precautions:
Make a backup copy of the SerializedSystemIni.dat file and put it in a safe location.
Set permissions on the SerializedSystemIni.dat file such that the system administrator of a WebLogic
Server deployment has write and read privileges and no other users have any privileges.
The files you place in this directory can be Java EE applications, such as:
An EAR file
A WAR, EJB JAR, RAR, or CAR archived module
An exploded archive directory for either an application or a module
Bin
This directory contains scripts that are used in the process of starting and stopping the
Administration Server and the Managed Servers in the domain. These scripts are generally provided
as .sh files for UNIX and .cmd files for Windows. The bin directory can optionally contain other
scripts of domain-wide interest, such as scripts to start and stop database management systems,
full-text search engine processes, etc.
Config
This directory contains the current configuration and deployment state of the domain. The central
domain configuration file, config.xml, resides in this directory.
Config/configCache
Contains data that is used to optimize performance when validating changes in the domain’s
configuration documents. This data is internal to WebLogic Server and does not need to be backed
up.
Config/diagnostics
This directory contains system modules for instrumentation in the WebLogic Diagnostic Framework.
Config/jdbc
This directory contains system modules for JDBC: global JDBC modules that can be configured
directly from JMX (as opposed to JSR-88).
Config/jms
This directory contains system modules for JMS: global JMS modules that can be configured directly
from JMX (as opposed to JSR-88).
Config/lib
This directory is not used in the current release of WebLogic Server.
Config/nodemanager
This directory holds configuration information for connection to the Node Manager.
Config/security
This directory contains system modules for the security framework. It contains one security provider
configuration extension for each kind of security provider in the domain’s current realm.
Config/startup
This directory contains system modules that contain startup plans. Startup plans are used to
generate shell scripts that can be used as part of server startup.
ConfigArchive
This directory contains a set of JAR files that save the domain’s configuration state. Just before
pending changes to the configuration are activated, the domain’s existing configuration state,
consisting of the config.xml file and the other related configuration files, is saved in a versioned JAR
file with a name like config.jar#1, config.jar#2, etc.
Console-ext
This directory contains extensions to the Administration Console, which enable you to add content
to the WebLogic Server Administration Console, replace content, and change the logos, styles and
colors without modifying the files that are installed with WebLogic Server. For example, you can add
content that provides custom monitoring and management facilities for your applications. See
Extending the Administration Console.
Init-info
This directory contains files used for WebLogic domain provisioning. You should not modify any files
in this directory.
Lib
Any JAR files you put in this directory are added to the system classpath of each server instance in
the domain when the server’s Java virtual machine starts.
Pending
This directory contains domain configuration files representing configuration changes that have
been requested, but not yet activated. Once the configuration changes have been activated, the
configuration files are deleted from this directory.
Security
This directory holds those security-related files that are the same for every WebLogic Server instance
in the domain:
SerializedSystemIni.dat
This directory also holds security-related files that are only needed by the domain’s Administration
Server:
DefaultAuthorizerInit.ldift
DefaultAuthenticatorInit.ldift
DefaultRoleMapperInit.ldift
Servers
This directory contains one subdirectory for each WebLogic Server instance in the domain. The
subdirectories contain data that is specific to each server instance.
Servers/server-name
This directory is the server directory for the WebLogic Server instance with the same name as the
directory.
Servers/server-name/bin
This directory holds executable or shell files that can be or must be different for each server. The
server environment script (setServerEnv.sh or setServerEnv.cmd) is an example of a file that resides
here because it can differ from one WebLogic Server instance to the next, for example, depending
on whether the server instance has its own startup plan.
Servers/server-name/cache
This directory holds directories and files that contain cached data. By “cached” here we mean that
the data is a copy, possibly in a processed form (compiled, translated, or reformatted), of other data.
Servers/server-name/cache/EJBCompilerCache
This directory is a cache for compiled EJBs.
Servers/server-name/data
This directory holds files that maintain persistent per-server state used to run the WebLogic Server
instance, other than security state, as opposed to temporary, cached or historical information. Files
in this directory are important data that must be retained as the WebLogic Server instance is
brought up, is brought down, crashes, restarts, or is upgraded to a new version.
Servers/server-name/data/ldap
This directory holds the embedded LDAP database. The run-time security state for the WebLogic
Server instance is persisted in this directory.
Servers/server-name/data/store
This directory holds WebLogic persistent stores. For each persistent store, there is a subdirectory
that holds the files that represent the persistent store. The name of the subdirectory is the name of
the persistent store. By convention there is one store named default.
Servers/server-name/logs
This directory holds logs and diagnostic information. This information is historical in nature. It is not
crucial to the operation of the server, and can be deleted (while the WebLogic Server instance is
down, at least) without affecting proper operation. However, the information can be quite useful for
debugging or auditing purposes and should not be deleted without good reason.
Servers/server-name/logs/diagnostic_images
This directory holds information created by the Server Image Capture component of the WebLogic
Diagnostic Framework.
Servers/server-name/logs/jmsServers
This directory contains one subdirectory for each JMS server in the WebLogic Server instance. Each
such subdirectory contains the logs for that JMS server. The name of the subdirectory is the name of
the JMS server.
Servers/server-name/logs/connector
This directory is the default base directory for connector module (JCA ResourceAdapter) logs.
Servers/server-name/security
This directory holds security-related files that can be or must be different for each WebLogic Server
instance. The file boot.properties is an example of a file that resides here because it can differ from
one server to the next. This directory also maintains files related to SSL keys.
Servers/server-name/tmp
This directory holds temporary directories and files that are created while a server instance is
running. For example, a JMS paging directory is automatically created here unless another location is
specified. Files in this directory must be left alone while the server is running, but may be freely
deleted when the server instance is shut down.
Tmp
This directory stores temporary files used in the change management process. You should not
modify any files in this directory.
user_staged_config
By default, configuration information is automatically copied from the Administration Server to each
Managed Server. If instead you prefer to stage configuration changes manually, you can use this
directory as an alternative to the config directory.
o Online mode:
Connected to a running server
Access to all WLS configuration and run-time attributes
Create and activate change sessions similar to the WLS console
o Offline mode:
Domain not running
Access to only persisted domain configuration (config.xml)
Create or update domains similar to using the Configuration Wizard
o Starts and stops Managed Servers remotely: server, domain, and cluster
o Available as either a Java-based or (for UNIX or Linux) a script-based process
o Monitors and acts on server health
o Runs on the same computers as the Managed Servers
o Can be run automatically in the background, as a Windows service or a UNIX
daemon
51.How Node Manager will work with the Weblogic Server? How will you configure Node Manager
in WLS?
o Node Manager must run on each computer that hosts the WLS instances that you
want to control with Node Manager.
o You should configure each computer as a machine in Oracle WebLogic Server, and
assign each server instance, which is to be controlled by Node Manager, to the
machine that the server instance runs on.
o Node Manager should run as an operating system service, so that it automatically
restarts upon system failure or reboot.
53.To start Node Manager at system start up time, what we have to do?
We have to configure Node Manager as a Operating System Service.
Here is an example of how the message from the previous section would be printed to standard out:
<jan 01, 2010 10:51:10 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in
RUNNING mode>In this example, the message attributes are: Locale-formatted
Timestamp, Severity, Subsystem, Message ID, and Message Text.
57.How many log Message Severity levels are there in Weblogic? Explain?
The severity attribute of a WebLogic Server log message indicates the potential impact of the event
or condition that the message reports.
Meaning
Severity
TRACE Used for messages from the Diagnostic Action Library. Upon enabling diagnostic
instrumentation of server and application classes, TRACE messages follow the request
path of a method.
INFO Used for reporting normal operations; a low-level informational message.
NOTICE An informational message with a higher level of importance.
WARNING A suspicious operation or configuration has occurred but it might not affect normal
operation.
ERROR A user error has occurred. The system or application can handle the error with no
interruption and limited degradation of service.
CRITICAL A system or service error has occurred. The system can recover but there might be a
momentary loss or permanent degradation of service.
ALERT A particular service is in an unusable state while other parts of the system continue to
function. Automatic recovery is not possible; the immediate attention of the
administrator is needed to resolve the problem.
EMERGENCY The server is in an unusable state. This severity indicates a severe system failure or panic.
DEBUG A debug message was generated.
Loggers
Log4j defines a Logger class. An application can create multiple loggers, each with a unique name. In
a typical usage of Log4j, an application creates a Logger instance for each application class that will
emit log messages. Loggers exist in a namespace hierarchy and inherit behavior from their ancestors
in the hierarchy.
Appenders
Log4j defines appenders (handlers) to represent destinations for logging output. Multiple appenders
can be defined. For example, an application might define an appender that sends log messages to
standard out, and another appender that writes log messages to a file. Individual loggers might be
configured to write to zero or more appenders. One example usage would be to send all logging
messages (all levels) to a log file, but only ERROR level messages to standard out.
Layouts
Log4j defines layouts to control the format of log messages. Each layout specifies a particular
message format. A specific layout is associated with each appender. This lets you specify a different
log message format for standard out than for file output, for example.
Network channels:
65.What information will be available in “weblogic.xml” file? Using weblogic.xml, you can
configure the following:
66.To configure a “web service” Applications in Weblogic, what are all the files required as a
deployment descriptor?
A Web service application:
67. What is the Virtual directory Mappings? Which file you are going to provide these virtual
directory mappings?
Virtual directories:
Example:
<virtual-directory-mapping>
<local-path>c:/usr/gifs</local-path>
<url-pattern>/images/*</url-pattern>
<url-pattern>*.jpg</url-pattern>
</virtual-directory-mapping>
<virtual-directory-mapping>
<local-path>c:/usr/common_jsps.jar</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
68.What is the deployment descriptor file for ejb applications? What are all the information is
going to provide in that file?
Ejb application deployment descriptor file in Weblogic is “weblogic-ejb-jar.xml”.
Using weblogic-ejb-jar.xml, you can configure the following:
o XML parsers
o XML entity mappings
o JDBC data sources
o JMS connection factories and destinations
o Security realms
o Administration Console
o WebLogic Scripting Tool (WLST)
o weblogic.Deployer Java class
o You can install an application simply by copying it (manually or using the console) to
the “autodeploy”
directory of the domain
o The Administration Server monitors this directory for new, changed, or removed
applications
o This configures, targets, and deploys the application only to the Administration
Server
Location of Applications Directory:
$BEA_HOME/user_projects/domains/domain_name/autodeploy
weblogic.Deployer Syntax:
% java weblogic.Deployer [options]
[-deploy|-undeploy|-redeploy|-start|-stop|-listapps] [file(s)]
Prepare and deploy a new application:
java weblogic.Deployer -adminurl t3://adminserver:7001
-username myuser –password mypass –name HRServices
-source /usr/HRServices.ear -targets serverA –deploy
Redeploy an application:
java weblogic.Deployer -adminurl t3://adminserver:7001
-username myuser –password mypass –name HRServices
–redeploy
Undeploy an application:
java weblogic.Deployer -adminurl t3://adminserver:7001
-username myuser –password mypass –name HRServices
–undeploy
List all applications:
java weblogic.Deployer -adminurl t3://adminserver:7001
-username myuser –password mypass -listapps
80.What is JNDI?
o The Java Naming and Directory Interface is an API for uniformly accessing the
different naming and directory services.
o This is a major step forward because:
Different services use vastly different naming schemes
Java applications can now navigate seamlessly across databases, files,
directories, objects, and networks
Definition Example
Term
The association of an atomic name and www.example.com is bound to
Binding
an object 209.10.217.38.
A set of unique names in a naming
Namespace www.example.com/ products
system
wldeploy is an Ant task version of the weblogic.Deployer utility. You can automate
deployment tasks by placing wldeploy commands in an Ant build.xml file and running Ant to
execute the commands.
weblogic.PlanGenerator is a command-line tools that enables developers to export an
application’s configuration for deployment to multiple WebLogic Server environments.
The deployment API allows you to perform deployment tasks programmatically using Java
classes.
The autodeploy domain directory allows you to deploy an application quickly for evaluation
or testing in a development environment.
Note: WebLogic Server security services are always initialized before server resources, applications,
and startup classes are deployed. For this reason, you cannot configure custom security providers
using startup classes, nor can custom security provider implementations rely on deployed server
resources such as JDBC.
90.How will you “Kill the JVM” or running Weblogic server in different operating systems?
Each WebLogic Server instance runs in its own JVM. If you are unable to shut down a server instance
using the scripts which are provided by the Weblogic (stopWeblogic.cmd/
stopManagedWeblogic.cmd), you can use an operating system command to kill the JVM.
Caution: If you kill the JVM, the server immediately stops all processing. Any session data is lost. If
you kill the JVM for an Administration Server while the server is writing to the config.xml file, you
can corrupt the config.xml file.
If the shell (command prompt) in which you start the server is still open, you can type Ctrl-C.
On a Windows computer, you can use the Task Manager to kill a JVM.
On a UNIX computer, you can use the “ps” command to list all running processes. Then you can use
the kill command to kill the JVM .
For example, standalone EJBs with smaller Load Order values are deployed before those with higher
values.
Modules that are deployed as part of an Enterprise Application (EAR file or directory) are deployed
in the order in which they are specified in the application.xml deployment descriptor.
The auto-deployment feature is enabled for servers that run in development mode. To disable auto-
deployment feature, use one of the following methods to place servers in production mode:
In the Administration Console, click the name of the domain in the left pane, then select the
Production Mode checkbox in the right pane.
At the command line, include the following argument when starting the domain's Administration
Server:
-Dweblogic.ProductionModeEnabled=true Production mode is set for all WebLogic Server instances
in a given domain.
95.I downloaded the WebLogic Server installation file, but the installation program will not run.
What should I do?
The installation file may have been corrupted during the download. Run a checksum on the
installation file and check with technical support for the proper values.
96.Do I need to install WebLogic Server as root on Solaris?
No you don't need to be root, depending on directory permissions.
97.Can I run the Configuration Wizard outside the installer?
Yes. You can start the Configuration Wizard from the Start menu or using a script in the utils
directory. See Creating Domains and Servers in Configuring and Managing WebLogic Server.
Use the Administration Console. See "Using the Administration Console" in the
Administration Console Online Help.
If you want to create scripts that automate domain management, use the weblogic.Admin
utility. See "weblogic.Admin Command-Line Reference" in the .
If you want to create Java-based management applications, use the Java Management
Extensions (JMX) Application Programming Interface (API). See the Programming WebLogic
Management Services with JMX guide.
If you want to edit the config.xml file directly (not recommended), see the BEA WebLogic
Server Configuration Reference.
101.How can I enable Oracle Advanced Security encryption on the JDBC Oracle Thin driver with a
WebLogic JDBC Connection Pool?
Oracle Advanced Security encryption relies on features available through connection properties in
the JDBC driver from Oracle. You can specify connection properties in a WebLogic JDBC connection
pool in the Properties attribute. This attribute is available on the JDBC Connection Pool —>
Configuration —> General tab in the Administration Console. When WebLogic Server creates
database connections for the connection pool, it passes the properties to the JDBC driver so that
connections are created with the specified properties.
For example, to enable Oracle Advanced Security encryption, you may want to specify the following
options:
Properties: user=SCOTT
oracle.net.encryption_client=ACCEPTED
oracle.net.encryption_types_client=RC4_256 oracle.net.crypto_checksum_client=ACCEPTED
protocol=thin
Note: See the Oracle documentation for details about required properties for Oracle Advanced
Security encryption. Properties listed above are for illustration only.
ConnectionReserveTimeoutSeconds
HighestNumWaiters
To manually restart the connection pool using the Administration Console after a database failure,
you can undeploy the connection pool by removing all of its deployment targets, and then redeploy
the connection pool by adding deployment targets.
To do this from the command line using "weblogic.Admin", set the "Targets" attribute of the pool to
an empty string ("") and then set it to the desired set of targets.
105.When should I use MultiPools?
You can use MultiPools in one of two ways
1) For high availability in the event a database connection fails, or
2) For load balancing between JDBC connection pools. Because you can choose only one option, you
need to determine the primary purpose of your MultiPool.
Note: If you implement Multipools for a JDBC application, do not configure driver-level load
balancing or failover for the connection pools used by the MultiPool—the MultiPool provides the
106.What is JDBC?
JDBC is an API for accessing databases in a uniform way.
JDBC provides:
o Oracle and third-party drivers are included in WLS installation for many popular
database products:
Oracle 9i, 10g, and 11g
Sybase Adaptive Server
Microsoft SQL Server
IBM DB2
Informix
MySQL
PointBase
o By default, these drivers are added to server’s classpath.
o A data source object provides a way for a JDBC client to obtain a database
connection from a connection pool.
o A data source:
Is stored in the Oracle WebLogic Server JNDI tree
Can support transactions
Is associated with a connection pool
112.What are the benefits of having Data Sources and Connection Pools in Weblogic?
Message structure
The way to send and receive messages
Scaling guidelines
o JMS connection factories are used to set default client connection parameters,
including:
Message priority
Message time-to-live (TTL)
Message persistence
Transactional behavior
Acknowledgement policy
Flow control
o WLS provides a default client connection factory that:
Uses WebLogic’s default connection settings
Is located on the server JNDI tree at weblogic.jms.ConnectoryFactory
121.What is the use of “Destination” in JMS? How many types of “Destinations” are available in
JMS?
o A threshold and a quota can be set for the server and destination objects.
o A quota is a limit defined for the JMS-administered objects; it includes the following
values:
The maximum number of bytes that can be stored
The maximum number of messages that can be stored
o A threshold is a limit that triggers message paging, flow control, and logged
warnings, using:
Upper and lower values for the number of bytes
Upper and lower values for the number of messages
o When the client becomes active again, its ID is used to retrieve and redeliver
messages.
30.Does the WebLogic JMS server find out about closed or lost connections,
crashes, and other problems and does it recover from them?
Yes, but how it does this depends on whether a Java client crashes or WebLogic Server crashes, as
follows:
If a Java client crashes then the JMS server will clean up all the outstanding server-side
resource from the crashed client JVM, such as:
JMS connection(s) from the crashed client JVM
JMS temporary destination(s) created under the above JMS connection(s)
JMS session(s) created under the above JMS connection(s)
JMS client(s) created under the above JMS session(s) (connection consumer and regular
consumer)
JMS browser(s) created under the above session(s)
JMS producer(s) created under the above session(s)
If WebLogic Server crashes and it is the front-end to the JMS server, then:
A JMS client will lose all the server-side resources listed above.
The client's javax.jms.ExceptionListener.onException(...) will be called (if
javax.jms.JMSConnection.setExceptionListener is set) with a
LostServerException, which extends JMSException.
If WebLogic server crashes and it is a back-end to the JMS server, then:
A JMS client may partially lose some of the server-side resources listed above (only the
resource on the crashed server, such as JMS temporary destination(s), JMS client(s) and JMS
browser(s).
The client's javax.jms.ExceptionListener.onException(...) will be called (if
weblogic.jms.extensions.WLSession.setExceptionListener is set) with a
ConsumerClosedException, which extends JMSException.
PTP messaging model enables the delivery of a message to exactly one recipient.
Pub/sub messaging model enables the delivery of a message to multiple recipients.
It is interesting to note that a topic with a single durable subscriber is semantically similar to a
queue. The differences are as follows:
If you change a topic selector for a durable subscriber, all previous messages in the
subscription are deleted, while if you change a queue selector for consumer, no messages in
the queue are deleted.
A queue may have multiple consumers, and will distribute its messages in a round-robin
fashion, whereas a topic subscriber is limited to only one consumer.
Asynchronous consumers create less network traffic. Messages are pushed unidirectionally,
and are pipelined to the message listener. Pipelining supports the aggregation of multiple
messages into a single network call.
Note: In WebLogic Server, your synchronous consumers can also use the same efficient behavior as
asynchronous consumers by enabling the Prefetch Mode for Synchronous Consumers option on JMS
connection factories
Asynchronous consumers use fewer threads. An asynchronous consumer does not use a
thread while it is inactive. A synchronous consumer consumes a thread for the duration of
its receive call. As a result, a thread can remain idle for long periods, especially if the call
specifies a blocking timeout.
For application code that runs on a server, it is almost always best to use asynchronous
consumers, typically via MDBs. The use of asynchronous consumers prevents the application
code from doing a blocking operation on the server. A blocking operation, in turn, idles a
server-side thread; it can even cause deadlocks. Deadlocks occur when blocking operations
consume all threads. When no threads remain to handle the operations required unblocking
the blocking operation itself, that operation never stops blocking.
141.What is JNDI?
JNDI (Java Naming and Directory Interface) is a Java EE lookup service that maps names to services
and resources. JNDI provides a directory of advertised resources that exist on a particular stand-
alone (unclustered) WebLogic server, or within a WebLogic server cluster. Examples of such
resources include JMS connection factories, JMS destinations, JDBC (database) data sources, and
application EJBs.
A client connecting to any WebLogic server in a WebLogic cluster can transparently reference any
JNDI advertised service or resource hosted on any WebLogic server within the cluster. The client
doesn't require explicit knowledge of which particular WebLogic server in the cluster hosts a desired
resource.
142.What is a JMS connection factory?
A JMS connection factory is a named entity resource stored in JNDI. Applications, message driven
beans (MDBs), and messaging bridges lookup a JMS connection factory in JNDI and use it to create
JMS connections. JMS connections are used in turn to create JMS sessions, producers, and
consumers that can send or receive messages.
143.What is a JMS connection-id?
JMS connection-ids are used to name JMS client connections. Durable subscribers require named
connections, otherwise connections are typically unnamed. Note that within a clustered set of
servers or stand-alone server, only one JMS client connection may use a particular named
connection at a time. An attempt to create new connection with the same name as an existing
connection will fail.
144.What is the difference between a JMS topic and a JMS queue?
JMS queues deliver a message to one consumer, while JMS topics deliver a copy of each message to
each consumer.
145.What is a non-durable topic subscriber?
A non-durable subscriber creates unnamed subscriptions that exist only for the life of the JMS client.
Messages in a non-durable subscription are never persisted—even when the message's publisher
specifies a persistent quality of service (QOS). Shutting down a JMS server terminates all non-
durable subscriptions.
146.What is a durable subscriber?
A durable subscriber creates named subscriptions that continue to exist even after the durable
subscriber exits or the server reboots. A durable subscriber connects to its subscription by specifying
topic-name, connection-id, and subscriber-id. Together, the connection-id and subscriber-id
uniquely name the subscriber’s subscription within a cluster. A copy of each persistent message
published to a topic is persisted to each of the topic's durable subscriptions. In the event of a server
crash and restart, durable subscriptions and their unconsumed persistent messages are recovered.
147.What is the WebLogic Store-and-Forward Service?
The WebLogic Store-and-Forward (SAF) Service enables WebLogic Server to deliver messages reliably
between applications that are distributed across WebLogic Server instances. For example, with the
SAF service, an application that runs on or connects to a local WebLogic Server instance can reliably
send messages to a destination that resides on a remote server. If the destination is not available at
the moment the messages are sent, either because of network problems or system failures, then the
messages are saved on a local server instance, and are forwarded to the remote destination once it
becomes available.
148.When should I use the WebLogic Store-and-Forward Service?
The WebLogic Store-and-Forward (SAF) Service should be used when forwarding JMS messages
between WebLogic Server 9.0 or later domains. The SAF service can deliver messages:
Messaging bridges can be configured to use transactions to ensure exactly-once message forwarding
from any XA capable (global transaction capable) JMS provider to another.
150.When should I use a messaging bridge?
Typically, messaging bridges are used to provide store-and-forward high availability design
requirements. A messaging bridge is configured to consume from a sender's local destination and
forward it to the sender's actual target remote destination. This provides high availability because
the sender is still able to send messages to its local destination even when the target remote
destination is unreachable. When a remote destination is not reachable, the local destination
automatically begins to store messages until the bridge is able to forward them to the target
destination when the target becomes available again.
154.What Is a Transaction?
o A local transaction deals with a single resource manager. Local transactions use the
non-Extended Architecture (non-XA) interface between Oracle WebLogic Server and
the resource manager.
o A distributed transaction coordinates or spans multiple resource managers.
o Global transactions can deal with multiple resource managers. Global transactions
use the Extended Architecture (XA) interface between Oracle WebLogic Server and
the resource managers.
o The Two-Phase Commit (2PC) protocol uses two steps to commit changes within a
distributed transaction.
Phase 1 asks the RMs to prepare to make the changes.
Phase 2 asks the RMs to commit and make the changes permanent or to roll
back the entire transaction.
o A global transaction ID (XID) is used to track all the changes associated with a
distributed transaction.
o Each server has a transaction log that stores information about committed
transactions coordinated by the server that may not have been completed.
Oracle WebLogic Server uses the transaction log when recovering from
system crashes or network failures.
You cannot directly view the transaction log because the records are in a binary format and
are stored in the default persistent store for the server.
o You can configure a JDBC data source to enable the Logging Last Resource (LLR)
transaction optimization, which:
Enables one non-XA resource to participate in a global transaction
Has improved performance and the same ACID guarantee as XA
o The LLR optimization improves performance by:
Removing the need for an XA JDBC driver to connect to the database. XA
JDBC drivers are typically inefficient compared to non-XA JDBC drivers.
Reducing the number of processing steps to complete the transaction, which
also reduces network traffic and I/O
Removing the need for XA processing at the database level (if the database
is the one non-XA resource)
160.What Is LDAP?
The Lightweight Directory Access Protocol:
162.What Is SSL?
Secure Sockets Layer (SSL) is a protocol that enables:
164.What are the Advantages of Production Redeployment? Saves the trouble of:
167.How WLS Protecting Against Attacks? What kinds of Attacks are there?
o Individuals can try to bring down a Web site by sending a large buffer of data, which
starves the system of memory.
o Administrators can combat this attack by setting a threshold for incoming data.
o Individuals can try to take down a Web site by sending small, incomplete messages
that cause the server to wait.
o Administrators can combat this attack by setting a threshold.
o Connections time out while waiting for the remainder of the data if they have
reached the threshold set by the administrator.
o You can configure a separate administration port for all administration traffic.
o You can change the Context path of the console.
o You can disable the console (application).
o Works by setting or overriding the deployment property values that are defined in
an application’s WLS deployment descriptor
o Helps to easily modify an application’s WLS configuration for deployment into
different multiple WLS environments without modifying the deployment descriptor
files that are included in the application archive
Enables an application to be deployed to multiple domains or to multiple target servers and clusters
that have a different configuration within the same
1. domain
177.How will you generate a Deployment Plan Using the Administration Console?
1. staged (default): Files are copied to the preconfigured staging directory for
preparation and activation.
2. nostage: Files are deployed from a static location.
3. external_stage: Files are copied by a user or a third-party tool before deployment.
1. You can redeploy a revised version of a production application alongside the older
version:
Without affecting the existing clients to the application
Without interrupting the availability of the application to the new client
request
The older version is undeployed after all current clients complete their work.
1. Production redeployment:
1. Allows two versions of a single Web application or module to run
simultaneously
2. Requires you to include unique version information either:
Within the application’s META-INF/MANIFEST.MF file
As part of the deployment process
2. When a new version is redeployed, WLS automatically:
Routes existing clients to the prior (retired) version
Routes new clients to the new version
Undeploys the prior version when all existing clients finish their work or
their conversations time out
182.What are the Requirements and Restrictions for Production Redeployment in WLS?
Weblogic-Application-Version: Version1.0Beta
186.What is a cluster Definition?
187.What Is a Cluster?
A cluster:
1. There are two main benefits of clustering together Oracle WebLogic Servers:
1. Scalability
2. High availability
2. Scalability is the ability to provide more capacity for an application, in this case, by
adding additional servers without having to make major architectural changes.
3. High availability ensures that when a server (in a cluster) fails, there are other
servers to take over the work, so that the client is not affected.
1. Application failover
When an object in an application that is performing a task becomes
unavailable, another object takes over and finishes
the job.
2. Site failover
When all the services and applications in a single site fail, they can switch to
a separate site and continue processing.
3. Server migration
When a server fails, pinned services can be migrated to another server in a
cluster.
4. Load balancing
1. Applications are generally broken into multiple tiers, each representing its distinct
functionality:
2. Web tier
3. Presentation tier
4. Business or object tier
5. WebLogic provides clustering support for all three tiers.
6. Other services, such as JMS and JDBC, can take advantage of clusters but load-
balancing and failover is a little different.
If a server in the cluster unexpectedly closes its socket, it is marked as “failed” and its
services are not used.
Server instances use multicast to broadcast heartbeats every 10 seconds to the other server
instances in the cluster.
If three heartbeats are missed from a peer server, the server is marked as “failed” and its
services are not used.
Accessing the nonclustered objects that reside on a remote server instance in the cluster
Replicating HTTP session states and stateful session EJB states between a primary and a
secondary server
Accessing the clustered objects that reside on a remote server instance (typically, in a
multitier cluster architecture)
As an example, using a three-node cluster, the worst-case scenario would be five open
sockets per server:
Administration Console
Configuration Wizard
WebLogic Scripting Tool (WLST)
Using the Cluster MBean
Web applications use HTTP sessions to track information in server memory for each client.
By default, when a client fails over to another server in the cluster, its session information is
lost.
Oracle WebLogic Server supports several Session Replication strategies to recover sessions
from failed servers:
In-memory replication
JDBC replication
File replication
Replication is configured for each Web application within its weblogic.xml file.
Similar options are available for stateful EJB applications.
1. Oracle WebLogic Server provides clustering support for JSPs and servlets by
replicating the HTTP session state.
2. To benefit from HTTP session state clustering, you must ensure that the session
state is persistent, by configuring:
In-memory replication
JDBC replication
File system replication
3. You must also access the cluster via a collection of Web servers with identically
configured proxy plug-ins or load-balancing hardware.
4. Session persistence is configured using the <session-descriptor> element in the
weblogic.xml deployment descriptor file.
Each persistence method has its own set of configurable parameters.
1. Replication groups:
Represent a subset of servers within a cluster
Help to determine the placement of secondary sessions (avoid replicating
within the same room, for example)
Are not explicitly defined in the console-like machines and clusters
2. WLS attempts to:
1. Send secondary sessions to servers that are assigned to the preferred
secondary replication group of the primary server
2. Avoid sending secondary sessions to servers that are assigned to the same
replication group as the primary server
1. Subsequent requests from the same client must have access to the same primary
object.
2. To use in-memory replication for the HTTP session state, clients must access the
cluster using either:
1. The load-balancing hardware (WLS aware)
2. A collection of Web servers, or a single Web server, with WebLogic proxy
plug-ins (configured identically)
3. Oracle WebLogic Server configured with HTTPClusterServlet
Replication groups:
Represent a subset of servers within a cluster
Help to determine the placement of secondary sessions
(avoid replicating within the same room, for example)
Are not explicitly defined in the console-like machines and
clusters
WLS attempts to:
Send secondary sessions to servers that are assigned to
the preferred secondary replication group of the primary
server
Avoid sending secondary sessions to servers that are
assigned to the same replication group as the primary server
Subsequent requests from the same client must have access to the
same primary object.
To use in-memory replication for the HTTP session state, clients
must access the cluster using either:
The load-balancing hardware (WLS aware)
A collection of Web servers, or a single Web server, with
WebLogic proxy plug-ins (configured identically)
Oracle WebLogic Server configured with HTTPClusterServlet
Ex:
<session-descriptor>
<persistent-store-type>jdbc</persistent-store-type>
<persistent-store-pool>MyDataSource</persistent-store-pool>
</session-descriptor>
Create a folder shared by all servers on the cluster on a highly available file system.
Assign read/write privileges to the folder.
Configure file session persistence in the weblogic.xml deployment descriptor.
Ex:
<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>/mnt/wls_share</persistent-store-dir>
</session-descriptor>
Interoperating with third-party JMS products (for example, MQSeries). See Q. What is a
messaging bridge?.
When using temporary destinations with the JMSReplyTo field to return a response to a
request.
Environment with low tolerance for message latency. SAF increases latency and may lower
throughput.