Wednesday, 28 January 2015

AIX commands used in the WAS/WebLogic


Vmstat
Gives:
i.      Traps

ii.      Virtual memory

iii.      Paging

iv.      CPU

v.      Number of interrupts per second

vi.      Kernel threads
 
Iostat
1.    Gives:
i.      CPU usage
ii.      i/o of disk, adapter, ttys
iii.      i/o subsystem
 
topas
i.      logical partition information (# topas -L)
ii.      processes(# topas -P)
iii.      file system(# topas -F)
iv.      disks(# topas -D)
 
For CPU Monitoring
Admin can make use of:
1.    netpmon
2.    sar (sar -u)
3.    topas
 
For memory monitoring
Admin can make use of:
1.    svmon
2.    netpmon
3.    filemon
Svmon and filemon are perfagent tools
 
For I/O subsystem,
1.    fileplace
2.    filemon
 
For Network
1.    tcpdump
2.    netpmon
 
For processors and threads,
1.    svmon
2.    kdb
3.    fuser
4.    prof
5.    truss
nmon will give entire OS performance information
 
COMMANDS
Mpstat: this command displays performance statistics of all logical CPU in system.
Lparstat: reports LPAR related information and statistics.
SAR: System Activity Records: it collects reports and saves system activity information.
Traced based commands
CPU Monitoring: tprof, trace, trcrpt
Memory: trace, trcrpt
i/o subsystem: trace, trcrpt
network: iptrace, trace, trcrpt
processes and threads: tprof, trace, trcrpt
 
 
 

 

Difference between Websphere 5.1, 6.1 and 7.0

Profiles
WebSphere 5.1:No Concepts of profile ,there are 4 types of Installation -Express,Base ,Network Deployment and Enterprise.
Websphere 6.1:Cell Profile,Deployment Manager profile,Application Server profile,Custom Profile
Websphere 7.0 Cell(DeploymentManager and managed node),Management,Application Server,Custom profile,Secure Proxy.
Note:Under Management there are three types of profiles available :Administrative agent

Deployment Manager

Job Manager

Note:The Main use of Job Manager is to queue jobs to application server in a flexible management environment

Managing Profiles
WebSphere 5.1 :Websphere multiple installation instance can be created using wsinstance script

WebSphere 6.1:There are two ways of managing a profile
1.Profile Management Tool(GUI)

2.Manage profiles(Command interface for managing profiles )
WebSphere 7.0: same as 6.1

Security Roles
WAS 5.1:Administrator,operator,configurator
WAS 6.1:Administrator,operator,configurator,Deployer,Admin Security Manager,ISC Admin
WAS 7.0:Administrator,operator,configurator,Deployer,Admin Security Manager,ISC Admin,Auditor

WebServers supported
WAS 5.1:Apache HttpServer,Domino Server,IHS,Microsoft IIS,Sun Java System Web Server,HTTP Server for iseries
WAS 6.1:Apache HttpServer,Domino Server,IHS,Microsoft IIS,Sun Java System Web Server
WAS 7.0:HTTPServer for Z/Os and all web servers supported in 6.1

User Registries/Repositries
WAS 5.1:Local Operating System,Standalone LDAP registry,Standalone Custom registry
WAS 6.1:Federated repositories,Local Operating System,Standalone LDAP registry,Standalone Custom registry or file based registry
WAS 7.0:Same as 6.1

lOGGING AND TRACING
WAS 5.1Diagnostic trace
JVM logs
Process logs
IBM Service logs
WAS 6.1
Apart from the logs available in 5.1 there is a Change log detail levels which will enable the Message level and trace level of the JVM
WAS 7.0Same as V 6.1

Managing WebServers
WAS 5.1:Web Servers cannot be managed through Websphere Admin Console
WAS 6.1:WebServers can be Administered using the Websphere Admin Console (Stopping, Starting, Generation and propagation of Plug-in can be done). Web Servers can be created in Managed node or in Unmanaged node
WAS 7.0 same AS V 6.1

JMS
WAS 5.1:JMS Fail Over Support and scalability is not available
WAS 6.1:JMS Fail over support and scalability is available.SIB(Service Integration Bus Concept is being introduced)
WAS 7.0:Same as V 6.1

Monitoring
WAS 5.1:N/A
WAS 6.1:TPF(Tivoli Performance Viewer) is embedded in the Websphere Admin Console for monitoring WebSphere Objects
WAS 7.0same as V 6.1

Intelligent Run Time provisioning
WAS 5.1N/A
WAS 6.1N/A
WAS 7.0Intelligent run time provisioning is a new concept introduced in V7.0 At run time the server uses the activation plan to start only those components that are required inside the application server

Components like Web Container , EJB Container , Web Service and SIP Container are dynamically activated

SIP and Portlet Container
WAS 5.1:N/A
WAS 6.1SIP(Session Initiation Protocol) extends the application server to allow to run SIP applications written to JSR 116 Specification

The Portlet applications can deployed which is compliant with JSR 168

WAS 7.0same as V 6.1

wsadmin scripts
WAS 5.1:JACL is the scripting language which is used
WAS 6.1:JACL will be deprecated from 6.1 and Jython scripting will be used.
WAS 7.0:Same as V 6.1


 

Websphere Response file in AIX enviornment

1.License Acceptance-OPT silentInstallLicenseAcceptance="true"
2. Operating System Prerequisite Checking
# If you want to disable operating system prerequisite checking, uncomment
# the following line. This will notify the installer to continue with
# the installation and log the warnings even though the prerequisite checking
# has failed.
#-OPT disableOSPrereqChecking="true"
3. Non-blocking Prerequisite Checking
# If you want to disable non-blocking prerequisite checking, uncomment
# the following line. This will notify the installer to continue with
# the installation and log the warnings even though the prerequisite checking
# has failed.
-OPT disableNonBlockingPrereqChecking="true"
4. # Install a New Copy
-OPT installType="installNew"
5. samplesSelected - Indicates that the feature is selected for installation.
# noFeature - Indicates that the feature is not selected for installation,
# this is the default option
-OPT feature="noFeature"
6. Install Location-OPT installLocation="/usr/IBM/WebSphere/AppServer"
7. Profile Creation Selection
-OPT profileType="cell"
8. # Valid Values:
# true - Administrative security is enabled, user name and
# password required.
# false - Administrative security is not enabled.
-OPT PROF_enableAdminSecurity="false"
9. Deployment Manager Profile name
-OPT PROF_dmgrProfileName=Dmgr
10. Application Server Profile name
OPT PROF_appServerProfileName=AppSrv
11. Host name
-OPT PROF_hostName=pt
12.profile path and default path
13. Deployment Manager Node name
-OPT PROF_nodeName=ITSOCellManager
14. Application Server Node name
OPT PROF_appServerNodeName=PTNode
15. Cell name
-OPT PROF_cellName=ITSOCell
16.default port
-OPT PROF_defaultPorts="true"
17. Validate Ports
-OPT PROF_validatePorts="true"
18. WebServer Check
true - enable the creation of a webserver definition.
# false - do not enable the creation of a webserver definition.
#
-OPT PROF_webServerCheck="true"
19. WebServer Type
-OPT PROF_webServerType=HIS
20. WebSer
-OPT PROF_webServerName=webserver1ver Name
21. WebServer Hostname
-OPT PROF_webServerHostname=br
22. WebServer Port
OPT PROF_webServerPort=80
Update Installer: response.txt
License Acceptance
-OPT silentInstallLicenseAcceptance="true"
2. Operating System Prerequisite Checking
-OPT disableOSPrereqChecking="true"
3. Existing Installation Checking
-OPT disableEarlyPrereqChecking="true"
4, Install Location
#-OPT installLocation="C:\Program Files\IBM\WebSphere\UpdateInstaller"

-OPT installLocation="/usr/IBM/WebSphere/UpdateInstaller

Key points from Websphere Application Server


  • What is the default URL of the admin console: https://$hostname:9043/ibm/console.
  • What are the default ports: HTTP: 9080, HTTPS: 9443.
  • How to locate the logs: Logs can be found under $install_root/profiles/$profile_name/logs/$server_name. The default profile name is AppSrv01 and the default server name is server1. Example:/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1. SystemOut.log is the file containing everything that was logged to standard out. Logs can also be viewed from the admin console by navigating to Troubleshooting/Logging and Tracing/server_name/Runtime.
  • How to start/stop a server: If you're dealing with a "Network Deployment" type of installation (multiple application servers running under the control of the "deployment manager"), your can start/stop a server from the console (Server/Server Types/WebSphere application servers). Otherwise you have to do it from command line. Go to install_root/bin and run ./startServer.sh server_name, e.g., ./startServer.sh server1 (this assumes that your installation has only one profile defined, otherwise you may need to "cd" to the profile_name/bin directory). Make sure that you run all commands using the appropriate system account. To stop the server, run ./stopServer.sh server_name -username user_name -password password. user_name and password is the credentials of an admin account, typically the same one you use to login to the console.
  • How to deploy an application: In admin console, navigate to Applications/Application Types/WebSphere enterprise applications, click on "Install new application", select "Fast path", accept all the defaults except that on "step 2" make sure that you targeted correct servers (if you have multiple servers/clusters in your environment). Note that you can deploy a WAR file directly, you don't have to build an EAR. In this case, make sure that you set a context root on "step 4" screen of the wizard.
  • How to change context root of a Web application: Go to Applications/Application Types/WebSphere enterprise applications/application_name/Context Root For Web Modules in the console. Re-start the application after the change.
  • How to change the order of classloaders: If you're getting a ClassNotFoundException when you're starting the app, changing the order of classloaders is the first thing you may want to try. Go to Applications/Application Types/WebSphere enterprise applications/application_name/Manage Modules/module_name and make the appropriate selection in the "Class loader order" drop-down (this assumes you're doing it for a WAR module).
  • How to enable dynamic class reloading: If you need to frequently update your deployed application (e.g., you use a local WAS installation for development), enabling dynamic reloading could be a huge time saver. Go to your application in the console, "Class loading and update detection", set "Override class reloading settings ..." and set polling interval to 2 seconds. See this post for more details on how to configure your development environment to support class reloading.
  • How to find a host name and a port of the server: Go to Server/Server Types/WebSphere application servers. You'll find the host name in the Host Name column. To find a port, click on your server, and expand Ports. WC_defaulthost is the HTTP port and WC_defaulthost_secure is the HTTPS port.
  • How to kill a JVM: If the normal "stop" routine failed to stop the server in a reasonable amount of time, you may need to kill it. In a "Network Deployment" environment, simply navigate to the list of servers, select the server and click "Terminate". A node agent will kill the JVM for you. To achieve the same from command line (the only option if you're running standalone), cd to install_root/profiles/profile_name/logs/server_name, and kill the process ID contained in the file server_name.pid. On Unix, you can simply do kill -9 `cat server1.pid` (assuming server1 is your server name). Use task manager or taskkill /PID on Windows.
  • How to browse JMS messages: Go to Buses/Your bus name/Destinations/Your destination/Queue points/Your queue point/Runtime/Messages.
  • Where to find configuration files: WAS has many configuration files, most of them are in XML/XMI format. The files are located under $install_root/profiles/$profile_name/config/cells/$cell_name.

 

Friday, 23 January 2015

Web Container errors

Generally we got errors like
  • “HTTP 404 errors”
  • HTTP 500 errors” on
  • Incorrect information displayed on Web pages.
    If you do not know the type of error, continue with“Collect and analyze the Webserver log:
    We need check acces log files in web servers:
    _ From the access.log:
    127.0.0.1 - - [28/Mar/2007:19:52:31 -0400] "GET url HTTP/1.1" 404 304
    127.0.0.1 - - [28/Mar/2007:20:03:48 -0400] "GET urlHTTP/1.1"500 5348
    Note the URL the Web server was trying to serve when the error occurred.
    Indicate error:
    [Wed Mar 28 19:52:31 2007] [error] [client 127.0.0.1] File does
    not exist: file_location the error:
1. HTTP 404 errors:
  • External factors, such as a problem in the Web server
  •  Configuration problems, such as an incorrect Web server plug-in or virtual
    host configuration.
  • Runtime problems, such as an application or application server not started
  • User or application problems, such as an incorrectly specified URL.
Errors displayed by the browser:
  • The page cannot be displayed
  • JSP error or JSF error
  • Failed to find resource
  • File not found
  • WebGroup/virtual host not defined.
JSP error or JSF error:
  • incorrectly specified URL.
  • is not available on the server.
  •  Web server plug-in configuration problem.
  • Verify that the Web server plug-in is working correctly.
  • Verify that the Web server is responding
  • Verify that the application is running
WebGroup / Virtual Host has not been defined:
  • Verify that the virtual host configuration is correct(set the host aliases, each
  • consisting of a host name and port number)
Verify that the URL causing the error is specified correctly
  • Verify that the application is running
2. HTTP 500 errors

  • HTTP 500 errors indicate that an internal server problem has occurred during theprocess of serving the requested page. Examples of the types of problems that can cause this in WebSphere Application Server include:
  • _ JSP processor errors
  • _ Application code (JSP, JSF, servlet) errors
  • _ Session errors
    To verify that an application server is available to serve the file:
  • 1. Determine the server or cluster that hosts the application.
  • 2. Check the status of the application server.
  • 3. Start the application server if it is not running
    Root causes
    Some root causes for HTTP 500 errors are:
  • _ Code error
  • _ Invalid session object
  • _ Response generation errors
Code error
  • The root cause of this problem is usually a programming error.
  • Invalid session object
     
    Check the servlet or JSP code that threw the exception to make sure that the
    session is not being invalidated too early. If that is not the case, check the
    session timeout interval to ensure that it is not too short.
  • The session manager component uses the HttpSession interface to create a session between an HTTP client and the server. When a new session object is
    created, a unique session ID is assigned to it.
  • Session tracking is use to maintain state and user information for
    multiple request
3. A WEB GROUP / VIRTUAL HOST PROBLEM
 
SRVE0255E : URI not working when i hit first time . when i refresh browser again its working
SRVE0255E  A WebGroup/Virtual Host to handle /<contextroot> has not been defined

Resolution :

1. server –>Enterprise Applications–><your application>/Resource references –>click on Browse and choose the correct one
2.Update the plugin and propagate
3.restart the web/application server
4. Then try again URL.
 
 
Cause:
    The above error indicates  WAS SSL certificate was not trusted by the WAS plugin configured for IHS
     
    Resolution:
Extract the default Personal Certificate:
1. Login to the WebSphere Application Server Administrative Console.
2. Select Security > SSL certificate and key management > Key Stores and certificates.
3. Select NodeDefaultKeyStore for a stand-alone deployment or CellDefaultKeyStore for a Network deployment.
4. Click Personal Certificates, select the default check box, and then click Extract.
5. Give the extracted file a path and name, such as: /root/defaultCert.arm. Note: The convention is to give the file a .arm extension.
6. Leave encoding set to Base64.
7. Click OK.
Locate your *.kdb file:
1. In the httpd.conf file, find the directory in which the plugin-cfg.xml file is stored by searching for the WebSpherePluginConfig line
example:
WebSpherePluginConfig “/opt/IBM/HTTPServer/Plugins1/config/webserver1/plugin-cfg.xml
2. Find the directory in which the key database file (*.kdb) is stored by searching for the term “keyring” in the plugin-cfg.xml file.
For example:
<PropertyName=”keyring” Value=”/opt/IBM/HTTPServer/Plugins1/config/webserver1/plugin-key.kdb”/>
Note this location as you will need to use it later


4. ERROR : checkOptions: combination of options specified is correct (67)Address already in use: make_sock: could not bind to address 10.xx.xx.xx:10021 no listening sockets available, shutting down Unable to open logs

Cause : The port already in use by another process

Resolution
1. Check the port is running or not : netstart -an |grep <port number>
2. kill -9 pid <old pind which port is running>
3. To change the new port number
4. restart web server : /usr/local/apache /bin --- ./apachectl -k start.

5. StaleConnectionException
This exception (com.ibm.websphere.ce.cm.StaleConnectionException) indicates that the connection currently being held is no longer valid.
This can occur for numerous reasons, including the following:
1 . The application tries to get a connection and fails, as when the database is not started.
2 A connection is no longer usable due to a database failure. When an application tries to use a connection it has previously obtained, the connection is no longer valid. In this case, all connections currently in use by an application could get this error when they try to use the connection.
3 The application using the connection has already called close() and then tries to use the connection again.
4 The connection has been orphaned because the application had not used it in at most two times the orphan timeout; then the application tries to use the orphaned connection.

6.
 

 

Thursday, 22 January 2015

WebLogic Real time issues and Interview question and answers

Real time issues
Scenario 1:
 you have a browser client submitting a request to the server, while the server is writing the response back to the browser client; the user hits the Stop button or simply kills the browser.
Since the server is still writing the response back, the "pipe" to the client is gone, resulting in broken pipe. This in itself is not an error, but from the specifications mandates the server to regard this as an error, hence WebLogic has to report this and log this to the server log.

This is quite common, since at times, the user's bandwidth might become low, or server takes a bit of time in processing the request, or simply that the result to be written back to the response from the server is large. Lot of times, users does not want to wait, and click the Stop button in browser.

This error indicates a communication problem between the client and the server. The socket from the server back to the client is dead.

This can occur from events such as:

a) The browser (client) breaks the socket connection by hitting the stop button, or the user issuing another HTTP request prior to the first request finishing.

b) Network congestion, latency, etc.

c) Firewalls, timeouts, etc.   

The error could happen if the number of files that can be open has been reached.

So, these errors can be indicative of user generated errors beyond your control, network -- internet problems beyond your control, or your own network configuration that is causing problems.

For this issue you can also test your production network topology and configuration vs. your test configuration, as the later is usually less complex and restrictive.

Scenario 2:
JDBC connection has expired for some reason, either the DB has been restarted or the connection has timed out. Sometimes, improper driver will also cause this problem.


Interview Question and Answers


Q. What is weblogic cluster?
Ans: A Weblogic cluster is logical group of weblogic server instances working together for coordination. A cluster appears to clients to be a single WebLogic Server instance whether it is a web client or a java application.

Q. What is load balancing?
Ans: Equally distributing the load across the servers to serve the application in a smoother way.
Algorithms used for load balancing are: Round Robin, Weight based, and Random.
Server Affinity load balancing algorithms (round-robin-affinity, weight-based-affinity, and random-affinity)

Q. How does a server know when another server is unavailable?
Ans: WebLogic Server uses two mechanisms to determine if a given server instance is unavailable. Each WebLogic Server instance in a cluster uses multicast to broadcast regular “heartbeat” messages that advertise its availability. By monitoring heartbeat messages, server instances in a cluster determine when a server instance has failed. The other server instances will drop a server instance from the cluster, if they do not receive three consecutive heartbeats from that server instance
WebLogic Server also monitors socket errors to determine the availability of a server instance.
For example, if server instance A has an open socket to server instance B, and the socket unexpectedly closes, server A assumes that server B is offline.

Q. How do clients learn about new WebLogic Server instances?
Ans: Once a client has done a JNDI lookup and begins using an object reference, it finds out about new server instances only after the cluster-aware stub has updated its list of available servers.

Q. How do stubs work in a WebLogic Server cluster?
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 is multicast test?
Ans: The Multicast Test is a network paradigm in which machines communicate each other. This utility helps you debug multicast problems when configuring a Weblogic Cluster. The utility sends out multicast packets and returns information about how effectively multicast is working on your network.
As per the general recommendation do not perform the Multicast test when Managed servers are running.

This is because Managed servers communicate each other in Cluster to share the actual data and when we do Multicast test there will be confusion between actual data and test data.
If your environment is in Production and you cannot bring Managed servers down then you can change Multicast test address and can perform the test to see the results.
You can also run some networking diagnostics to make sure there are no hardware issues affecting communication among the cluster nodes.
At a minimum, the ping utility can be used to verify that network communication is unhindered (in both directions) between each of the server addresses.
Q. Which services cannot be clustered?
Ans: File services, Time services. They cannot be deployed homogenously through a cluster and they do not benefit from any of the clustering services.

Q. Which protocol is used for multicast?
Ans: UDP - User Datagram Protocol

Q. What is the range of multicast address assignments?
Ans: The multicast addresses are in the range 224.0.0.0 through 239.255.255.255.

Q. What is difference between unicast and multicast?
Ans: Weblogic server provides an alternative to using multicast to handle cluster messaging and communications. Unicast configuration is much easier because it does not require cross network configuration that multicast requires.
Additionally, it reduces potential network errors that can occur from multicast address conflicts. Multicast is communication between a single sender and multiple receivers on a network. Typical uses include the updating of mobile personnel from a home office and the periodic issuance of online newsletters.
Multicast enables a single device to communicate with a specific set of hosts, not defined by any standard IP address and mask combination. This allows for communication that resembles a conference call. Anyone from anywhere can join the conference, and everyone at the conference hears what the speaker has to say. The speaker's message isn't broadcasted everywhere, but only to those in the conference call itself. A special set of addresses is used for multicast communication.
Unicast is communication between a single sender and a single receiver over a network. Unicast servers provide a stream to a single user at a time, while multicast servers can support a larger audience by serving content simultaneously to multiple users.
Multicasting exists as UDP multicasting, whereas non-multicast UDP (and TCP) messages are called unicast. The next thing to know is that multicast will often not be sent over a router to another network.
The TTL is low for most multicast packets. TTL on IP packets refers to the maximum number of network hops that a packet can make to get to its destination. Unicast packets typically are allowed to cross about 30 networks.
The above mentions the basic differences between multicast and unicast communication. The unicast communication should be faster as it implements the point to point communication within servers. Comparatively both the multicast and unicast communications have their own advantages as well as disadvantages.

Thread Related Questions:
Q. How are new threads assigned?
Ans: As work enters a Weblogic Server, it is placed in an execute queue. This work is then assigned to a thread within the queue that performs the work.
By default, a new server instance is configured with a default execute queue, weblogic.kernel.default, that contains 15 threads (in development) and 25 threads (in production).
In addition, Weblogic Server provides two other pre-configured queues:
weblogic.admin.HTTP—Available only on Administration Servers, this queue is reserved for communicating with the Administration Console; you cannot reconfigure it.
weblogic.admin.RMI—Both Administration Servers and Managed Servers have this queue; it is reserved for administrative traffic; you cannot reconfigure it.
Unless you configure additional execute queues, and assign applications to them, web applications and RMI objects use weblogic.kernel.default.

Q. Is there an ability to configure the container to kill stuck threads after X amount of time? Ans: Currently, Weblogic reports that a thread is stuck after X amount of time, but the thread keeps running.
Once the thread is stuck or processing it cannot be killed.
If they are not stuck or processing the request then they are called idle thread that is waiting for request (waitforrequest() method: A thread invokes this method when it is waiting for work to be assigned to it by its manager).

Q. Is there a way to manually kill a stuck thread?
Ans: No, once thread is created it would be reused but cannot be killed.

Q. Why does the user “WLS Kernel” own so many threads?
Ans: WLS Kernel owns only the number of the threads which are configured as a default.

Q. What is “WLS Kernel” doing with these threads?
Ans: As specified earlier it is kept in default execute queue and then assigned to a thread within the queue that performs the work.

Q. Can we make these threads available to the application?
Ans: No we cannot do that.
Q. App server, Web server: What's the difference?
Ans:
The Web server
A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programs generate a response, most often in HTML, for viewing in a Web browser.
When a request comes into the Web server, the Web server simply passes the request to the program best able to handle it. The Web server doesn't provide any functionality beyond simply providing an environment in which the server-side program can execute and pass back the generated responses. The server-side program usually provides for itself such functions as transaction processing, database connectivity, and messaging.
While a Web server may not itself support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering — features oftentimes erroneously assigned as features reserved only for application servers.
The application server
An application server exposes business logic to client applications through various protocols, possibly including HTTP. While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on an object (or a function in the procedural world).
Such application server clients can include GUIs (graphical user interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information is program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic however it wants.
In most cases, the server exposes this business logic through a component API, such as the EJB (Enterprise JavaBean) component model found on J2EE (Java 2 Platform, Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, resource pooling, and messaging. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques.

Q. What are tlog files?
Tlog files are the files used by weblogic to keep a trace of current transactions.
For example, when an instance is restarted, the tlog files are used to perform the second step of a two-phase commit on a transaction that was in progress. Sometimes, when a transaction is corrupted, you've got to delete these files to get rid of the phantom transaction. There is no need to restart a server to have them recreated.

Q. Why do I get “NoClassDefFound”/“Too Many Open files” messages on Solaris?
Problem: When I am using WebLogic Server on Solaris and try to run my application, I get a “NoClassDefFound” error, although the class causing the error does exist and is in the right directory. In fact, there are other classes in the same directory that are getting loaded. I also get a “Too many open files” error.
Ans: On Solaris, each user account has a certain limited number of file descriptors. You can find out how many file descriptors you have with the limit command in csh.
You can increase file descriptors if you have enough privileges with the ulimit command in the csh. Otherwise, ask your system administrator to increase the file descriptors available to your processes.

Q. How can I speed up connection responses?
Ans: Connection delays are often caused by DNS problems. WebLogic performs a reverse lookup on the hostname from which a new connection is made. If the DNS reverse lookup is not working properly because the connection is coming from a proxy server, it could be responsible for the delay. You might want to work with your system administrator to determine whether DNS and the third-party networking software are working properly. Try writing a simple server program that performs a reverse lookup on any connection made to it. If that lookup is delayed, then you know that the proxy server is the source of the problem.

Q. Differences between Sun JVM and JRockit
Ans: Users cannot explicitly set the PermSize: The memory JRockit uses can conceptually be divided into only two categories: heap and native memory. Unlike Sun JVM,
JRockit has no special memory areas (like MaxPermSize for “permanent generation” allocations). Java objects are created on the heap, and all other memory allocations are done in native memory (which is considered non-heap memory).
Heap + Native memory is approximately = JVM process size.
JRockit uses more native memory than Sun’s JVM, meaning it usually will not support equivalent heap sizes.
JRockit doesn’t have:
- java code interpretation mode, only compilation mode
(Java code compiled into byte code itself compiled into platform specific machine code)
- the notion a permanent generation set via MaxPermSize. This part of the memory is unbounded in the native memory (outside the java heap) and grows as needed
JRockit has:
- More diagnostic tools than other JVMs such as JRA
- Management console with no overhead on performance
- Better performance on Intel architectures than other VMs
- Higher memory usage for better performance
Advantages of JRockit:
What gives it the performance advantage?
Sun’s HotSpot JVM interprets all byte-code and compiles the hotspots (frequently called methods).
- This is its default mode of execution (-Xmixed)
- (–Xint) has to be specified to disable the HotSpot compiler and run in “interpreted-only” mode.
JRockit compiles all byte-code and optimizes the hotspots.
- The compilation gives JRockit its performance advantage and cannot be disabled. All methods that JRockit encounters for the first time in a run are converted into an internal representation of code (“code generation”) which is then compiled.
- The compilation is also what causes JRockit to have a larger footprint, since it uses native memory for code generation, generated code, optimization, garbage collection, thread allocation, etc. JSPs are converted into Java code, which is then compiled. JSPs are generally complex and produce large Java code, so they tend to be especially high consumers of native memory. An application with lots of JSPs can cause JRockit to exhaust the native memory and swamp the virtual process space.
- The optimization can be turned off by specifying the command-line option “-Xnoopt”. Historically, optimization has not entirely been reliable and can cause crashes and performance problems, so, if the customer is willing, –Xnoopt is a standard workaround that is worth trying blindly.

Q. What is the function of T3 in WebLogic Server?
Ans: T3 provides a framework for WebLogic Server messages that support for enhancements.
These enhancements include abbreviations and features, such as object replacement, that work in the context of WebLogic Server clusters and HTTP and other product tunneling.
T3 predates Java Object Serialization and RMI, while closely tracking and leveraging these specifications. T3 is a superset of Java Object. Serialization or RMI; anything you can do in Java Object Serialization and RMI can be done over T3.
T3 is mandated between WebLogic Servers and between programmatic clients and a WebLogic Server cluster. HTTP and IIOP are optional protocols that can be used to communicate between other processes and WebLogic Server. It depends on what you want to do. For example, when you want to communicate between
- A browser and WebLogic Server-use HTTP
- An ORB and WebLogic Server-IIOP.


Q. Can I refresh static components of a deployed application without having to redeploy the entire application?
A. Yes. You can use weblogic.Deployer to specify a component and target a server, using the following syntax:
java weblogic.Deployer -adminurl
http://admin:7001 -name appname -targets
server1,server2 -deploy jsps/*.jsp
Q. How do XA and non-XA drivers differ in distributed transactions?
Ans: The differences between XA and non-XA JDBC drivers are:
Atomicity Guarantee. An XA driver implements the XAResource interface and can participate fully in the 2PC protocol driven by the WLS Transaction Manager. This guarantees atomicity of updates across multiple participating resources.
However, a non-XA driver does not implement the XAResource interface and cannot fully participate in the 2PC protocol. When using a non-XA driver in a distributed transaction, WLS implements the XAResource wrapper on behalf of the non-XA driver. If the data source property enableTwoPhaseCommit is set to true, then the WLS XAResource wrapper returns XA_OK when the Transaction Manager invokes the prepare() method. When the Transaction Manager invokes commit() or rollback() during the second phase, the WLS XAResource wrapper delegates the commit() or rollback() call to the non-XA JDBC connection. Any failure during commit() or rollback() results in heuristic exceptions. Application data may be left in an inconsistent state as a result of heuristic failure.
Redirecting Connections. A non-XA driver can be configured to perform updates in the same distributed transaction from more than one process. WLS internally redirects the JDBC calls made from different processes to the same physical JDBC connection in one process. However, when you use a XA driver, no such redirection will be done. Each process will use its own local XA database connection, and the database ensures that all the distributed updates made in the same distributed transaction from different processes will be committed atomically.
Connection Management. Whether you are using the non-XA driver or XA driver in distributed transactions, WLS implements JDBC wrappers that intercept all the JDBC calls and obtains a physical JDBC connection from the connection pool on demand.
When you use a non-XA driver in distributed transactions, in order to ensure that updates made from different processes are committed atomically, WLS associates the same physical JDBC connection with the distributed transaction until it is committed or rolled back. As a result, the number of active distributed transactions using the non-XA connection pool is limited by the maximum capacity of the JDBC connection pool.
When you use an XA driver, the connection management is more scalable. WLS does not hold on to the same physical XA connection until the transaction is committed or rolled back. In fact, in most cases, the XA connection as only held for the duration of a method invocation. WLS JDBC wrappers intercept all JDBC calls and enlist the XAResource associated with the XA connection on demand. When the method invocation returns to the caller, or when it makes another call to another server, WLS delists the XAResource associated with the XA connection.
WLS also returns the XA connection to the connection pool on delistment if there are no open result sets. Also, during commit processing, any XAResource object can be used to commit any number of distributed transactions in parallel. As a result, neither the number of active distributed transactions using the XA connection pool nor the number of concurrent commit/rollbacks is limited by the maximum capacity of the connection pool. Only the number of concurrent database access connections is limited by the maximum capacity of the connection pool.

Q. Can I use more than one non-XA connection pool in distributed transactions?
A. No. Even if you set EnableTwoPhaseCommit=true for both TxDataSources of the connection pools, attempting to use two non-XA connection pools in the same distributed transaction will result in:
"java.sql.SQLException: Connection has already been created in this tx context for pool named. Illegal attempt to create connection from another pool: “
when you attempt to get the connection from the second non-XA connection pool.

Q. How does the Connection Reserve Timeout parameter on a datasource work?
A: Weblogic uses this parameter to wait for a connection to become available in the pool. The wait starts when your application requests a connection from a connection pool backing the datasource. If the pool has no connection free, it will wait up to the set timeout to see if a connection returned to the pool by some other thread. If this happens, you will get that one. If no connection has become available within the timeout period you will get an exception.

A better approach is increasing size of the connection pool so that it can accommodate all requests for connections. This parameter has no effect if there are timeouts while testing reserved connections. 
Q. What is node manager?
Ans: Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart Administration Server and Managed Server instances from a remote location.

Q. What are the modes available in WLST?
Ans: Interactive Mode, Script Mode, and Embedded Mode
Interactively, on the command line— Interactive Mode
In batches, supplied in a file— Script Mode
Embedded in Java code— Embedded Mode

Q. What are the files which get generated when we click on “lock & edit” option of weblogic console?
Ans: 2 files - edit.lok & pending

Q. Where will be user credentials stored?
Ans: LDAP