Você está na página 1de 45

SAM Technologies

info@esamtech.com

1.What is file name to install weblogic in Linux ? and How to install ?


The file Name is server103_linux32.bin
In Windows server103_win32.cmd
From the VPN using the putty tool
2.What is domain in WLS? How to create domain in WLS?
A WebLogic Server administration domain is a logically related group of WebLogic Server resources.
Domains include a special WebLogic Server instance called the Administration Server, which is the
central point from which you configure and manage all resources in the domain. Usually, you
configure a domain to include additional WebLogic Server instances called Managed Servers. You
deploy Web applications, EJBs, Web services, and other resources onto the Managed Servers and use
the Administration Server for configuration and management purposes only.
The Domain Configuration Wizard is located below WL_HOME/common/bin, where WL_HOME is
BEA_HOME/weblogic81. Start it by running the config.cmd.
The Domain Configuration Wizard is located below C:\bea\wlserver_10.3\common\bin, in 10.3 version
How many ways to create a domain
Using domain configuration wizard
Using domain configuration template
Using weblogic.Admin command
Using WLST scripts
Fortunately, many different ways to create and configure a domain are available. The most common
way to create a domain is through the Domain Configuration Wizard and the most common way to
configure the domain is by using the WebLogic Console
Domain creation procedure in windows through graphical mode
The Domain Configuration Wizard is located below C:\bea\wlserver_10.3\common\bin, in 10.3 version
Open the command prompt goto
C:\bea\wlserver_10.3\common\bin and run the script
Config.cmd and press Enter
Config.cmd -mode=console the domain create in console prompt

Domain creation procedure in unix through Console mode


When we Are creating new Domain in Unix find the below Steps you need to follow.
1. Go to Weblogic Common > bin Directory For config.sh like below
bash-3.00$ cd /bea/weblogic92/common/bin
bash-3.00$ ./config.sh -mode=console -log=/usr/babu/temp/dom_cre.log

By Bhramaiah

SAM Technologies

info@esamtech.com

Find Below steps One By One :


<BEA WebLogic Configuration Wizard >
Choose between creating and extending a domain. Based on your selection, the Configuration Wizard
guides you through the steps to
generate a new or extend an existing domain.
->1|Create a new WebLogic domain
| Create a WebLogic domain in your projects directory.
2|Extend an existing WebLogic domain
| Extend an existing WebLogic domain. Use this option to add applications and services, or to
override existing database access
|(JDBC) and messaging (JMS) settings. You can also incorporate additional functionality in your
domain, for example, by including
|AquaLogic Service Bus.
Enter index number to select OR [Exit][Next]> 1
< BEA WebLogic Configuration Wizard >
Select Domain Source:

Select the source from which the domain will be created. You can create the domain by selecting from
the required components or by
selecting from a list of existing domain templates.
->1|Choose Weblogic Platform components
| You can choose the Weblogic component(s) that you want supported in your domain.
2|Choose custom template
| Choose this option if you want to use an existing template. This could be a custom created
template using the Template Builder.
Enter index number to select OR [Exit][Previous][Next]> Next
<- BEA WebLogic Configuration Wizard >
Application Template Selection:
Available Templates
|_____WebLogic Server (Required)x
|_____Workshop for WebLogic Platform [2]
|_____WebLogic Integration [3]
|_____WebLogic Portal [4]
|_____WebLogic Portal GroupSpace Framework [5]
|_____WebLogic Portal GroupSpace Application [6]
Enter number exactly as it appears in brackets to toggle selection OR [Exit][Previous][Next]> Next
<- BEA WebLogic Configuration Wizard >

By Bhramaiah

SAM Technologies

info@esamtech.com

Configure Administrator Username and Password:


Create a user to be assigned to the Administrator role. This user is the default administrator used to
start development mode servers.
|
Name
|
Value
|
_|_________________________|_________________________________________|
1|
*User name:
|
weblogic
|
2|
*User password:
|
|
3| *Confirm user password: |
|
4|
Description:
| This user is the default administrator. |
Use above value or select another option:
1 Modify User name
2 Modify User password
3 Modify Confirm user password
4 Modify Description
Enter option number to select OR [Exit][Previous][Next]> 2
< BEA WebLogic Configuration Wizard ->
Configure Administrator Username and Password:
Create a user to be assigned to the Administrator role. This user is the default administrator used to
start development mode servers.
*User password: = []
Enter new *User password: OR [Exit][Reset][Accept]>
<- BEA WebLogic Configuration Wizard >
Configure Administrator Username and Password:
Create a user to be assigned to the Administrator role. This user is the default administrator used to
start development mode servers.
|
Name
|
Value
|
_|_________________________|_________________________________________|
1|
*User name:
|
weblogic
|
2|
*User password:
|
********
|
3| *Confirm user password: |
|
4|
Description:
| This user is the default administrator. |
Use above value or select another option:
1 Modify User name
2 Modify User password
3 Modify Confirm user password
4 Modify Description
5 Discard Changes

By Bhramaiah

SAM Technologies

info@esamtech.com

Enter option number to select OR [Exit][Previous][Next]> 3


<BEA WebLogic Configuration Wizard >
Configure Administrator Username and Password:
Create a user to be assigned to the Administrator role. This user is the default administrator used to
start development mode servers.
*Confirm user password: = []
Enter new *Confirm user password: OR [Exit][Reset][Accept]>
< BEA WebLogic Configuration Wizard >
Configure Administrator Username and Password:
Create a user to be assigned to the Administrator role. This user is the default administrator used to
start development mode servers.
|
Name
|
Value
|
_|_________________________|_________________________________________|
1|
*User name:
|
weblogic
|
2|
*User password:
|
********
|
3| *Confirm user password: |
********
|
4|
Description:
| This user is the default administrator. |
Use above value or select another option:
1 Modify User name
2 Modify User password
3 Modify Confirm user password
4 Modify Description
5 Discard Changes
Enter option number to select OR [Exit][Previous][Next]> Next
< BEA WebLogic Configuration Wizard >
Domain Mode Configuration:

Enable Development or Production Mode for this domain.


->1|Development Mode
2|Production Mode
Enter index number to select OR [Exit][Previous][Next]> 2
<BEA WebLogic Configuration Wizard ->
Java SDK Selection:
-

By Bhramaiah

SAM Technologies

info@esamtech.com

->1|Sun SDK 1.5.0_06 @ /u13/weblogic/EPC/bea/jdk150_06


2|Other Java SDK
Enter index number to select OR [Exit][Previous][Next]> 1
< BEA WebLogic Configuration Wizard ->
Choose Configuration Option:
*Do you want to modify any of the preconfigured settings or defaults in your template?
*
*To keep the default or template settings, and proceed directly to name and create your domain,
leave No selected.
1|Yes
->2|No
Enter index number to select OR [Exit][Previous][Next]> Next
<BEA WebLogic Configuration Wizard >
Select the target domain directory for this domain:

Target Location = [Enter new value or use default "/u13/weblogic/EPC/bea/user_projects/domains"]


Enter new Target Location OR [Exit][Previous][Next]> Next
<- BEA WebLogic Configuration Wizard >
Edit Domain Information:

| Name | Value |
_|________|_____________|
1| *Name: | base_domain |
Enter value for Name OR [Exit][Previous][Next]> babu
< BEA WebLogic Configuration Wizard ->
Edit Domain Information:

| Name | Value |
_|________|_______|
1| *Name: | babu |
Use above value or select another option:
1 Modify Name
2 Discard Changes
Enter option number to select OR [Exit][Previous][Next]> Next

By Bhramaiah

SAM Technologies

info@esamtech.com

< BEA WebLogic Configuration Wizard ->


Domain Validation Failed!:

A WebLogic domain already exists at that location. To replace the existing domain, delete it first.
Otherwise, please choose a different
directory.
Enter [Exit][Previous]> Previous
<-BEA WebLogic Configuration Wizard >
Edit Domain Information:

| Name | Value |
_|________|_______|
1| *Name: | babu |
Enter value for Name OR [Exit][Previous][Next]> gbabu
< BEA WebLogic Configuration Wizard >
Edit Domain Information:

| Name | Value |
_|________|_______|
1| *Name: | gbabu |
Use above value or select another option:
1 Modify Name
2 Discard Changes
Enter option number to select OR [Exit][Previous][Next]> Next
< BEA WebLogic Configuration Wizard >
Creating Domain
0%
25%
50%
75%
100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****
To create a domain using the weblogic.Server command:

1. Open a command shell.


2. Set the CLASSPATH to include the WebLogic Server classes. The easiest way to set your
CLASSPATH is to run the setWLSEnv.cmd (Windows) or the setWLSEnv.sh (UNIX) script. The
script is located in the WebLogic Server installation at:
BEA_Home/weblogic81/server/bin

3. Run the following command:


java weblogic.Server

By Bhramaiah

SAM Technologies

info@esamtech.com

When you are prompted for a username and password, enter any values you choose. You will
be prompted with:
Would you like the server to create a default configuration and boot? (y/n)
java -Dweblogic.Domain=Chicago weblogic.Server
creates a domain called "Chicago".

4. Answer Y. You will be asked to confirm the password.


5. Enter the same password you entered in step 3. The server starts and creates a default
config.xml file in the directory from which you ran the java weblogic.Server command.
The server creates a Boot Identity file (called boot.properties) that contains the username and
password you entered in step 3. When this file is present in the domain's root directory, the
server does not prompt for a username and password during startup.
**********************************************************
3.What is the use of boot. Properties file and where it located?
We are create a domain in Development mode by default boot.properties file is created .
Location is : C:\bea\user_projects\domains\dev_test\servers\AdminServer\security\ boot.properties
you will notice that you have to enter username and password for each managed server during startup and shutdown. This in
contrary to the administration server where you don't need to enter username and password at startup. I was wondering if
there was an easy way of skipping this manual step for the managed servers as well.And yes, there is an easy and elegant way
to prevent entering credentials every startup and shutdown. Just follow these steps:
1 Create a boot.properties file.
Create a plain text file called boot.properties with the following content:
username=scott
password=tiger
2 Place the boot.properties file in the security directory.
Save or copy this file in the security directory under the managed server root directory. This directory was not created at
installation time, so I had to create it myself. The server root directory is located at
<middleware_home>\user_projects\<domain>\<managed_server> i.e.
D:\Middleware\user_projects\domains\base_domain\servers\bam_server1.
3 Start the managed server.
The server will read the credentials from the boot.properties file and in case of plain text username and password the server
encrypt the username and password. Notice the following lines in the output:
<Sep 23, 2009 10:51:25 PM CEST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Sep 23, 2009 10:51:25 PM CEST> <Notice> <Security> <BEA-090083> <Storing boot identity in the file:
D:\Middleware\user_projects\domains\base_domain\servers\bam_server1\security\boot.properties>The boot.properties file
is still plain text with the username and password values encrypted. Do no copy the encrypted version between managed
servers. Even when the credentials are the same, the resulting file is different.

By Bhramaiah

SAM Technologies

info@esamtech.com

4.what is config.xml in weblogic?


it is heart of the weblogic server and its maintains the all the info about managed and admin server
details like Ipadd,portno...etc, and whenever you update the admin console that info is updated in
config.xml and while restart the server,server will get details from config.xml only....it is also called as
configuration repository config.xml.
The config.xml file consists of a series of XML elements. The Domain element is the top-level element,
and all elements in the Domain are children of the Domain element. The Domain element includes
child elements, such as the Server, Cluster, and Application elements. These child elements may have
children themselves.
What we can edit in the config.xml file?
1. We can replicate the server instances.
2. We can replicate the cluster instances.
3. We can replicate the machine configurations.
What we should not touch(cannot change)?
1. security settings -- realm details
2. encrypted password data...
What are the basic changes observed compared to WebLogic 8.1?
1. The configuration in the 8.1 is un-ordered as and when you configured new resource that will be
appendded at the end. whereas in the WebLogic 9.x it is very clear that follows the xml schema so we
cannot place a tag line up or down, it follows strict rules defined in domain.xsd.
2. The schema defination clearly mentioned that an element if selected to place in the config.xml that
could we need to check for parent element, data type (string, boolean, number etc.
Note: Do not edit the config.xml file while the Administration Server is running.
5. Ways to start Administration Serverin Oracle WebLogic

By Bhramaiah

SAM Technologies

info@esamtech.com

1.Using startup script


2. From Windows Start Menu (windows only)
3. Using java weblogic.Server command
4. Using WLST (WebLogic Scripting Tool) and Node Manager
5. Using WLST without Node Manager
Ways to start Managed Serverin Oracle WebLogic
1.Using startup script
2. Using Administration Console
3. Using WLST and Node Manager
4. Using java weblogic.Server command
1. Starting Administration Server (startWebLogic.cmd or .sh) ./ startWebLogic.sh
2. Starting Managed Server (startManagedWebLogic.sh or .cmd)
A. To Start WebLogic Administration Server Instance
Go to domain for which you wish to start Administration Server
cd $BEA_HOME/user_projects/domains/<domain_name>/bin
startWebLogic.cmd (for Windows)
startWebLogic.sh (for Unix)
./startWebLogic.sh
confirm that WebLogic Adminstration Server started properly by looking at message Service started
RUNNING mode. Log file in below picture shows that AdminSever is listening on Port 7001 and all IP
addresses on specific machine.

Startup/Shutdown Log file can be found at $BEA_HOME/ user_projects/ domains/ <domain_name>


/servers/<ServerName> /logs / <ServerName>.log
B. Start Managed Server Instance
If you created Managed Server while creating domain then you can start Managed Server using
startManagedWebLogic command
$BEA_HOME/user_projects/domains/<domain_name>/bin
startManagedWebLogic.cmd <managed_server_name> <admin_url> (for Windows)
./startManagedWebLogic.sh <managed_server_name> <admin_url> (for Unix)
I created Managed Server MS1 with Admin Port as 7003
startManagedWebLogic.cmd ms1 http://localhost:7003 (Windows)
6. What is cluster in Web Logic Server? How to create cluster in Web Logic Server?
How to configure Cluster in webserver/PROXY?tell me complete configuration?
A WebLogic Server cluster consists of multiple WebLogic Server server instances running
simultaneously and working together to provide increased scalability and reliability. A cluster appears
to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can

By Bhramaiah

SAM Technologies

info@esamtech.com

run on the same machine, or be located on different machines. You can increase a clusters capacity
by adding additional server instances to the cluster on an existing machine, or you can add machines
to the cluster to host the incremental server instances. Each server instance in a cluster must run the
same version of WebLogic Server.(Or)
Group of WebLogic Managed Server Instances that work together to provide high availability and
scalability for applications is called cluster. WebLogic Servers with in cluster can run on same machine
or different machines. These are also called as managed Server cluster.
The Tools for Creating and Configuring a WebLogic Cluster
The primary tools you have available to create or configure a WebLogic cluster are the Domain
Configuration Wizard and the Administration Console. Which tool you use depends on the type of
clustering architecture you want to employ and the capabilities of these tools to support your efforts.
The Domain Configuration Wizard is an excellent tool if you are creating a WebLogic cluster from
scratch. This tool presents you with options on the type of WebLogic domain you want to create. One
such option is a domain with an administration server and one or more managed servers that are
clustered. However, this option creates the administration server and the clustered WebLogic Server
instances on the same single server machine.
The Administration Console is a tool that you can use to configure a WebLogic cluster from existing
managed servers in a domain. For example, if your clustering architecture warrants the clustered
servers to be on separate server machines, the best approach would be to create the administration
server and managed servers independently on each of those machines using the Domain
Configuration Wizard. After the managed servers are created and registered with the domain's
administration server, you could use the Administration Console to graphically configure a cluster from
the existing managed servers.
Guidelines for Configuring Your WebLogic Cluster
Before you start creating your WebLogic cluster, it is worth reviewing the following guidelines for
creating a cluster:
You should try to use DNS names in a production environment to specify the location of the
managed servers that will comprise a WebLogic cluster. The use of IP addresses can result in
IP address translation errors if you are using a firewall to form a DMZ. However, if you do use
IP addresses, they should be permanently assigned to the server machine (static) and not
dynamically assigned.
The WebLogic cluster must have a unique IP address and listen port combination for each of
its managed server instances. The following are some examples:
o If managed server instances in a cluster share an IP address, as in the case of a nonmultihomed single server, a unique listen port number is assigned to each server
instance in the cluster.
Configuring a Cluster Using the Administration Console
This section provides a step-by-step guide showing how you can configure a WebLogic cluster using
the Administration Console. The assumptions for this exercise are that you already have a WebLogic
domain set up with two managed servers, and the network configuration for the WebLogic domain
adheres to the clustering guidelines discussed in the preceding section. The name of the WebLogic
domain, cluster and managed servers, and their network configurations can differ from those used in
the example because the steps to configure the WebLogic cluster still remain the same.
To learn how to set up and configure a WebLogic domain, see "Understanding WebLogic Domains,"
"Creating and Extending WebLogic Domains," and "Configuring the Network Resources for a WebLogic
Domain."
Configure Apache Webserver with Weblogic Server
Step 1) Make sure the Apache server runs on port 8080.( This is because sometimes IIS, or some
antivirus s/w runs on that port).This can be done by modifying the httpd.conf present at
D:\Program Files\Apache Group\Apache2\conf
Modify the Listen port to 8080

By Bhramaiah

SAM Technologies

info@esamtech.com

Listen 8080
Step 2) Copy the mod_wl_20.so from <bea_home>\wlserver_10.3\server\plugin\win\32 to
D:\Program Files\Apache Group\Apache2\modules
Step 3) Add these lines in the httpd.conf file
LoadModule weblogic_module modules/mod_wl_20.so
<Location />
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster localhost:7003,localhost:7005
Debug ON
WLLogFile c:/temp/wlproxy.log
WLTempDir c:/temp
</IfModule>
Step 4) Restart Apache and access the application deployed on the Cluster using
http://localhost:8080/YourApp
This will forward the request to the Weblogic Cluster
You can check the headers sent and received to WLS in wlproxy.log file.
4.What Kind of proxy Servers are using in your project ?what is the configuration file(s)?
Apache HTTP Server or
Configuring SunOne ( iPlanet) Webserver with Weblogic
Step 1). Create a Webserver running on port 8081 using the Admin Console of SunOne.
Step 2). Copy over the plugin present in the following directory
C:\bea103\wlserver_10.3\server\plugin\win\32\proxy61.dll
To the Sun One Installation Directory
C:\Sun\WebServer6.1\plugins\lib
Step 3). Load the plugins by adding the following lines in magnus.conf present in
C:\Sun\WebServer6.1\https-testserver\config
magnus.conf
Init fn=load-modules funcs=wl_proxy,wl_init shlib=C:/Sun/WebServer6.1/plugins/lib/
proxy61.dll
To forward request to a Standalone Server add the following lines to obj.conf file present in
the following directory
C:\Sun\WebServer6.1\https-testserver\config

By Bhramaiah

SAM Technologies

info@esamtech.com

obj.conf

Service fn=wl_proxy WebLogicHost=localhost WebLogicPort=7001 WLLogFile=C:/Sun/


WebServer6.1/https-testserver/logs/proxy.log Debug=ALL DebugConfigInfo=ON
To forward request to a CLuster we need to add the following in the bj.conf file

Service fn=wl_proxy WebLogicCluster=localhost:7001,localhost:7003? WLLogFile=C:/


Sun/WebServer6.1/https-testserver/logs/proxy.log Debug=ALL DebugConfigInfo=ON
To configure SSL Between SunOne Webserver and Weblogic Server, add the following in
the obj.conf file

Service fn=wl_proxy WebLogicHost=localhost WebLogicPort=7001 WLLogFile=C:/


Sun/WebServer6.1/https-testserver/logs/proxy.log Debug=ALL DebugConfigInfo=ON
SecureProxy=ON TrustedCAFile=C:/Sun/WebServer6.1/https-testserver/rootCA.pem
RequireSSLHostMatch=false
where rootCA.pem is the root certificate of Weblogic Server.
Step 4). Start the test server using startsvr.bat present in
C:\Sun\WebServer6.1\https-testserver
Step 5). Acess the Weblogic Console using the following url
http://localhost:8081/console/
***********************************************************************
6. Thread Dump:

1.
2.
3.
4.
5.
6.
7.
8.

What is Thread dump?


When we will take Thread dump? (Scenarios)
How Many ways take Thread Dumps
Thread Dump Generating Procedure
What can I Analysis with Thread Dump?
How can I analysis thread dump?
Actions taken for Issue resolving

References
What is Thread dump?
Thread Dump is a textual dump of all active threads and monitors of Java apps running in a Virtual
Machine.
When we will take Thread dump? (Scenarios)

By Bhramaiah

SAM Technologies

info@esamtech.com

1. Scenario 1: when server is hang Position, i.e. that time server will not respond to coming
requests.

1. 2. Scenario 2: While sever is taking more time to restart


1. Scenario 3: When we are Getting exception like java.lang.OutOfMemoryException
Scenario 4: Process running out of File descriptors. Server cannot accept further requests
because sockets cannot be created
5. Scenario 5: Infinite Looping in the code
How many ways take Thread Dumps?
Many types we have to take a Thread dumps. As per your flexibility you can choose one Procedure.
For analyzing take dumps some Intervals (like every 10mins, 10mins etc.).
Generating Dump Talking Procedures
1. Take Thread dump from Console by Using of below command
$kill -3 PID
(For Getting PID, Use this Command ps ef | grep java)
Here The Output of the Thread Dump will be generated in the Server STDOUT.
(Note: If a process is not responding to kill -3 <PID> then its a JVM bug.)
On Windows machine:
cltr + break
2. Generation Thread Dump via Admin Console

1.
2.
3.
4.
5.
6.

login to Admin Console(with Admin Username/Password)


Click on Server, after choose your server
Goto Monitoring TAB
Goto Threads TAB, after click on Dump Thread Stack Button
Now you can view the all the Threads in Same page

Copy and paste in a txt file.


3. We can Collect Thread Dump Using WebLogic.Admin which is deprecated, but still available or
may be available in near future as well As i think because it is one of the best debugging utility for
Admins.
java WebLogic.Admin -url t3://hostname: port -username Weblogic -password Weblogic
THREAD_DUMP
This Thread Dumps will be generated in Servers STDOUT file
4. Getting Thread Dumps by using Jstack Utility
a.jstack m <pid> (to connect to a live java process)
b. jstack m [server_id@]<remote server IP or hostname>
(to connect to a remote debug server)

By Bhramaiah

SAM Technologies

info@esamtech.com

(-m Means print both java and native frames (mixed mode))
5. By Using WLST Script, can contain extension of (.py)
connect(weblogic,weblogic,t3://hostname:port)
cd (Servers)
ls()
cd (AdminServer)
ls()
threadDump()
Execute this Script in console.
What can I Analysis with Thread Dumps?
We need to analyze the thread dumps for analyzing running threads and their states to identifying.
How can I analysis thread dumps?
For analyze thread dumps we have lots of tools to understand easily thread states

1. 1. samurai tool :
(Visit: http://yusuke.homeip.net/samurai/en/index.html)
In this tool you can identify all the Thread states by
Deadlocks and waiting state threads.

identifying colors. We need to take care about

More Details:
$ java -jar samurai.jar
After running we will get a Screen like below
Goto Thread dump tab
When Samurai detects a thread dump in your log, a tab named Thread Dump will appear.
You can just click Thread dumps tab to see the analysis result.
Samurai colors idle threads in gray, blocked threds in red and running threds in green.
There are three result views and Samurai shows Table view by default.
In many case you are just interested in the table view and the sequence view. Use the table view to
decide which thread needs be inspected, the sequence view to understand the threads behavior.
You should takecare especially threds always in red.
Actions taken for Issue resolving

1. Classic Dead Locks : Look for the threads waiting for monitor entry
For Example :
ExecuteThread: 95 for queue: default daemon prio=5 tid=0411cf8 nid=06c waiting for
monitor entry [0xd0f80000..0xd0f819d8]
at weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java:766)
at weblogic.jdbc.common.internal.ConnectionEnv.destroy(ConnectionEnv.java:590)

By Bhramaiah

SAM Technologies

info@esamtech.com

Reason: The above thread is waiting to acquire lock on Resource Allocator object. The next step is to
identify the thread that is holding the Resource Allocator object
ExecuteThread: 0 for queue: __weblogic_admin_rmi_queue daemon prio=5 tid=041b978
nid=077 waiting for monitor entry [0xd0480000..0xd04819d8]
at weblogic.jdbc.common.internal.ConnectionEnv.getPrepStmtCacheHits(ConnectionEnv.java:174)
at weblogic.common.internal.ResourceAllocator.getPrepStmtCacheHitCount
(ResourceAllocator.java:1525)
Reason: This thread is holding lock on source Allocator object, but is waiting for Connection Env
object. This is a classic deadlock.
2. Threads in wait() state:
A sample dump:
ExecuteThread: 10 for queue: SERV_EJB_QUEUE daemon prio=5 tid=0005607f0 nid=030 in
Object.wait() [83300000..83301998]
at java.lang.Object.wait(Native Method)
- waiting on <0xc357bf18> (a weblogic.ejb20.pool.StatelessSessionPool)
at weblogic.ejb20.pool.StatelessSessionPool.waitForBean(StatelessSessionPool.java:222)
Reason: The above thread would come out of wait() under two conditions
(Depending on application logic)
1) One of the thread available in the execute queue pool would call notify() on this object when an
instance is available. (If the wait() is indefinite).
This can cause the thread to hang for ever if server never does a notify() to this object.
2) If the timeout exceeds, the thread would throw an exception and back to execute queue thread
pool.
How to set heap size in weblogic?
There are two ways to increase the heap size in weblogic.
If you are using the nodemanager then Login to the weblogic Administration console, then click on
Servers --> ServerName --> General --> Remote Start Options and look for the Java Arguments
Here you can add -512Xmx -512Xms to the java arguments. If you want to increase the heap size
then alter these values from 512 to 1024 depending on your requirements.
If you do not have a nodemanager configured. Login the operating system , Under
$domain_home/bin directory look for setDomainEnv.sh and add the following -512Xmx -512Xms to
the java options.
These changes will require a restart of the JVM.
********************************************************************

By Bhramaiah

SAM Technologies

info@esamtech.com

8.What is perfomance tuning?how do you tune the perfomance step by step process ?Ans
OS Level to our Application Level?
Ans: Performance tuning WebLogic Server and your WebLogic Server application is a complex and
iterative process.
Tuning allows you to adjust resources to achieve your performance objectives.
The following sections provide a tuning roadmap and tuning tips for you can use to improve system
performance.
1. Understand Your Performance Objectives
2. Measure Your Performance Metrics
2.1. Monitor Disk and CPU Utilization
2.2. Monitor Data Transfers Across the Network
3. Locate Bottlenecks in Your System
4. Minimize Impact of Bottlenecks

Tune Your Application

Tune your DB

Tune WebLogic Server Performance Parameters

Tune Your JVM

Tune the Operating System

Tuning the WebLogic Persistent Store

9. Steps on How to Recover or Reset Lost Weblogic Admin Password


Steps on how to recover or reset lost Weblogic admin (administrator) password
If you lost your Weblogic admin password, follow the steps below to recover/reset.
1. Make sure Weblogic instance is down.
2. Set your environment variables using setDomainEnv.sh.
3. cd to security directory in your instance.
(eg: $WL_HOME/user_projects/domains/base_domain/security)
4. Run:
java weblogic.security.utils.AdminAccount admin_user admin_pass .Remember to change
admin_user and admin_pass to your need.
Also, dont forget the period . at the end of the above command, it is required.
5. After running the command, the file DefaultAuthenticatorInit.ldift will get updated.
6. Delete the following file from ldap folder:

By Bhramaiah

SAM Technologies

info@esamtech.com

cd WL_HOME/user_projects/domains/base_domain/servers/AdminServer/data/ldap
rm DefaultAuthenticatormyrealmInit.initialized
7. Startup weblogic server using the newly created admin credential. (enter the info in
boot.properties)
8. Logon to /console with the newly created administrator.
9. Under Security Realms, change the password for the old admin.
10.what are Difference between local and global transactions
A transaction is atomic unit of Work.The tasks which are made into the transaction act as a unit which
can be executed successfully all,or if at least one task fails to its promise ,then the effect of all the
tasks are to be rollbacked.Thus transaction is committed or rolled backed.
Transactions can be divided into two categories.
1.Local Transactions:These transactions are confined to objects which reside inside one particular
JVM.Local transactions in java can be implemented using the JTA api.
2.Global Transactions:These transactions may encapsulate objects which are distributed on various
JVMs.Global transactions are implemented throught TWO-PHASE-COMMIT design implementation.
11.Differnences between Weblogic Server 8.x and 9.x
S no Weblogic Server 8.x
Supports JDK 1.4
The directory structure
Ex : like the config.xml location, cache and
staging folder paths, managed or admin
server paths

Weblogic Server 9.x


Supports JDK 1.5
The directory structure more Structurized way of
folders rearranged

We need configure Connection pools then Data


source

First need to create a Dynamic Data Source ,


inside u can find a Connection pool tab

Here We dont have any Lock & Edit future in


console.
Dont have Side by Side Deployment feature
Where we are Redeploying application we need
un-install previous version , then deploy the new
version application
This Will not support two Phase deployment
Via console we have Different Module Deployment
like
1.Applications
2.EJB Modules
3.WebApplication Modules
4.Connector Module
WLST was introduced but this will be available
from 8.1 SP6
1 Here Creation users & Roles Only way to create
from console

Here We have Lock and edit feature in console

This will not Support for SQL Server 2005

ture We have this future here


No need to un install simply update option.
This Will support two Phase Deployment
Here No module deployment all type of Modules
In Single Screen in console

from 8.1 SP6 Here full Developed with MBean


utility
Here we can upload those users and roles. this
xml must be expressed in
eXtensible Access Control Markup Language
(XACML) 2.0.
This Will support SQL Server 2005

By Bhramaiah

SAM Technologies

info@esamtech.com

WebLogic Diagnostic Framework feature we dont


have in this version

Here we have this feature.


With this feature we can do
Application-scoped monitor,
HttpSessionDebug, enables you to inspect an
HTTP session object.

Not support for JMS Client-Side Store-andForward

Supporting
Client-Side Store-and-Forward

Server dosent come up if deployment fails

Server boots in ADMIN mode if deployment


failes

Console is an applet and uses JCX JCS JPF


and Netui page flows
Here t hread are three types
Weblogic.admin.HTTP
Weblogic.admin.RMI
Weblogic.kernal.default

Console is portal and uses JSTL (JSP 2.0)


Here only one type of thread is there
Weblogc.kernal.default

12. Application Deployment Staging modes in Weblogic Server ?


The deployment staging mode determines how deployment files are made available to target servers
that must deploy an application or standalone module.
WebLogic Server provides three different options for staging files:

1. Stage mode
2. Nostage mode
3. External Stage mode
The following table describes the behavior and best practices for using the different deployment
staging modes.
Staging Mode
Stage

NoStage

Behavior
The Administration Server first
copies the deployment unit
source files to the staging
directories of target servers.
The target servers then deploy
using their local copy of the
deployment files.
The Administration Server does
not copy deployment unit files.
Instead, all servers deploy using
the same physical copy of the
deployment files, which must be
directly accessible by the
Administration Server and
target servers.
With nostage deployments of
exploded archive directories,
WebLogic Server automatically
detects changes to a
deployments JSPs or Servlets
and refreshes the deployment.

When to Use
1. Deploying small or moderatesized applications to multiple
WebLogic Server instances.
2. Deploying small or moderatesized applications to a cluster.
1. Deploying to a single-server
domain.
2. Deploying to a cluster on a
multi-homed machine.
3. Deploying very large
applications to multiple targets
or to a cluster where
deployment files are available
on a shared directory.
4. Deploying exploded archive
directories that you want to
periodically redeploy after
changing content.
5. Deployments that require
dynamic update of selected
Deployment Descriptors via the
Administration Console.

By Bhramaiah

SAM Technologies
External Stage

info@esamtech.com
The Administration Server does
not copy deployment files.
Instead, the Administrator must
ensure that deployment files are
distributed to the correct
staging directory location before
deployment
With external stage
deployments, the Administration
Server requires a copy of the
deployment files for validation
purposes. Copies of the
deployment files that reside in
target servers staging
directories are not validated
before deployment.

1. Deployments where you want


to manually control the
distribution of deployment files
to target servers.
2. Deploying to domains where
third-party applications or
scripts manage the copying of
deployment files to the correct
staging directories.
3. Deployments that do not
require dynamic update of
selected Deployment
Descriptors via the
Administration Console (not
supported in external_stage
mode).
4. Deployments that do not
require partial redeployment of
application components.

13. Change weblogic server Development Mode to Production Mode


All servers in a domain run either in development mode or production mode. In general, production
mode requires you to configure additional security features. For information on the differences
between the two modes, refer to Creating a WebLogic Domain in Creating WebLogic Domains Using
the Configuration Wizard.
To configure all servers in a domain to run in production mode:

1. If you have not already done so, in the Change Center of the Administration Console, click
Lock & Edit (see Use the Change Center).

2.
3.
4.
5.
6.

In the left pane of the Console, under Domain Structure, select the domain name.
Select Configuration > General and select the Production Mode check box.
Click Save, and then, to activate these changes, in the Change Center, click Activate Changes.
Shut down any servers that are currently running. See Start and stop servers.
Invoke the domains startWebLogic script. See Starting an Administration Server with a
Startup Script. The Administration Server starts in the new mode.

7. If the domain contains Managed Servers, start the Managed Servers.


14. Differences between development domain and production Domain
During domain creation you can specify the start up mode for your domain either as development
mode of production mode. Most of you who work with WebLogic Server for the past few releases
should know that there are few differences between a development domain and production domain.
Development Mode
The default JDK for development domain is Sun Hotspot
You can use the demo certificates for SSL
Auto deployment is enabled
Server instances rotate their log files on startup
Admin Server uses an automatically created boot.properties during startup
The default maximum capacity for JDBC Datasource is 15
The debugFlag which is used to start the WebLogic Workshop Debugger is enabled

By Bhramaiah

SAM Technologies

info@esamtech.com

Production Mode
The default JDK for production domain is JRockit
If you use the demo certificates for SSL a warning is displayed
Auto deployment is disabled
Server instances rotate their log files when it reaches 5MB
Admin Server prompts for username and password during startup
The default maximum capacity for JDBC Datasource is 25
The debugFlag which is used to start the WebLogic Workshop Debugger is disabled
In addition to the above WebLogic Server 10gR3 adds a few more default configurations depending on
whether the domain is started in development or production mode.

15. SSL Certificate Installation :: WebLogic Servers 8 & 9


Install your SSL Digital Certificate in WebLogic

1. First, download the your_domain_com.p7b certificate file from your DigiCert Account (from
the My Certificates tab, click the order number, then the blue download link).

2. Run the following command to install the certificate file to your keystore: keytool -import
-trustcacerts -alias server -file your_domain_com.p7b -keystore your_domain.jks You should
get a confirmation stating that the Certificate reply was installed in keystoreIf it asks if you
want to trust the certificate. Choose y or yes.
The installation of this file loads all the necessary certificates to your keystore. Now you just
need to configure your server to use it.
Configuring the Keystore for use in WebLogic

1. On your WebLogic server, expand the Servers node and choose the server you will be
configuring.

2. Next, go to Configuration>Keystores and SSL.Several default keystores or previously


installed keystores may be displayed under Keystore Configuration.

3. To enable your new keystore, click the Change link under Keystore Configuration.
4. Choose Custom Identity and Java Standard Trust as your keystore configuration type, then
click Continue.

5. Under Custom Identity Keystore File Name enter the full path to the your_domain.jks file on
your server.

6. For Custom Identity Keystore Type select jks.


7. The Custom Identity Keystore PassPhrase should be the password you specified when the
keystore was created.If you have forgotten that password, you will need to begin the process
of creating your keystore from the beginning.

8. You will again be asked to enter your keystore password and confirm.
9. Click Continue, and then Finish.
10. You will now need to go back under the Servers node and select the server you are
configuring.

11. Next, go to Configuration>Keystores and SSL, then click the Change link under Keystore
Configuration.

12. In the Configure SSL page, choose Key Stores as the method in which identity and trust is
stored for the WebLogic server.

13. Specify the Private Key Alias and Passphrase that were used when creating your
keystore.If you followed our instructions or used our command generator, server is your
alias. The passphrase is the keystore password.

14. Click Continue, then Finish.Reboot the WebLogic server. Your keystore should now be installed
and enabled

By Bhramaiah

SAM Technologies

info@esamtech.com

SSL Configuration on WebLogic Server 9.2 on solaris


Generate private Key : (Identity Key)
keytool -genkey -keyalg RSA -alias privkey -keystore yourdomain-private.jks
Generate CSR certificate :
keytool -certreq -v -alias privkey -keystore yourdomain-private.jks
Send CSR certificate to the SSL Vendor.
The Server certificate, Root CA, Intermediate certificate and CA Chain certificate will be sent to you.
Combine three certificates into one certificate in the same order as below :
Public.cert (Server Certificate we received in the name of number.crt)
Intermediate.cert(Intermediate Certificate)
Root.cert ( Root CA Certificate)
Save these three certificates into one file yourdomain.crt
Import yourdomain.crt file into yourdomain-private.jks
keytool -import -alias privkey -file yourdomain.crt -keystore yourdomain-private.jks -trustcacerts
keytool -list -v -keystore yourdomain-private.jks (To check the certificate is imported properly or not)
Import Trust identity (Trusted Root certificate)
keytool -import -alias yourdomain -file RootCA.crt -keystore yourdomaintrust.jks -trustcacerts
keytool -list -v -keystore yourdomaintrust.jks ( To check the certificate is imported properly or not)
Login to WebLogic console
Goto Environment and select Servers - (Example Server1).
Click on KeyStores Tab.

By Bhramaiah

SAM Technologies

info@esamtech.com

Provide the following details under identitiy.


Keystores: Custom Identity and Custom Trust
Custom Identity Keystore : /Path/to/keystore.jks
Custom Identity Keystore : jks
Custom Identity Keystore Passphrase: <password>
Confirm Custom Identity Keystore Passphrase: <password>
Provide the following details under trust..
Custom Trust Keystore: /Path/to/trustkeystore.jks
Custom Trust Keystore Type: jks
Custom Trust Keystore Passphrase: <password>
Confirm Custom Trust Keystore Passphrase: <password>
Click on SSL tab

By Bhramaiah

SAM Technologies

info@esamtech.com

Check the box named: Enable SSL Listen port.


Your application is SSL ready!
16.JMS basics Information.
JMS - Java messaging service.
Its used to send recieve messages across server instances.
Its of two types queue and topic
In Queue only one consumer can access where as in topic more than one consumer can access.
JMS identifies Queue or Topic based on JNDI
JMS does not have a kernel API
JMS is actually a service running on a server
All messages would be dumped into JMS store for persistance
If JMS server is down no failover of loadbalancing is possible as its a pinned service
In weblogic 9/10 queue/connection factory are stored in JMS modules.
JMS modules are deploymed using subdeployment on the server
On.message is used to communicate back to the publisher in Async method
JMS Queue type
Point to Point Queue:
Only one receiver will receive the message.
Publish-Subscript topics decouples producers from consumers
A JMS client can use JTA to participate in a distributed transaction
Administrative tasks JMS
1. Creating and maintiaing JMS server
2. Create connection factories
3. Monitoring desitinations
4. Creating JMS stores

By Bhramaiah

SAM Technologies

info@esamtech.com

5. Configure thresholds and quotas


6. Configur durable subscriptions
7. Manage JMS server failover
JMS configuration is defined by an XML schema file that conforms to the weblogic-jmsmd.xsd schema
An administrator can make and manage JMS modules as
Global System resources
Global standalone modules
Module packages as an enterprise application
Connection factory is stored in JNDI.
By default subscribers are non durable but we can register durable subscriptions
**************************************************************
17.how to view the log file in unix with example ?
This example displays only last 50 lines of /var/log/messages file. Change 50 to 100 to display the
last 100 lines of the log file.
Syntax: tail -n N FILENAME

$ tail -n 50 /var/log/messages
This is probably one of the most used command by sysadmins.To view a growing log file and see only
the newer contents use tail -f as shown below.
The following example shows the content of the /var/log/syslog command in real-time.
Syntax: tail -f FILENAME

$ tail -f /var/log/syslog

Changing file permissions and attributes

chmod 755 file

Changes the permissions of file to be rwx for the owner, and rx for

the group and the world. (7 = rwx = 111 binary. 5 = r-x = 101 binary)
chgrp user file

Makes file belong to the group user.

By Bhramaiah

SAM Technologies
chown cliff file

info@esamtech.com

Makes cliff the owner of file.

chown -R cliff dir

Makes cliff the owner of dir and everything in its directory tree.

Viewing and editing files:

cat filename

Dump a file to the screen in ascii.

more filename

Progressively dump a file to the screen: ENTER = one line down

SPACEBAR = page down q=quit


less filename
vi filename
emacs filename
head filename

Like more, but you can use Page-Up too. Not on all systems.
Edit a file using the vi editor. All UNIX systems will have vi in some form.
Edit a file using the emacs editor. Not all systems will have emacs.
Show the first few lines of a file.

head -n filename Show the first n lines of a file.


tail filename

Show the last few lines of a file.

tail -n filename Show the last n lines of a file.

**************************************************************
18. What is there in access log?
The server access log records all requests processed by the server. The location and content of the
access log are controlled by the CustomLog directive. The LogFormat directive can be used to simplify
the selection of the contents of the logs. This section describes how to configure the server to record
information in the access log.
The access log file contains ip address of where the request,Request MethodName,Rquest
URI,Protocol Version Numberand status codes
192.168.1.7[26/aug/2011:8:31:18:18-0600]post/benefits/servlet http/1.1 200 264
192.168.1.7___________ipaddress where the request getting
[26/aug/2011:8:31:18:18-0600]_______time stamp when we get the request
Post_________request method Name
benefits/servlet_______request uri
http/1.1___________http protocol number used by the server
200 264_________________status codes

By Bhramaiah

SAM Technologies

info@esamtech.com

1xx______________Information Message
2xx_____________Indicate success
3xx__________redirecting the client
4xx___________failure due to client
5xx___________failure due to Server
The location of the access file is :
C:\Program Files\Apache Software Foundation\Apache2.2\logs\ access
***********************************************************
19. What is server log in weblogic ?
The server log records information about events such as the startup and shutdown of servers, the
deployment of new applications, or the failure of one or more subsystems. The messages include
information about the time and date of the event as well as the ID of the user who initiated the event.
You can view and sort these server log messages to detect problems, track down the source of a fault,
and track system performance. You can also create client applications that listen for these messages
and respond automatically. For example, you can create an application that listens for messages
indicating a failed subsystem and sends email to a system administrator.
In the left pane of the Administration Console, expand the Servers folder and select the server.
(See Figure 70-8.)
In the right pane, select>Logging >Server.
In the File Name box, enter a path and filename for the server log.
Enter an absolute pathname or a pathname that is relative to the server's root directory. If you use
the Node Manager to start a Managed Server, the root directory is located on the computer that hosts
the Node Manager process. For more information, refer to "A Server's Root Directory."
For information about including a time stamp in the server log's file name, refer to Rotating Log Files.
Click Apply to apply your changes.
Restart the server.
The server writes all subsequent domain messages to the new file.
C:\bea\user_projects\domains\dev_test\servers\AdminServer\logs
Log file name is AdminServer.log00017
Here AdminServer is the name of the Admin Server
C:\bea\user_projects\domains\dev_test\servers\ms2\logs
Log file name

ms2, Here ms2 is name of the Managed server

By Bhramaiah

SAM Technologies

info@esamtech.com

*************************************************************
20. Data Source Configuration in weblogic?
Data sources provide Database access and connection management.
Steps to create Data Source :

1.
2.
3.
4.

In Administration Console, click Lock & Edit


In the Domain Structure tree, expand Services > JDBC, then select Data Sources.
On the Summary of Data Sources page, click New.
Enter below details : Name , JNDI Name , Database Type , Database Driver then click
Next to continue.

5. In Supports Global Transactions select two-Phase Commit then click next


6. Enter below Details : Database Name , Host Name , Port , Database User Name ,
Password/Confirm Password , Click Next to continue.

7. For Test Database Connection , click Test Configuration then Click Next to continue. .
8. Then Click to Finish finally Activate changes.
****************************************************************
21.How to deploy an application through command line ?
open the shell prompt go to
C:\bea\wlserver_10.3\server\bin
And run setWLSEnv.cmd
After use weblogic.Deployer to deploy the application
Syntax :
Java weblogic.Deployer -adminurl <admin url> -username <username> -password <password>
-name <ApplicationName> -targets <target server or cluster> -nostage
-deploy <path of the
source file>
*****************************************************************
22. What is OOM problem/memory leak,how to overcome this problem?
We Recommend These Resources
Permanent Generation
Class information is stored in the perm generation. Also constant strings are stored there. Strings
created dynamically in your application with String.intern() will also be stored in the perm generation.
Reflective objects (classes, methods, etc.) are stored in perm. It holds all of the reflective data for the
JVM
JVM process memory
The windows task manager just shows the memory usage of the java.exe task/process. It is not
unusual for the total memory consumption of the VM to exceed the value of -Xmx Managed Heap
(java heap, PERM, code cache) + NativeHEAP + ThreadMemory <= 2GB (PAS on windows)
Code-cache contains JIT code and hotspot code.
ThreadMemory = Thread_stack_size*Num_threads.ManagedHeap: Managed by the developer.
Java heap: This part of the memory is used when you create new java objects.
Perm: for
relfective calls etc.

By Bhramaiah

SAM Technologies

info@esamtech.com

NativeHeap : Used for native allocations.ThreadMemory: used for thread allocations.

What you see in the TaskManager is the total PAS, while what the profiler shows is the Java Heap and
the PERM(optionally)
Platforms

1.
2.
3.
4.
5.

Maximum PAS*

x86 / Redhat Linux 32 bit

2 GB

x86 / Redhat Linux 64 bit

3 GB

x86 / Win98/2000/NT/Me/XP

2 GB

x86 / Solaris x86 (32 bit)

Sparc / Solaris 32 bit


Limits of Vertical scaling

4 GB
4 GB

If F is the fraction of a calculation that is sequential (i.e. cannot benefit from parallelization), and (1
F) is the fraction that can be parallelized, then the maximum speedup that can be achieved by using
N processors is:
1
------------ Amdahl's law
F + (1-F)/N
In the limit, as N -> infinity, the maximum speedup tends to 1/F. If F is only 10%, the problem can be
sped up by only a maximum of a factor of 10, no matter how large the value of N used.
So we assume that there is a scope of leveraging benefits of multiple CPUs or multithreading.All right,
enough of theory..........can it solve my problem??
A) GC outputs
-verbose:gc
This flag starts printing additional lines to the console, like given below
[GC 65620K -> 50747K(138432K), 0.0279446 secs]
[Full GC 46577K -> 18794K(126848K), 0.2040139 secs]
Combined size of live objects before(young+tenured) GC -> Combined size of live
objects(young+tenured) after GC (Total heap size, not counting the space in the permanent
generation
-XX:+PrintHeapAtGC : More details
-XX:+PrintGCTimeStamps will additionally print a time stamp at the start of each collection.
111.042: [GC 111.042: [DefNew: 8128K->8128K(8128K), 0.0000505 secs]
111.042: [Tenured: 18154K->2311K(24576K), 0.1290354 secs]
26282K->2311K(32704K), 0.1293306 secs]
The collection starts about 111 seconds into the execution of the application. The tenured generation
usage was reduced to about 10%
18154K->2311K(24576K)
B) hprof output file
java Xrunhprof:heap=sites,cpu=samples,depth=10,thread=y,doe=y

By Bhramaiah

SAM Technologies

info@esamtech.com

The heap=sites tells the profiler to write information about memory utilization on the heap, indicating
where it was allocated.
cpu=samples tells the profiler to do statistical sampling to determine CPU use.
depth=10 indicates the depth of the trace for threads.
thread=y tells the profiler to identify the threads in the stack traces.
doe=y tells the profiler to produce dump of profiling data on exit.

C) -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\OOM.txt
Dump the heap on OOM, and then analyze the OOM.txt (Binary file) with jhat tool (bundled with JDK)
The command below will launch http server @port 7777 . Open a browser with the URL
'http://localhost:7777' to see the results.
jhat -port 7777 c:\OOM.txt

D) Profiling the app


Normal 0
You can profile the application to figure out Memory Leaks.
Java memory leaks (or what we like to call unintentionally retained objects), are often caused by
saving an object reference in a class level collection and forgetting to remove it at the proper time.
The collection might be storing 100 objects, out of which 95 might never be used. So in this case
those 95 objects are creating the memory leak, since the GC cannot free them as they are referenced
by the collection.
There are also other kinds of problems with managing resources that impact performance, such as
not closing JDBC Statements/ResultSets in a finally block (many JDBC drivers store a Statement
reference in the Connection object).
A java "memory leak" is more like holding a strong reference to an object though it would never be
needed anymore. The fact that you hold a strong reference to an object prevents the GC from
deallocating it.. Java "memory leaks" are objects that fall into category (2). Objects that are
reachable but not "live" can be considered memory leaks.
JVMPI for Profiling applications give a high level of detailing
Profilers: Hprof, JConsole, JProfiler, AppPerfect, YourKit, Eclipse Profiler, NetBeans Profiler ,JMP,
Extensible Java Profiler (EJP), TomcatProbe, Profiler4j
JConsole is good for summary level info, tracking the memory footprint, checking Thread deadlocks
etc. It does not provide details of the Heap object. For Heap details you may use AppPerfect
(licensed) or JProfiler.
E) For NativeHeap issues.....
JRockit JDK (from BEA) provides better tools than the SUN JDK to peep inside the JNI Heap(atleast on
Windows).

By Bhramaiah

SAM Technologies

info@esamtech.com

JRockt Runtime Analyzer ...this is part of the jrockit install.


jrcmd PSID print_memusage
JRMC.exe ...launch from /bin and start recording.
Try to get some Solution:
Based on the findings from the diagnosis, you may have to take these actions:

1. Code change - For memory leak issues, it has to be a code change.


2. JVM parameters tuning - You need to find the behavior of your app in terms of the ratio of
young to old objects, and then tune the JVM accordingly. We ll talk abt when to tune a
parameter as we discuss the relevant params below.
Memory parameters:
Memory Size: overall size, individual region sizes
-ms, -Xms
sets the initial heap size (young and tenured generation ONLY, NOT Permanent)
If the app starts with a large memory footprint, then you should set the initial heap to a large
value so that the JVM does not consume cycles to keep expanding the heap.
-mx, -Xmx
sets the maximum heap size(young and tenured gen ONLY,NOT Perm) (default: 64mb)
This is the most frequently tuned parameter to suit the max memory requirements of the app.
A low value overworks the GC so that it frees space for new objects to be created, and may
lead to OOM. A very high value can starve other apps and induce swapping. Hence, Profile the
memory requirements to select the right value.
-XX:PermSize=256 -XX:MaxPermSize=256m
MaxPermSize default value (32mb for -client and 64mb for -server)
Tune this to increase the Permanent gereration max size.

3. GC parameters:
-Xminf [0-1], -XX:MinHeapFreeRatio [0-100]
sets the percentage of minimum free heap space - controls heap expansion rate
-Xmaxf [0-1], -XX:MaxHeapFreeRatio [0-100]
sets the percentage of maximum free heap space - controls when the VM will return unused
heap memory to the OS
-XX:NewRatio
sets the ratio of the old and new generations in the heap. A NewRatio of 5 sets the ratio of
new to old at 1:5, making the new generation occupy 1/6th of the overall heap
defaults: client 8, server 2
-XX:SurvivorRatio
sets the ratio of the survivor space to the eden in the new object area. A SurvivorRatio of 6
sets the ratio of the three spaces to 1:1:6, making each survivor space 1/8th of the new
object region
Garbage Collector Tuning:

By Bhramaiah

SAM Technologies

info@esamtech.com

Types of GarbageCollectors (not complete list)

1. Throughput collector: (default for Server JVM)


parallel version of the young generation collector.
-XX:+UseParallelGC
The tenured gc is the same as the serial collector (default GC for client JVM).
multiple threads to execute a minor collection
application has a large number of threads allocating objects / large Eden
-XX:+UseParallelOldGC (major also in parallel)

2. Concurrent low pause collector :


collects the tenured generation and does most of the collection concurrently with the
execution of the application. Attempts to reduce the pause times needed to collect the
tenured generation
-Xincgc or -XX:+UseConcMarkSweepGC
The application is paused for short periods during the collection. A parallel version of the
young generation copying collector is used with the concurrent collector.
Multiprocessor; apps that have a relatively large set of long-lived data (a large tenured
generation;
Apps where response time is more important than overall throughput e.g. JAVA_OPTS=
-Xms128M -Xmx1024M -XX:NewRatio=1 -verbose:gc -XX:+PrintGCDetails -XX:
+PrintGCTimeStamps -Xloggc:E:\loggc.txt
FlipSide: Synchronization overhead, Fragmentation
Performance Solution

1.
2.
3.
4.

Application Software profiling


Server and JVM tuning
Right Hardware and OS
Code improvement as per the Behaviour of your application & profiling results.. easier said
than done

5. Use JVM the right way : optimal JVM params


6. Client / server application
7. -XX:+UseParallelGC if u have multiprocessors
Some Tips

Unless you have problems with pauses, try granting as much memory as possible to the
virtual machine
Setting -Xms and -Xmx to the same value .but be sure about the application behaviour
Be sure to increase the memory as you increase the number of processors, since allocation
can be parallelized
Dont forget to tune the Perm generation
Minimize the use of synchronization
Use multithreading only if it benefits. Be aware of the thread overheads. e.g a simple task like
counter incrementing from 1 to billion ....use single thread. Multiple threads will ruin to
mutiple of 10. I tested it out on dual CPU WinXP with 8 threads.
Avoid premature object creation. Creation should be as close to the actual place of use as
possible. Very basic concept that we tend to overlook.
JSPs are generally slower than servlets.
Too many custom CLs, reflection : increase Perm generation. Don't be PermGen-agnostic.
Soft References for memory leakages. They enable smart caches and yet do not load memory.
GC will flush out SoftReferences automatically if the JVM runs low on memory.
StringBuffer instead of String concat

By Bhramaiah

SAM Technologies

info@esamtech.com

Minimize JNI calls in your code

XML APIs be careful SAX or DOM- make correct choice. Use precompiled xpaths for better
performance of the queries.
Difference between jdk 1.4 and jdk1.5
Generics: provides compile-time (static) type safety for collections and eliminates the need for
most typecasts (type conversion).
- Metadata: also called annotations; allows language constructs such as classes and methods to
be tagged with additional data, which can then be processed by metadata-aware utilities.
- Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive
wrapper classes (such as integer).
- Enumerations: the enum keyword creates a typesafe, ordered list of values (such as
day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant
integers or manually constructed classes (typesafe enum pattern).
- Swing: new skinnable look and feel, called synth.
- Var args: the last parameter of a method can now be declared using a type name followed by
three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of
that type can be used and they are then placed in an array to be passed to the method, or
alternatively the calling code can pass an array of that type.
- Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over
each member of either an array or any iterable, such as the standard collection classesfix the
previously broken semantics of the java memory model, which defines how threads interact
through memory.
- Automatic stub generation for rmi objects.
- Static imports concurrency utilities in package java.util.concurrent.
- Scanner class for parsing data from various input streams and buffers.
- Assertions
- StringBuilder class (in java.lang package)
- Annotations
24.How to check the CPU utilization in UNIX ?
Under Sun Solaris UNIX (and other UNIX oses like HP-UX and *BSD oses) you can use following
commands to gather CPU information:
sar : System activity reporter
mpstat : Report per-processor or per-processor-set statistics
ps / top commands
UNIX sar command examples
General syntax is as follows:
sar t [n]
In the first instance, sar samples cumulative activity counters in the operating system at n intervals of
t seconds, where t should be 5 or greater. If t is specified with more than one option, all headers are
printed together and the output may be difficult to read.
Task: Display today's CPU activity, use
# sar
Task:Watching system activity evolve i.e. reports CPU Utilization
# sar -u 12 5
Where,
-u 12 5: Comparison of CPU utilization; 12 seconds apart; 5 times.
Output includes:

1. %usr: User time (% of CPU)


2. %sys: System time (% of CPU)
By Bhramaiah

SAM Technologies

info@esamtech.com

3. %wio: Percent of CPU running idle with a process waiting for block I/O
4. %idle: Percent of CPU that is idle
Task: You can watch CPU activity evolve for 10 minutes and save data
# sar -o file-name 60 10
Task: You can just sar and logout and let the report store in files
# nohup sar -A -o output-file 60 10 1>/dev/null 2>&1 &
Note to display data stored in output-file pass -f option to sar command:
# sar -f output-file
UNIX mpstat example
Type the following command to display per-processor statistics; 12 seconds apart; 5 times
# mpstat 12 5
You can also use traditional ps and top command:
# top
# ps -e -o pcpu -o pid -o user -o args
***************************************************************
25. How to check the disk space in UNIX?
A quick way to get a summary of the available and used disk space on your Linux system is to type in
the df command in a terminal window. The command df stands for "disk filesystem". With the -h
option (df -h) it shows the disk space in "human readable" form, which in this case means, it gives
you the units along with the numbers.
The du command on the other hand shows the disk space used by the files and directories in the
current directory. Again the -h option (df -h) makes the output easier to comprehend.
Type df -h or df -k to list free disk space:
$ df -h
OR
$ df k
Output:
Filesystem
/dev/sdb1

Size

Used Avail Use% Mounted on

20G

9.2G

varrun

393M

144k

varlock

393M

procbususb
udev
devshm

393M
393M
393M

9.6G 49% /
393M

393M

123k

1% /var/run
0% /var/lock

393M

1% /proc/bus/usb

123k

393M

1% /dev

393M

0% /dev/shm

************************************************************

26.What is Nodemanager and what is use of it?

By Bhramaiah

SAM Technologies

info@esamtech.com

Node Manageris Weblogic Server utility to start, stop and restartAdministration and Managed Server
Instances from remote location (There are other ways as well to start/stop Weblogic check here Node Manager is optional component).
1. Node Manager Process is associated with a Machine and NOT with specific Weblogic Domain (i.e.
Use one node manager for multiple domains on same machine)
2. There are two versions of Node Manager - Java-based and Script-based
Java-based node manager - runs with in JVM (Java Virtual Machine) Process and more secure than
script-based node manager. Configuration for java-based node manager are stored in
nodemanager.properties
Script-based node manager - is available for Linux and Unix systems only and is based on shell script.
3. There are multiple ways to access Node Manager
- From Administration Console : Environments -> Machines -> Configuration -> Node Manager
- JMX utilities (Java Management eXtension) more here
- WLST commands (WebLogic Scripting Tool)
4.Default port on which node manager listen for requests is localhost:5556, When you configure Node
Manager to accept commands from remote systems, you must uninstall the default Node Manager
service, then reinstall it to listen on a non-localhost (IPs other than 127.0.0.1) listen address.
5. Any domain created before creation of Node Manager Service will not be accessible via node
Manager(even after restarting node manager), solution is to run the WLST command nmEnroll to
enroll that domain with the Node Manager.
6. Any domains created after the Node Manager service has been installed should not have to be
enrolled against the Node Manager. The Node Manager should automatically be reachable by the
domain.
How to Configure Node Manager ?
1.Configure each computer (on which you wish to use Node Manager) as a Machine in WebLogic

By Bhramaiah

SAM Technologies

info@esamtech.com

Server
Environments -> Machines -> New (Add Machine) Use Link here
Environments -> Machines -> Machine Name (created above) -> Configuration -> Node Manager
2. Assign each server instance (Admin or Managed that you wish to control with Node Manager) to
Machine.
Environments -> Machines -> Machine Name (created above) -> Configuration -> Servers -> Add
(Add Server running on this node which you would like to monitor using Node Manager) for more
info Click here
3. Enroll domain (created before installation of Node Manager) to Node Manager
Windows
cd $BEA_HOME\user_projects\domains\<domain_name>\bin
setDomainEnv.cmd
java weblogic.WLST
wls> connect(weblogic,'weblogic, t3://mymachine.mydomain:7001)
wls> nmEnroll(C:\bea\user_projects\domains/<domainName>,
C:\bea\wlserver_<version>/common/nodemanager)
Unix /Linux
cd $BEA_HOME/user_projects/domains/<domain_name>/bin/
. setDomainEnv.sh
java weblogic.WLST
wls> connect(weblogic,'weblogic, t3://mymachine.mydomain:7001)
wls> nmEnroll($BEA_HOME/user_projects/domains/<domain_name>,
$BEA_HOME/wlserver_<version>/common/nodemanager)
where mymachine.mydomain:7001 is the reference to the Admin Server of the domain to which the
server and machine definition belongs
How to start Node Manager ?
$WL_HOME\server\bin\startNodeManager.sh (startNodeManager.cmd on Windows)
How to install Node Manager as Service on Windows ?
Use $WLS_HOME\server\bin\installNodeMgrSvc.cmd (Where default WLS_HOME location is
c:\bea\wlserver_<version>)
To uninstall Node Manager Service on windows use $WLS_HOME\server\bin\uninstallNodeMgrSvc.cmd
installNodeMgrSvc.cmd will create Windows server with name as Oracle WebLogic NodeManager
(C_bea_wlserver_<version>)
.
Important Configuration files
$WL_HOME/common/nodemanager/ nodemanager.properties,
nodemanager.domains, nm_data.properties
$DOMAIN_HOME/config/nodemanager/nm_password.properties
$DOMAIN_HOME/servers/<server_name>/data/nodemanager/ boot.properties, startup.properties,
server_name.addr, server_name.lck, server_name.pid, server_name.state

By Bhramaiah

SAM Technologies

info@esamtech.com

Node Manager Log Files


$WL_HOME/common/nodemanager/nodemanager.log
27. How to verify network performance in unix ?
If the ping times are higher than you expect, then you should start to get some basic statistics about
the network interface you are using to see if the problem is related to the network interface, or a
specific protocol.
Under Linux, you can get some basic network statistic information by using the ifconfig tool (see
Listing 7).
Listing 7. Getting basic network statistic information using the ifconfig tool
$ ifconfig eth1
eth1
Link encap:Ethernet HWaddr 00:1a:ee:01:01:c0
inet addr:192.168.0.2 Bcast:192.168.3.255 Mask:255.255.252.0
inet6 addr: fe80::21a:eeff:fe01:1c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7916836 errors:0 dropped:78489 overruns:0 frame:0
TX packets:6285476 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11675092739 (10.8 GiB) TX bytes:581702020 (554.7 MiB)
Interrupt:16 Base address:0x2000
The important rows are those beginning RX and TX, which show information about the packets sent
and received. The packets value is a simple count of the packets transferred. The errors, dropped,
and overruns figures show how many of the packets indicated some kind of fault. A high number of
dropped packets in comparison to the packets sent probably indicate that the network is busy.
You can also get extended statistic information on all platforms by using the netstat tool. Under Linux,
the tool provides more specific base protocol statistics, such as the packet transmissions for TCP-IP
and UDP packet types. Again, the information contains some basic statistics (see Listing 8).
Listing 8. Using netstat
$ netstat -s
Ip:
8437387 total packets received
1 with invalid addresses
0 forwarded
0 incoming packets discarded
8437383 incoming packets delivered
6820934 requests sent out
6 reassemblies required
3 packets reassembled ok
Icmp:
502 ICMP messages received
3 input ICMP message failed.
ICMP input histogram:
destination unreachable: 410
echo requests: 82
echo replies: 10
1406 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 1313
echo request: 11

By Bhramaiah

SAM Technologies

info@esamtech.com

echo replies: 82
IcmpMsg:
InType0: 10
InType3: 410
InType8: 82
OutType0: 82
OutType3: 1313
OutType8: 11
Tcp:
8361 active connections openings
6846 passive connection openings
1 failed connection attempts
164 connection resets received
33 connections established
8305361 segments received
6688553 segments send out
640 segments retransmitted
0 bad segments received.
676 resets sent
Udp:
126083 packets received
1294 packets to unknown port received.
0 packet receive errors
130335 packets sent
UdpLite:
TcpExt:
5 packets pruned from receive queue because of socket buffer overrun
6792 TCP sockets finished time wait in fast timer
5681 delayed acks sent
Quick ack mode was activated 11637 times
150861 packets directly queued to recvmsg prequeue.
74333 bytes directly in process context from backlog
9141882 bytes directly received in process context from prequeue
3608274 packet headers predicted
42627 packets header predicted and directly queued to user
77132 acknowledgments not containing data payload received
374105 predicted acknowledgments
2 times recovered from packet loss by selective acknowledgements
77 congestion windows recovered without slow start after partial ack
1 TCP data loss events
17 timeouts after SACK recovery
2 fast retransmits
8 retransmits in slow start
236 other TCP timeouts
1453 packets collapsed in receive queue due to low socket buffer
11634 DSACKs sent for old packets
2 DSACKs sent for out of order packets
2 DSACKs received
77 connections reset due to unexpected data
50 connections aborted due to timeout
TCPDSACKIgnoredNoUndo: 1
TCPSackShiftFallback: 23
IpExt:
InBcastPkts: 4126
Under Solaris and other UNIX variants, the information provided by netstat differs depending upon
the platform. For example, under Solaris, you get detailed statistics for each protocol, and separate

By Bhramaiah

SAM Technologies

info@esamtech.com

information for IPv4 and IPv6 connections (see Listing 9). The output in the listing has been
truncated.
Listing 9. Using netstat on Solaris
$ netstat -s
RAWIP rawipInDatagrams = 440
rawipInErrors
rawipInCksumErrs =
0
rawipOutDatagrams
rawipOutErrors
=
0

=
0
= 91

UDP

udpInDatagrams
udpOutDatagrams

=
=

TCP

tcpRtoAlgorithm
=
4
tcpRtoMin
= 400
tcpRtoMax
= 60000
tcpMaxConn
= -1
tcpActiveOpens
= 1735
tcpPassiveOpens
= 54
tcpAttemptFails
=
2
tcpEstabResets
= 35
tcpCurrEstab
=
2
tcpOutSegs
=13771839
tcpOutDataSegs
=13975728 tcpOutDataBytes
=1648876686
tcpRetransSegs
= 90215
tcpRetransBytes
=130340273
tcpOutAck
=151539
tcpOutAckDelayed = 5570
tcpOutUrg
=
0
tcpOutWinUpdate
= 31
tcpOutWinProbe
= 86
tcpOutControl
= 3750
tcpOutRsts
= 63
tcpOutFastRetrans =
6
tcpInSegs
=7548720
tcpInAckSegs
=2882026 tcpInAckBytes
=1648874900
tcpInDupAck
=4413016 tcpInAckUnsent
=
0
tcpInInorderSegs =415007
tcpInInorderBytes =367832646
tcpInUnorderSegs = 7650
tcpInUnorderBytes =10389516
tcpInDupSegs
= 222
tcpInDupBytes
= 74649
tcpInPartDupSegs =
0
tcpInPartDupBytes =
0

= 15756
= 16515

udpInErrors
udpOutErrors

0
0

In all cases, you are looking for a high level of error packets, retransmissions, or dropped packet
transmission, all of which indicate that the network is busy. If the error rate is excessively high
compared to the packets transmitted or received, then it may indicate a fault with the network
hardware.
30.what is Certificate Signature Request ?
You must submit your request in a particular format called a Certificate Signature Request (CSR).
WebLogic Server includes a Certificate Request Generator servlet that creates a CSR. The Certificate
Request Generator servlet collects information from you and generates a private key file and a
certificate request file. You must then submit the CSR. Before you can use the Certificate Request
Generator servlet, WebLogic Server must be installed and running.
Start the Certificate Request Generator servlet (certificate.war). The .war file is automatically installed
when you start WebLogic Server. In a Web browser, enter the URL for the Certificate Request
Generator servlet as follows:
https://hostname:port/Certificate
hostname is the DNS name of the machine running WebLogic Server. port is the number of the port at
which WebLogic Server listens for SSL connections.

By Bhramaiah

SAM Technologies

info@esamtech.com

For example, if WebLogic Server is running on a machine named Networking4all and it is configured to
listen for SSL communications at the default port 7002 to run the Certificate Request Generator
servlet, you must enter the following URL in your Web browser:
https://Networking4all:7002/certificate
The Certificate Request Generator servlet loads a form in your web browser. Complete the form
displayed in your browser.
Click the Generate Request button. The Certificate Request Generator servlet displays messages
informing you if any required fields are empty or if any fields contain invalid values. Click the Back
button in your browser and correct any errors.
Note: Private Key Password If you don't not specify a password, you will get an unencyrpted RSA
private key. If you specify a password, you will get a PKCS-8 encrypted private key. When using
PKCS-8 encrypted private keys, you need to enable the Use Encrytped Keys field on the SSL tab of
the Server window in the Administration Console.
When all fields have been accepted, the Certificate Request Generator servlet generates the following
files in the startup directory of your WebLogic Server: mydomain_com-key.der-The private key file.
The name of this file should go into the Server Key File Name field on the SSL tab in the
Administration Console. mydomain_com-request.dem-The certificate request file, in binary format.
mydomain_com-request.pem-The CSR file that you submit.. It contains the same data as the .dem
file but is encoded in ASCII so that you can copy it into email or paste it into a Web form.
**********************************************************************
31.What netstat Command ?
netstat is a useful tool for checking your network configuration and activity. It is in fact a collection of
several tools lumped together. We discuss each of its functions in the following sections.
When you invoke netstat with the r flag, it displays the kernel routing table in the way we've been
doing with route. On vstout, it produces:
# netstat -nr
Kernel IP routing table
Destination Gateway
Genmask
Flags MSS Window irtt Iface
127.0.0.1
*
255.255.255.255 UH
00
0 lo
172.16.1.0 *
255.255.255.0 U
00
0 eth0
172.16.2.0 172.16.1.1 255.255.255.0 UG
00
0 eth0
The n option makes netstat print addresses as dotted quad IP numbers rather than the symbolic
host and network names. This option is especially useful when you want to avoid address lookups
over the network (e.g., to a DNS or NIS server).

The second column of netstat's output shows the gateway to which the routing entry points. If no
gateway is used, an asterisk is printed instead. The third column shows the generality of the route,
i.e., the network mask for this route. When given an IP address to find a suitable route for, the kernel
steps through each of the routing table entries, taking the bitwise AND of the address and the
genmask before comparing it to the target of the route.
The fourth column displays the following flags that describe the route:
G ------

The route uses a gateway.

By Bhramaiah

SAM Technologies
U ------

info@esamtech.com

The interface to be used is up.

H -----Only a single host can be reached through the route. For example, this is the case for the
loopback entry 127.0.0.1.
D ------ This route is dynamically created. It is set if the table entry has been generated by a
routing daemon like gated or by an ICMP redirect message (see the section Section 2.5 in Chapter
2).
M ------ This route is set if the table entry was modified by an ICMP redirect message.
! ------ The route is a reject route and datagrams will be dropped.
33. What is VAMSTAT command in solaris ?
vmstat - report virtual memory statistics

SYNOPSIS
vmstat [ -cisS ] [ disks ] [ interval [ count ] ]
vmstat delves into the system and reports certain statistics
kept about process, virtual memory, disk, trap and CPU
activity. Note: vmstat statistics are only supported for
certain devices.

Without options, vmstat displays a one-line summary of the


virtual memory activity since the system was booted. If
interval is specified, vmstat summarizes activity over the
last interval seconds, repeating forever. If a count is
given, the statistics are repeated count times. Note:
interval and count do not apply to the -i and -s options.
If disks are specified, they are given priority when vmstat
chooses which disks to display (only four fit on a line).
Common disk names are id, sd, xd, or xy, followed by a
number, for example, sd2, xd0, and so forth. For more general system statistics, use sar(1), iostat(1M), or sar(1M).

-c

Report cache flushing statistics. By default, report

By Bhramaiah

SAM Technologies

info@esamtech.com

the total number of each kind of cache flushed since


boot time. The types are: user, context, region, segment, page, and partial-page.

-i

Report the number of interrupts per device.

-s

Display the total number of various system events


since boot.

-S

Report on swapping rather than paging activity.

This

option will change two fields in vmstat's ``paging''


display: rather than the ``re'' and ``mf'' fields,
vmstat will report ``si'' (swap-ins) and ``so'' (swapouts).
34.How do you find out port numbers in linux?
In linux we have commands
lsof -i TCP (displays online open tcp ports)
lsof -i UDP
above commands work for linux only
netstat -anp | head -20
nmap -anp ( if the nmap utility is installed in linux system)
thru netstat only we can get much of the information regarding the open ports
35. What are the difference between authentication and authorization ?
Authentication
An authentication system is how you identify yourself to
the computer. The goal behind an authentication system is
to verify that the user is actually who they say they are.
There are many ways of authenticating a user.Like
Password based authentication
Device based authentication
Biometric Authentication

By Bhramaiah

SAM Technologies

info@esamtech.com

Authorization
Once the system knows who the user is through
authentication, authorization is how the system decides
what the user can do.
A good example of this is using group permissions or the
difference between a normal user and the superuser on a
unix system.

36. Application is working but DB is not suppoting what kind of exception you will get?

ORA-12505,TNS:Listener does not currently know of SID give in connect descriptor


The connection Descriptor used by the client was
192.167.221.224:1521:xe

192.167.221.224------ip address of database running system


1521-------port number
Xe------database service name or schema name

Weblogic.application.ModuleException:
At weblogic.jdbc.module.JDBCModule.prepare<JDBCModule.java289>

******************************************************************

39. Disabling and Enabling Admin Console


Many at times for most of our administration work including the changes (deployments, start/stop of
servers, etc) or configurations (JMS, creation/deletion/editing of our servers, etc) we use our weblogic
admin console.
But, for security reasons some of the banking companies for its core banking applications prefer to
disable the admin console in its banking applications.

By Bhramaiah

SAM Technologies

info@esamtech.com

This short and sweet article mainly targets to present you on how to enable and disable your admin
console:
Disabling your Admin Console:
We can disable our weblogic admin console in two different ways
1)

Admin console

2)

Weblogic Scripting Tool

From Admin console:To disable access to the Administration Console:

1.
2.
3.
4.
5.
6.

After you log in to admin console click Lock & Edit.


In the left pane of the Console, under Domain Structure, select the domain name.
Select Configuration > General, and click Advanced at the bottom of the page.
Deselect Console Enabled.
Click Save.

To activate these changes, click Activate Changes.


From WLST:connect(weblogic,weblogic,t3://localhost:7001)
edit()
startEdit()
cmo.setConsoleEnabled(false)
save()
activate()
disconnect()
exit()
Enabling the Admin Console:
After we disable the admin console we can enable it again by using WLST.
Following are the steps on the same:
connect(weblogic,weblogic,t3://localhost:7001)
edit()
startEdit()
cmo.setConsoleEnabled(true)
save()

By Bhramaiah

SAM Technologies

info@esamtech.com

activate()
disconnect()
exit()
40.how to findout the application status using WLST?
connect('weblogic','weblogic','t3://localhost:8001')
domainRuntime()
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
AppList = cmo.getApplicationIds()
print '####### Application ####### Application State\n'
print '***********************************************\n'
for App in AppList:
print '#######',App ,' #######', cmo.getIntendedState(App)
print '***********************************************\n'
41.How to find out the server status using WLST?
username = 'weblogic'
password = 'weblogic'
URL='t3://localhost:8001'
connect(username,password,URL)
domainRuntime()
cd('ServerRuntimes')
servers=domainRuntimeService.getServerRuntimes()
for server in servers:
serverName=server.getName();
print '**************************************************'
print '##############

serverName

###############'

print '**************************************************'
print '##### Server State

#####', server.getState()

print '##### Server ListenAddress #####', server.getListenAddress()


print '##### Server ListenPort

#####', server.getListenPort()

By Bhramaiah

SAM Technologies
print '##### Server Health State

info@esamtech.com
#####', server.getHealthState()

*************************************************************

By Bhramaiah

Você também pode gostar