Вы находитесь на странице: 1из 20

Top 50 WebLogic Interview Questions

1. Explain deployment descriptors?


Deploym ent d escriptors are associated w ith alm ost all the m od u les as w ell as ap plications. The d eploym ent
d escriptors can be seen in the form of XML d ocu m ents and they are capable of d escribing the contents that are
part of d irectory or the jar file. J2EE specifications u su ally d efine the stand ard as w ell as the d eploym ent
d escriptors w hich are portable for J2EE ap plications and m od u les.
2. What is w eb.xml ?
Web.xm l is an XML d ocu m ent that is m ainly for ap plication pu rp ose and it helps in listing ou t the J2EE
com ponents and configu ration that of you r application in J2EE m od u les form at.
3. What is the name of default JVM that is made used for WebLogic?
The su n hotspot JDK d efau lt is m ad e u sed for d evelopm ent, JRockit is the one u sed for prod u ction of WebLogic
11g as w ell as 12c. Operating system is another factor that helps in choosing the certified JDK JVM.
4. Explain the methods for providing user credentials for starting the server?
At the tim e of the creation of d om ain, the w izard for setting configu ration asks for the d etails like u ser nam e,
passw ord etc. from the u ser w ho is logging in for the first tim e as an ad m inistrator. If the d om ain is created in
d evelopm ent m od e, the configu ration w izard saves the encrypted passw ord as w ell as the u sernam e insid e an
id entity file. This file is available for reference d u ring the tim e of booting so that in the absence of this file, system
can prom pt the u ser for the pu rpose of entering cred entials. A new boot id entity file can be created if you w ant
to change the u se cred entials or else if you are having the requ irem ent of creating d om ain in the prod u ction
m od e.
5. Is there any possibility for starting managed server during the absence of administrator server?
The u su al p rocess is that in case of any d ifficu lty for the m a nager server to get connected to any ad m inistration
server at the tim e of start u p, there is an option for the m anaged server to retrieve the configu ration related to it
from the configu ration files as w ell as other files involved . The inform ation thu s retrieved cannot be altered and
it is possible only w hen the ad m inistration server is really available. When the ad m inistration server is
u navailable, then the m anaged server enters into its ind epend ence m od e for carrying ou t its operations.

6. Explain WebLogic server.


This is a kind of server that su pports variou s services as w ell as infrastru ctu re that are related w ith JEE
ap plications. WebLogic server is capable of d eploying com ponents as w ell as applications throu gh WSDL, UDDI
and SOAP. This server gets configu red as a w eb server by m aking u se of H TTP listener for su pporting the H TTP.

Web servers like that of Ap ache, N etscape and Microsoftare u tilized . The configu ration of a w eb server allow s
WebLogic is cap able of p rovid ing services to d ynam ic and static requ ests that are u su ally generated by servlets,
H TML and JSP.
7. What are the capabilities of WebLogic server?
There are variou s cap abilities associated w ith WebLogic server and they are

Changes in d ynam ic configu ration.

Prod u ction application red eploym ent

Rolling u pgrad es.

8. Explain about the function associated w ith T3 in WebLogic server ?


T3 p rovid es enhancem ents su pport for the m essages of WebLogic server. The enhancem ents com prise of the
object replacem ent, the w orking of the seblogic server clu sters and also H TTP. T3 also perform s serialization of
java object and also pred ation of RMI. T3 can be consid ered as a su perset associated w ith java obje ct. T3 is
m and ated betw een WebLogic servers, p rogram m atic clients and clu ster associated w ith WebLogic server. The
protocols H TTP and IIOP are m ad e u sed for enabling com m u nication betw een WebLogic server and processes.
9. Explain the use of HTTP ?
H TTP is the protocol that is m ad e u sed for the pu rp ose of enabling com m u nication betw een the WebLogic server
and p rocesses.
10. Explain the functionality of IIOP ?
IIOP is a kind of p rotocol helpfu l in enabling the com m u nication betw een WebLogic server and object requ est
broker.
11. How do stubs function inside WebLogic server cluster at the time of failure?
Stu bs perform the process of rem oving the failed instance from the list w henever there is a failu re. The stu b
u su ally m akes u se of DN S for find ing the ru nning server and also for obtaining the list of the instances that are
cu rrently available w ith the ap plication. List of the instances available w ith the server insid e clu ster gets
period ically refreshm ent and allow s in acqu iring ad vantages associated w ith new s ervers. The ad vantages are
gained as the server gets ad d ed to the clu ster.
12. How can default JVM be changed to other?
For changing the JVM can be d one by follow ing the step s below .

You shou ld first set the JAVA_H OME in the start script of the server.

Change the config.xm l of d om ain for u sing the JRockit javac.exe

Rem ove any kind of sw itches specific to Su n JVM from start scripts of server.

13. How clients handle the D N S requests to the failed servers?


Band w id th gets w asted in the case of continu es DN S r equ ests to that of u navailable m achine at the tim e of server
failu re. This problem u su ally occu rs d u ring the tim e of startu p associated w ith the ap plication that of client sid e.
The servers that are u navailable are rem oved by searching DN S entries provid ed by WebLogic server. This
rem oval prevents the clients from accessing failed servers. A third p arty load balancers are m ad e u sed for
avoid ing the u nnecessary DN S requ ests. Som e of the third party load balancers are BigIP, resonate, local
d irector and Alteon. The m ain fu nction of these third party load s balancers is to m ask m u ltiple ad d resses of
DN S in to a single one.
14. Explain the functionality of T3 associated w ith WebLogic server?
T3 is capable of provid ing fram ew ork or overall stru ctu re for the m essages that are capable of su p porting the
enhancem ents. The enhancem ents com prises of prod u ct tu nneling, w orking in the context associated w ith
clu sters of WebLogic server and also in object replacem ent.
15. How can classpath be set?
Classp ath can be set by m aking u se of the follow ing script WL_H OMEserverbinsetWLSEnv.cm d (in case of
w ind ow s).
16. Explain the functioning of Stub?
Stu b is u su ally expected by the people w ho connect to the WebLogic server clu ster. The stu b has the list that
consists of the available instances of server that perform host im plem entations associated w ith object. The stu b
also has the fu nctionality of balancing the load by d istribu ting load am ongst the host servers.
17. What are the steps for the creation of Pooling w ithin Tomcat server?

The first step involved in this process of creating pooling is to d ow nload 3 jar files w hich are the
com m ons-d bcp -1.2 jar, com m ons-pool-1.3.jar and com m ons-collections-3.1 jar.

The next step is to m ake an entry insid e server.xm l of tom cat factory.

18. How can you differentiate server crash and server hang?
With a server crash, there is no existence for the Java process and if it is a server hang, then the Java process stop s
resp ond ing.
19. What are the causes for server crash?
The m ajor reasons for the occu rrence of server crash are the native IO, JVM, su pported configu ration, JDBC
d river issu es and SSL native libraries.
20. How can you solve the issue of server crash?

A crash associated w ith JVM is capable of generating hs_err_pid file. You need to refer this file for find ing ou t the
root cau se for su ch a crash. In the case of native IO being the origin of thread , you need to d isable it. If the origin
of the problem is from the d river, need to contact the d river team .
21. How can Server Hang be solved?
Java WebLogic.Ad m in PIN G need s to be checked for find ing w hether you get a norm al and positive response.
You can find ou t the root cau se for hanging from this file. You ju st need to rectify the errors that are id entified
from this file.
22. Explain the reasons for server hang?
The m ajor reasons that lead to the server hang are m em ory leak, d ead lock, and long tim e for retu rning.
23. D efine memory leak ?
Mem ory leak is the cond ition that arises w hen the objects get retained in the heap even after they hav e no u se.
24. What causes the condition OUT OF MEMORY?
There are variou s reasons that can lead to this cond ition and they are

Insu fficient size of the heap com pared to the extra load .

Placing of the objects takes longer period of tim e like that of H TTP ses sions.

Occu rrence of m em ory leak insid e the application cod e.

The prevention of occu rrence of fu ll GC becau se of JVM bu g.

25. How can the OUT OF MEMORY be solved?

There is a possibility for collecting the m em ory d ata after enabling GC verbose. If the cond ition has arou sed
becau se of H TTP session, then it w ill be au tom atically solved w hen the session gets tim e ou t. You shou ld also
verify the cod e associated w ith th e hand ling of jd bc connectivity. You shou ld also optim ize the size of the heap
by consid ering the load .
26. When can high usage of CPU occur?
This is the cond ition that u su ally occu rs w hen a single thread or process m akes u se of a larger portion of the CPU
in an u nexpected m anner.
27. How can the issue associated w ith high CPU usage be solved?
In w ind ow s platform the issu e of CPU high u sage can easily be solved by m aking u se of pslist and also w ith the
process explorer to observe the fu nction perform ed by t he thread or the process.
28. Explain the term clustering?

Clu stering is the process of grou ping the servers together for accom plishing high percentage of scalability and
availability.
29. What is the purpose of clustering?
The m ajor goal of perform ing the process of clu stering is to m ake high scalability as w ell as availability of the
servers possible. This process also help s in balancing the load in a proper m anner and also accom plishes failover.
30. How can cluster communication occur?
The com m u nication throu gh clu ster is m ad e possible by the m u lticast IP as w ell as port by the process of send ing
period ic m essages w hich are norm ally called as heartbeat m essages.
31. What are the various types of WebLogic installations?
The WebLogic installation u su ally occu rs in three d ifferent m od es w hich are:

Graphical m od e

Console m od e

Silent m od e.

32. What is Graphic mode?


It is a kind of installation typ e that m akes u se of interactive GUI.
33. What is console mode?
This is a kind of installation type that follow s interactive text based m ethod .
34. What is silent mode?
This is a m ethod of installation that is non -interactive and is u su ally based on the .xm l properties file.
35. What is Unicast?
Unicast is the m ethod u sed in the clu stering techniqu e w here there are clu ster m aster and each server shou ld
ping to this clu ster m aster for inform ing that the server is alive.
36. What is Multicast?
It is a kind of clu stering system w here there is no clu ster m aster and each and every server need s to ping each
other for inform ing their existence. Mu lticasting has m any m essages to be sent in the form of ping as each server
need s to inform all others abou t its existence. This cond ition creates m u ch com plexity associ ated w ith the m ethod
com pared to u nicast.
37. What is a stage deployment?

Stage d eploym ent is a kind of process in w hich the ad m in gets a physical copy w hich is d istribu ted to the other
instances.
38. What is non-stage deployment?
There is no copy in the ad m inistrator bu t each and every server need s to contact the sou rce d irectly for getting
the item to be d eployed .
39. How can port number be checked?
Port nu m ber can be checked by u sing netstat-na| grep connected .
40. How to find out the listening ports?
Listening p orts can be fou nd ou t by u sing netstat -na| grep listen.
41. How to check the version of Java?
Version of java can be checked by u sing [roo@h1vm / ]#java-version.
42. How is it informed w hen the server is added to the cluster?
The availability of the n ew server in the clu ster is broad casted by the WebLogic server clu ster.
43. How many WebLogic servers can be held inside a multi -processor machine?
There is no lim itation for the nu m ber of servers.
44. What is application tuning?
This process involves ejb pool size cache and jsp recom p ilation.
45. What is OS tuning?
This is the process of setting u p TCP/ IP param eters.
46. What is Core Server tuning?
This is the process involving the tu ning of w ork m anager, chu ck size, perform ance p acks, chu nk pool size and
connection backlog bu ffering.
47. What is JVM tuning?
This process involves m onitoring of the garbage collection and the tu ning of gc strategy.
48. What is a Machine?
Machine is the logical representation that of the physical m achine.

49. What is N ode Manager?


N od e m anager is a service from Java that is capable of ru nning sep arate process other than that of WebLogic
server.
50. What is a domain?
Dom ain can be d efined as the grou p w hich com p rises of variou s WebLogic server resou rces.

iReader

Weblogic Interview Questions


1)How do I provide user credentials for starting a server?
When you create a d om ain, the Configu ration Wizard prom pts you to provid e the u sernam e and passw ord for
an initial ad m inistrative u ser. If you create the d om ain in d evelopm ent m od e, the w izard saves the u sernam e and
encrypted passw ord in a boot id entity file. A WebLogic Server instance can refer to a boot id entity file d u ring its
startu p process. If a server instance d oes not find su ch a file, it prom pts you to enter cred entials.
If you create a d om ain in prod u ction m od e, or if you w ant to change u ser cred entials in an existing boot id entity
file, you can create a new boot id entity file.

2)Can I start a Managed Server if the Administration Server is unavailable?


By d efau lt, if a Managed Server is u nable to connect to the specified Ad m inistration Server d u ring startu p, it can
retrieve its configu ration by read ing a configu ration file and other files d irectly. You cannot change the servers
configu ration u ntil the Ad m inistration Server is available. A Managed Server that starts in this w ay is ru nning in
Managed Server Ind epend ence m od e.

3)What is the function of T3 in WebLogic Server?


T3 p rovid es a fram ew ork for WebLogic Server m essages that su p port for enhancem ents. These en hancem ents
inclu d e abbreviations and featu res, su ch as object replacem ent, that w ork in the context of WebLogic Server
clu sters and H TTP and other prod u ct tu nneling. T3 pred ates Java Object Serialization and RMI, w hile closely
tracking and leveraging these specifications. T3 is a su perset of Java Object. Serialization or RMI; anything you
can d o in Java Object Serialization and RMI can be d one over T3. T3 is m and ated betw een WebLogic Servers and
betw een program m atic clients and a WebLogic Server clu ster. H TTP and IIOP are optional p rotocols that can be
u sed to com m u nicate betw een other processes and WebLogic Server. It d epend s on w hat you w ant to d o. For
exam ple, w hen you w ant to com m u nicate betw een a brow ser and WebLogic Server -u se H TTP, or an ORB and
WebLogic Server-IIOP.

4)How do you set the classpath?


WebLogic Server installs the follow ing script that you can u se to set the classpath that a server requ ires:
WL_H OME\ server\ bin\ setWLSEnv.cm d (on Wind ow s)
WL_H OME/ server/ bin/ setWLSEnv.sh (on UN IX)

5)How do stubs w ork in a WebLogic Server cluster?


Clients that connect to a WebLogic Server clu ster and look u p a clu stered object obtain a replica-aw are stu b for
the object. This stu b contains the list of available server instances that host im plem entations of the o bject. The
stu b also contains the load balancing logic for d istribu ting the load am ong its host servers.
What happens w hen a failu re occu rs and the stu b cannot connect to a WebLogic Server instance?
When the failu re occu rs, the stu b rem oves the failed serv er instance from its list. If there are no servers left in its
list, the stu bb u ses DN S again to find a ru nning server and obtain a cu rrent list of ru nning instances. Also, the
stu b period ically refreshes its list of available server instances in the clu st er; this allow s the stu b to take
ad vantage of new servers as they are ad d ed to the clu ster.

6)How does a server know w hen another server is unavailable?


WebLogic Server u ses tw o m echanism s to d eterm ine if a given server instance is u navailable.Each WebLogic
Server instance in a clu ster u ses m u lticast to broad cast regu lar heartbeat m essages that ad vertise its
availability. By m onitoring heartbeat m essages, server instances in a clu ster d eterm ine w hen a server instance
has failed . The other server instances w ill d rop a server instance from the clu ster, if they d o not receive three
consecu tive heartbeats from that server instance WebLogic Server also m onitors socket errors to d eterm ine the
availability of a
server instance. For exam p le, if server instance A h as an open socket to server instance B, and the socket
u nexpected ly closes, server A assu m es that server B is offline.

7)How are notifications made w hen a server is added to a cluster?


The WebLogic Server clu ster broad casts the availability of a new server instance each tim e a new instance joins
the clu ster. Clu ster-aw are stu bs also period ically u p d ate their list of available server instances.

8)How do clients handle D N S requests to failed servers?


If a server fails and DN S continu es to send requ ests to the u navailable m achine, this can w aste band w id th. For a
Java client ap plication, this p roblem occu rs only d u ring startu p. WebLogic Server caches the DN S entries and
rem oves the u navailable ones, to p revent the client from accessing a failed server tw ice. Failed servers can be
m ore of a p roblem for brow ser-based clients, becau se they alw ays u se DN S. To avoid u nnecessary DN S requ ests
w ith brow ser-based clients, u se a third -p arty load -balancer su ch as Resonate, BigIP, Alteon, and LocalDirector.
These p rod u cts m ask m u ltiple DN S ad d resses as a single ad d ress. They also p rovid e m ore sophisticated load balancing options than rou nd -robin, and they keep track of failed servers to avoid rou ting u nnecessary requ e sts.

9)How many WebLogic Servers can I have on a multi-cpu machine?


There are m any possible configu rations and each has its ow n ad vantages and d isad vantages. BEA WebLogic
Server has no bu ilt-in lim it for the nu m ber of server instances that can resid e in a clu ster. Large, m u lti-processor
servers su ch as Su n Microsystem s, Inc. Su n Enterprise 10000, therefore, can host very large clu sters or m u ltiple
clu sters. In m ost cases, WebLogic Server clu sters scale best w hen d eployed w ith one WebLogic Server instance
for every tw o CPUs. H ow ever, as w ith all cap acity planning, you shou ld test the actu al d eploym ent w ith you r
target w eb app lications to d eterm ine the optim al nu m ber and d istribu tion of server instances.

10)How can I set deployment order for applications?


WebLogic Server allow s you to select the load ord er for applications. WebLogic Server d eploys server-level
resou rces (first JDBC and then JMS) before d eploying ap p lications. Ap plications are d eployed in this ord er:
connectors, then EJBs, then Web Applications. If the ap p lication is an EAR, the ind ivid u al com p onents are load ed
in the ord er in w hich they are d eclared in the application.xm l d eploym ent d escriptor.

11)Can I refresh static components of a deployed application w ithout having to


redeploy the entire application?
Yes. You can u se w eblogic.Deployer to specify a com p onent and target a server, u sing the follow ing syntax:
java w eblogic.Deployer -ad m inu rl http:/ / ad m in:7001 -nam e ap pnam e -targets server1,server2 -d eploy jsp s/ *.jsp

12)When should I use the -nostage option?


Set the staging m od e to -nostage (u sing w eblogic.Deployer or the Ad m inistration Console) if you d ont w ant to
copy d eploym ent files bu t w ant to d eploy an application from its p resent location. All target servers m u st be able
to access the sam e set of d eploym ent files.

13)When should I use the external_stage option?


Set -external_stage u sing w eblogic.Deployer if you w ant to stage the ap plication you rself, and prefer to copy it to
its target by you r ow n m eans.

14)Can I set the deployment order for application modules? For standalone
modules?
The Load Ord er attribu te controls the d eploym ent ord er of stand alone m od u les and applications relative to other
m od u les and applications of the sam e type. For exam p le, stand alone EJBs w ith sm aller Load Ord er valu es are
d eployed before those w ith higher valu es. Mod u les that are d eployed as p art of an Enterprise Ap plication (EAR
file or d irectory) are d eployed in the ord er in w hich they are specified in the ap plication.xm l d eploym ent
d escriptor. What is the d ifference betw een the WL_H OME/ config/ exam ples/ applications fold er and the
WL_H OME/ config/ exam ples/ stage fold er? The applications fold er is intend ed for ap plications that are not yet
read y for a prod u ction environm ent. WebLogic Server d ynam ically d eploys the contents of the ap plications
fold er. The stage fold er (or a fold er that you create for the sam e pu rpose) is for storing copies of d eploym ent files

that are read y for d eploym ent in a prod u ction environm ent (d eploym ents that u se the stage or external_stage
d eploym ent m od es).

15)How do I turn the auto-deployment feature off?


The au to-d eploym ent featu re checks the ap plications fold er every three second s to d eterm ine w hether there are
any new ap plications or any changes to existing ap plications and then d ynam ically d eploys these changes. The
au to-d eploym ent featu re is enabled for servers that ru n in d evelopm ent m od e. To d isable au to-d eploym ent
featu re, u se one of the follow ing m ethod s to place servers in prod u ction m od e:
* In the Ad m inistration Console, click the nam e of the d om ain in the left pane, then select the Prod u ction Mod e
checkbox in the right pane.
* At the com m and line, inclu d e the follow ing argu m ent w hen starting the d om ains Ad m inistration Server: Dw eblogic.Prod u ctionMod eEnabled =tru e
Prod u ction m od e is set for all WebLogic Server instances in a given d om ain.

16)Must EJBs be homogeneously deployed across a cluster? Why?


Yes. In WebLogic Server 6.0 and later, EJBs m u st be hom ogeneou sly d eployed across a clu ster for the follow ing
reasons:
* To keep clu stering EJBs sim ple
* To im prove perform ance by avoid ing cross-server calls. If EJBs are not d ep loyed on all servers, cross-server
calls are m ore likely.
* To ensu re that every EJB is available locall.y
* To ensu re that all classes are load ed in an u nd eployable w ay. Every server m u st have access to each EJBs
classes so that it can be bou nd into the local JN DI tree. If only a su bset of the servers d eploys the bean, the other
servers w ill have to load the beans classes in their respective system classpaths w hich m akes it im possible to
u nd eploy the beans.
iReader

10

General Weblogic Server Interview Questions


I often get m ails from p eop le asking w hat are the questions generally asked in Weblogic by
interview ers.
Generally for an Ad ministrators p ositions, in ad d ition to Weblogic qu estions, there are a lot of Unix
qu estions and a few qu estions related to p rocess and case hand ling.
These are the im p ortant qu estions that I cover w hile interview ing.
1. How do you differentiate betw een a server hang and server crash issue?

When a Server crahes, the JAVA p rocess no longer exists. When the Server is hu ng, it stop s
resp ond ing.
We can u se the w eblogic.ADMIN u tilty to ping the server. In case of a hang situ ation w e can take
m ultip le thread d ump s and analyze the cau se of hang.
2. What can be the various reasons for a server crash?
a) N ative IO
b) SSL N ative Libraries
c) JVM
d ) Su pp orted Configu ration
e) JDBC Driver issu e
3. How do you troubleshoot a crash?
JVM crash generates a hs_err_p id file. We need to look into the stack trace of the hs_err_pid file .
If the thread is from a native io, w e need to d isable native io.
if the stack trace is from the d river, w e need to get in tou ch with the d rive team .
Qu ite p ossibly its a problem w ith d river. Changing the typ e of d river can be a w orkarou nd .
If the thread show s it coming from an op timzed cod e, w e can tu rn of optimization.
If the stack is from native calls of app lication, its a bu g w ith the app lication and it has to b mod ified .
4. Ho do you troubleshoot Server Hang?
We can u se java w eblogic.Ad min PIN G to check if w e get a norm al resp onse.
We need to take mu ltip le thread d u mp s w ith kill -3 p id on u nix and CTLR Break on Wind ow s.
Analyze the thread d um p to find the root cau se.
5. What can be the reasons of Server hang?

11

Mem ory leak, d atabse qu ery taking a long time to retu rn, Dead lock.
6. What is memory leak?
Mem ory leak is w hen objects are not rom ved from the heap even w hen they are not required .
7. What are the various causes for OUT OF MEMORY?
a) Insu fficient heap size, not able to m atch the extra load .
b) Objects licing too long, like H TTP Sessions.
c) Mem ory leak in ap plication cod e.
d ) Full GC not happ ening d u e to JVM Bu g.
8. How to troubleshoot and overcome such issues?
Gather m em ory d ata by enabling GC verbose.
If its d u e to H ttp Session, tim ing out http session after certain interval m ight help .
Look into the cod e for jd bc connection hand ling.
Op timizing the heap size accord ing to the load .
9. When does High CPU Usage occur?
It occurs w hen one p rocess or one thread u tilizes u nexp ected ly high proportion of CPU.
10. How to troubleshoot it?
In Solaris environment, we need to take p stack and p rstack and see w hat the thread s are d oing.
In Wind ow s w e need to use p slist and process exp lorer.
11. What is Clustering and w hat is achieved through it?
Clu stering is the group ing together of servers for the p u rp ose of high availability and scalability.
Load balancing and Failover is achieved .
12. How does Cluster Communication Happen?
Members of the Clu ster com mu nicate over the Clu ster Multicast IP and Port by send ing p eriod ic heart
beat m essages.
13. What is the difference betw een the Sun JVM and BEA JRockit JVM?
The most w ell know JVM is the im plem entation from Su n. The Su n JVM is called HotSp ot. The Su n
JVM is ship p ed in the Java Develop ers Kit (JDK) and Java Ru ntim e Environm ent (JRE) from Su n.

12

The BEA JRockit JVM from BEA system s is op timized for reliability and p erform ance for server sid e
ap plications. To achieve this, BEA JRockit JVM u ses technologies su ch as cod e generation, hot sp ot
d etection, cod e op timization, ad vanced garbage collection algorithm s and tight op erating system
integration.
14. TUning JVM Parameters.
If you have a single p rocessor, single thread m achine then you should u se the serial collector (d efau lt
for some configurations, can be enabled exp licitly for w ith -XX:+UseSerialGC). For m ultiprocessor
m achines w here you r w orkload is basically CPU bou nd , u se the p arallel collector. This is enabled by
d efault if you u se the -server flag, or you can enable it exp licitly w ith -XX:+UseParallelGC. If you d
rather keep the GC pau ses shorter at the exp ense of u sing m ore total CPU time for GC, and you have
m ore than one CPU, you can u se the concurrent collector (-XX:+UseConcMarkSw eep GC). N ote that
the concu rrent collector tend s to require m ore RAM allocated to the JVM than the serial or p arallel
collectors for a given w orkload becau se som e m emory fragm entation can occu r.
15. How do you do performance tuning of WLS?
It can be categorized in 4 p arts.
a. Ap plication Tu ning.
jsp precom pilation, ejb p ool size cache..
b. OS Tu ning
Setting tcp ip p arameter.
tcp_tim e_wait_interval
tcp_conn_req_m ax_q
c. Core Server Tu ning.
tu ne w orkm anager, tu ne chu ck size and chu nck pool size, u sing p er form ance p acks, conenction
backlog bu ffering.
d . JVM Tu ning
tu ning gc strategy, m onitoring garbage collection..
16. What is the difference betw een D evelopment mode and Production mode of Weblogic Server?
Developm ent Mod e:
1. The d efault JDK for d evelopm ent d om ain is Su n H otsp ot.
2. You can u se the d em o certificates for SSL.

13

3. Au to d eploym ent(to ad m in server only) is enabled .


4. Server instances rotate their log files on start-u p .
5. Ad m in Server u ses an au tom atically created boot.p roperties d u ring start -u p.
6. The d efault m aximu m cap acity for JDBC Datasource is 15.
7. The d ebu gFlag w hich is u sed to start the WebLogic Workshop Debu gger is enabled .
8. In Developm ent Mod e any configuration change being d one by a u ser d oesnt need him to take a
Lock and Ed it session.
9. Availability of w eb service test client.
10. N od em anger u sername and p assw ord : Defau lt Ad min cred entials.
11. Availability of Classload er Analysis Tool: Yes.
12. Default start p aram eters w hen u sing Su n JDK and the d efault startWebLogic script : java -client Xm s256m -Xm x512m -XX:Com pileThreshold =8000 -XX:Perm Size=128m -XX:MaxPerm Size=256m .
Prod u ction Mod e:
1. The d efault JDK for p rod u ction d om ain is JRockit.
2. If you u se the d emo certificates for SSL a w arning is d isp layed .
3. Au to d eploym ent(to ad m in server only) is d isabled .
4. Server instances rotate their log files w hen it reaches 5MB.
5. Ad m in Server p rom pts for u sernam e and p assw ord d u ring start -u p.
6. The d efault m aximu m cap acity for JDBC Datasource is 25.
7. The d ebu gFlag w hich is u sed to start the WebLogic Workshop Debu gger is d isabled .
8. In Prod u ction Mod e the u ser need s to p rocure a Lock and Ed it session before trying to m ake any
configurational changes.
9. N o Availability of w eb service test client.
10. N od em anger u sername and p assw ord : Rand omly generated
11. Availability of Classload er Analysis Tool: N o.
12. Default start p aram eters w hen u sing Su n JDK and the d efault startWebLogic script : java -server Xm s256m -Xm x512m -XX:MaxPerm Size=256m .
Ref :- http :/ / imp rad eep .com / d ifference-betw een-prod uction-and -d evelopm ent-m od e-in-w eblogic/
17. What is HTTP tunneling? How can w e configure it on Weblogic?
H TTP tu nneling provid es a w ay to sim ulate a statefu l socket connection between WebLogic Server
and a Java client w hen you r only op tion is to u se the H TTP p rotocol. It is generally u sed
to tu nnel throu gh an H TTP p ort in a security firewall. H TTP is a stateless p rotocol, but WebLogic
Server provid es tu nneling fu nctionality to m ake the connection ap p ear to be a regular T3Connection.
Step s to configu re Http tunneling.

14

Login into the Ad min Console, click on the server on w hich you w ant to enable he Http Tu nneling
featu re
Click on the Protocols tab ? General ? check the Enable Tu nneling check box.
N ow you can comm u nicate w ith the JVMs (Server Instances) u sing protocols other than t3
18. What is the difference betw een T3 and HTTP protocol?
WebLogic u ses the T3 protocols for internal and external connections to the servers. The T3 protocol
often is u sed in WebLogics im plem entation of RMI. Proprietary of WebLogic Server.
H ttp protocols are u sed p rimarily for HTTP comm unication betw een the brow ser and the w eb server.
Stand ard follow s the W3C (World Wid e Web Consortiu m ).
N ote: All of these p rotocols are, by d efault, m ultiplexed over the sam e connection to t he servers
ad d ress and p ort. So you can access a w eb p age hosted by the server u sing a URL su ch as
http:/ / host:p ort/ p age.jsp. An external client can set u p an initial JN DI context to a server u sing the
URL t3:/ / host:p ort/ . All that has changed is the p rotocol over w hich the client m u st com mu nicate
w ith the server.

iReader

15

WEBLOGIC INTERVIEW QUESTIONS AND ANSWER


Weblogic Important Question
Q.How many types of weblogic installation ?
Ans:- There are 3 types of weblogic installation.
(a) Grapical Mode (interactive GUI based)
(b) Console Mode (interactive Text Based)
(c) Silent Mode ( Non Interactive method using .xml properties file (-mode =console -silent_xml
=properties_xml_file).
Q. Difference between Unicast and Multicast?
Ans:- Unicast:- Unicast is a one-to one connection between the client and the server.
In cluster, In this concept one server 1st called server always acts like leader, every member interact with leader,
1st server when brings up it is a Leader.
The main difference between Unicast and Multicast is as follows
Unicast:
Say you have three servers (MS-1,MS-2,MS-3) in a cluster now if they have to communicate with each other they
have to ping (i.e. heartbeats ) the cluster master for informing him that he is alive.
If MS-1 is the master then MS-2 and MS-3 would send the ping to MS-1
Multicast:
Here there is no cluster master each server has to ping each other to inform everyone that I am alive.
So MS-1 would send the ping to MS-2 & MS-3 same way MS-2 would send the ping to MS-1 & MS-3 and MS-3 would
ping MS-1 & MS-3.
Thus if you see in multicast the congestion in sending the pings are more compared to unicast which makes multicast
much heavier, thus WLS recommends using Unicast of less congestion in the network.
Multicast is a very old concept in this concept all managed server talks to eachother in every fraction of seond to
show that they are alive.

Q. What is Cluster and Advantages of clustering?


Cluster:- cluster is nothing but group or set of managed server so that we can handle tha task to avoid
overloading. Group of weblogic managed server instance that work together to provide Scalablity and High
Availability.
A WebLogic Server cluster provides these benefits:

Scalability

The capacity of an application deployed on a WebLogic Server cluster can be increased dynamically to meet
demand. You can add server instances to a cluster without interruption of servicethe application continues to
run without impact to clients and end users.

16

High-Availability

In a WebLogic Server cluster, application processing can continue when a server instance fails. You cluster
application components by deploying them on multiple server instances in the clusterso, if a server instance on
which a component is running fails, another server instance on which that component is deployed can continue
application processing.
The choice to cluster WebLogic Server instances is transparent to application developers and clients. However,
understanding the technical infrastructure that enables clustering will help programmers and administrators
maximize the scalability and availability of their applications.
5.Different between stage and no stage deployment?
Stage Deployment:- Admin server Having the physical copy and it will distribute to remaining instances.
Staged deployment will copy your deployment units onto the deployment servers, place them into the
$WL_HOME/servers/SERVER_NAME/stage directory and deploy them from there.
In stage mode, the Administration Server copies the deployment files from their original location on the
Administration Server machine to the staging directories of each target server. For example, if you deploy a Java
EE Application to three servers in a cluster using stage mode, the Administration Server copies the deployment
files to directories on each of the three server machines. Each server then deploys the Java EE Application using its
local copy of the archive files.
When copying files to the staging directory, the Administration Server creates a subdirectory with the same name as
the deployment name. So if you deployed using the command:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
-password weblogic -name mytestear -stage -targets mycluster
-deploy c:\bea\wlserver_10.0\samples\server\medrecd\dist\physicianEar
a new directory, mytestear, would be created in the staging directory of each server in mycluster. If you do not
specify a deployment name, a default deployment name (and staging subdirectory) is used:

For exploded archive deployments, the deployment name and staging subdirectory are the name of the
directory you deployed (physicianEar in the example above).

For archived deployments, the default deployment name is the name of the archive file without the
extension. For example, if you deploy physicianEar.ear, the deployment name and staging subdirectory
are physicianEar.

The Administration Console uses stage mode as the default mode when deploying to more than one WebLogic
Server instance. weblogic.Deployer uses the target servers staging mode as the default, and Managed Servers use
stage mode by default.
Stage mode ensures that each server has a local copy of the deployment files on hand, even if a network outage
makes the Administration Server unreachable. However, if you are deploying very large applications to multiple
servers or to a cluster, the time required to copy files to target servers can be considerable. Consider nostage mode
to avoid the overhead of copying large files to multiple servers.
Syntax for Stage Mode
To use stage mode, specify -stage as an option to weblogic.Deployer, as in:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
-password weblogic -name mydeploymentname

17

-targets myserver1,myserver2,myserver3 -stage


-deploy c:\localfiles\myapp.ear

No Stage Deployment:- Using Nostage Mode Deployment


In nostage mode, the Administration Server does not copy the archive files from their source location. Instead, each
target server must access the archive files from a single source directory for deployment. The staging directory of
target servers is ignored for nostage deployments.
For example, if you deploy a Java EE Application to three servers in a cluster, each server must be able to access the
same application archive files (from a shared or network-mounted directory) to deploy the application.
The source for the deployment files in nostage mode is the path provided by the user at deployment
time (as opposed to stage mode, where the source is the path in each servers staging directory).
Note: However, even in nostage mode, WebLogic Server copies out parts of the deployment to temporary
directories. This enables users to update entire archived deployments or parts of archived
deployments.
In nostage mode, the Web application container automatically detects changes to JSPs and servlets. Nostage also
allows you to later update only parts of an application by updating those parts in one file system location and then
redeploying.
The Administration Console uses nostage mode as the default when deploying only to the Administration Server (for
example, in a single-server domain). weblogic.Deployer uses the target servers staging mode, and Administration
Servers use nostage mode by default. You can also select nostage mode if you run a cluster of server instances on the
same machine, or if you are deploying very large applications to multiple machines that have access to a shared
directory. Deploying very large applications in nostage mode saves time during deployment because no files are
copied.
Syntax for Nostage Mode
To use nostage mode, specify -nostage as an option to weblogic.Deployer, as in:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
-password weblogic -name mydeploymentname
-targets myserver1,myserver2,myserver3 -nostage
-deploy c:\localfiles\myapp.ear
6.Use of heap:JVM Heap Size and Garbage Collection
Garbage collection is the JVMs process of freeing up unused Java objects in the Java heap.The Java heap is where
the objects of a Java program live. It is a repository for live objects, dead objects, and free memory. When an object
can no longer be reached from any pointer in the running program, it is considered garbage and ready for
collection.
The JVM heap size determines how often and how long the VM spends collecting garbage. An acceptable rate for
garbage collection is application-specific and should be adjusted after analyzing the actual time and frequency of
garbage collections. If you set a large heap size, full garbage collection is slower, but it occurs less frequently. If you
set your heap size in accordance with your memory needs, full garbage collection is faster, but occurs more
frequently.

18

The goal of tuning your heap size is to minimize the time that your JVM spends doing garbage collection while
maximizing the number of clients that WebLogic Server can handle at a given time. To ensure maximum performance
during benchmarking, you might set high heap size values to ensure that garbage collection does not occur during
the entire run of the benchmark.
You might see the following Java error if you are running out of heap space:
java.lang.OutOfMemoryError <<no stack trace available>>
java.lang.OutOfMemoryError <<no stack trace available>>
Exception in thread "main"
To modify heap space values, see Specifying Heap Size Values.
To configure WebLogic Server to detect automatically when you are running out of heap space and to address low
memory conditions in the server, see Automatically Logging Low Memory Conditions.
9.States of the Server?
Ans:-There are 9 states of server:

Shutdown

Starting

Standby

Resuming

Running

Suspending

Shutting down

Failed

Unknown

The series of states through which a WebLogic Server instance can transition is called the server life cycle.

19

The Server Life Cycle:-

Q.Use of Stub?
Ans:-

Clients that connect to a WebLogic Server cluster and look up a clustered object obtain a replica-aware stub for
the object. This stub contains the list of available server instances that host implementations of the object.
The stub also contains the load balancing logic for distributing the load among its host servers.
Q.What happens when a failure occurs and the stub cannot connect to a WebLogic Server instance?
Ans:-When the failure occurs, the stub removes the failed server instance from its list. If there are no servers
left in its list, the stubb uses DNS again to find a running server and obtain a current list of running instances.
Also, the stub periodically refreshes its list of available server instances in the cluster; this allows the stub to
take advantage of new servers as they are added to the cluster.

Q. How to check port number?


Ans:- netstat -na |grep connected (to find the ports connected in Linux box.)
netstat -na |grep listen (to find the listening ports in HP-UX,Solaris)
Q. Check the version of java.
Ans:- [root@h1vm /]# java -version run this command in linux to know the java version.

20