Tuesday, February 16, 2010

Was interview stuff

1.What is Websphere and why we prefer IBM product compare to others?
Websphere is middleware product which is best known for its turn key operation in e-business applications. It has run time components and tools which help in creating applications which run on Websphere application server.
IBM Websphere is best choice due to unique and incomparable supports which they provide to their customers to troubleshoot and for smooth operations.


2.Explain the architecture of Websphere?
Websphere is mainly consists of three components:
•Webserver (IBM http server, Sun Webserver etc.)
•Application Server (IBM Application Server etc.)
•Database (DB2, Oracle etc.)


3.What is difference between Webserver and Appserver?
The main responsibility of Webserver is to serve static request while Appserver is used for dynamic request.
Moreover, Webserver handle http requests and also acts like a load balancer while Appserver has large area of works like security, performances, clustering, support for various files (.ear,.war)deployments etc.


4.What is difference between WAS5 and WAS6 Versions?
•In WAS5, we need to install BASE and ND separately while in WAS6, only one file is responsible to install both.
•In WAS5, for every new profile, we need to do separate installation while in WAS6, single installation can create multiple profiles.
•WAS5 supports J2EE1.3 while WAS6 supports J2EE1.4.
•In WAS6, we have concept of Service Integration Bus (SIB) for messaging which was not with any previous versions.
•In WAS6, we have default JMS provider
•Webservers can be managed by admin console in WAS6


5.What is difference between WAS 6.0 & 6.1?
•In WAS6.1, we have cell profile concept which was not in WAS6.0
•WAS6.1 supports JAVA 1.5 while WAS6.0 supports JAVA 1.4
•We have partition profile architecture concept in WAS6.1 that gives more flexibility for backups and updates with no outage
•We have authentication alias concept while creating Data-Source in WAS6.1 which was not in WAS6.0
•WAS6.1 is 64 bit enabled for better performance and support


6.What are the new security features in WAS6.1?
•Administrative security is enabled automatically during installation

•All internal transports are authenticated by default
•Most internal transports are encrypted by default. DCS, which normally runs within a cell, remains unencrypted by default, but encryption can be enabled
•The default encryption keys are eliminated. A cell-specific set of keys is created automatically.
•JNDI is read-only (rather than read/write) by default to all.
•Messaging limits connections to only authenticated users granted the bus connect role by default. All Authenticated no longer has that role by default.


7.What is difference between Ear and War file?
An EAR file is an Enterprise Application Archive which is a general J2EE application. It is a top-level container which contains modules like –EJB modules, Web module, application client module etc.
A WAR file is a Web Application Archive – containing servlets, JSPs and their supporting classes and files. WAR file is mainly used for Web application deployed to a servlet/JSP engine.
EAR file contains the EJB modules of the applications but it can also contain WARs, JARs etc.


8.What is difference between Plug-in module and plugin-cfg.xml file?
Plug-in module is very important part of Webserver configuration which handles the HTTP requests and redirect them to Webserver or Appserver with help of ‘plugin-cfg.xml’ on the basis 0f type of request.


If request is for static content then it get diverts to Webserver and if request is for Dynamic content then it goes to Appserver.


When request arrives to the Webserver, The plug-in module first check the request URI in XML file, if it is there then request get serve by Appserver and if it is not there then it get serve by Webserver itself.


9.Explain JACL & JYTHON scripting?
JACL: JACL is a self-contained implementation of a Tcl interpreter, written entirely in Java. JACL also includes features that facilitate communication between a Java interpreter and a TCL interpreter.
JYTHON: JYTHON is a programming hybrid. It is an implementation of the Python scripting language written in 100% pure Java that runs under any compliant Java Virtual Machine (JVM). Using JYTHON, you can write Python programs that interact with any Java code.


10. What do you mean by federated repository?
Federated repositories enable us to use multiple repositories with Web Sphere Application Server. These repositories, which can be file-based repositories, LDAP repositories, or a sub-tree of an LDAP repository, are defined and theoretically combined under a single realm.
It is required that the user ID, and the distinguished name (DN) for an LDAP repository, be unique in multiple user repositories that are configured under the same federated repository configuration.
In addition, the federated repositories functionality in WebSphere Application Server supports the logical joining of entries across multiple user repositories when the Application Server searches and retrieves entries from the repositories.


11. What is Dynamic URLs?
A dynamic URL is a page address that results from the search of a database-driven web site or the URL of a web site that runs a script. In contrast to static URLs, in which the contents of the web page stay the same unless the changes are hard-coded into the HTML, dynamic URLs are generated from specific queries to a site's database. The dynamic page is basically only a template in which to display the results of the database query. Instead of changing information in the HTML code, the data is changed in the database.
- A dynamic URL is the address - or Uniform Resource Locator (URL) - of a Web page with content that depends on variable parameters that are provided to the server that delivers it.


12. How to install WAS in silent mode?
Copy the responsefile.nd.txt as, for example, responsefile.txt.
cp responsefile.nd.txt responsefile.txt
Open responsefile.txt and edit:
a. Set property -OPT silentInstallLicenseAcceptance to “true”.
b. Uncomment -OPT installLocation=”/opt/IBM/WebSphere/AppServer” and set it to correct value if we are installing into a different location.
c. Comment out the Windows install Location option so we do not have a duplicate entry for installLocation option. If we have a duplicate entry on this option, the installation will fail.
d. Change option -OPT profileType to “standAlone”.
e. If we enable administrative security:
set a value for the option -OPT PROF_adminUserName
set a value for the option -OPT PROF_adminPassword
5. Save our response file.
6. Issue the command. /install -options “responsefile.txt” -silent


13. What is web container?
A web container is run time environment for web applications. It processes servlet, JSP and other types of server side components.
A container that implements the Web component contract of the J2EE architecture. This contract specifies a runtime environment for Web components that includes security, concurrency, life-cycle management, transaction, deployment, and other services. A Web container provides the same services as a JSP container as well as a federated view of the J2EE platform APIs. A Web container is provided by a Web or J2EE server.


14. What happened in background when we use addNode.sh command to federate the Node with DMGR?
For federation, First go to Custom profile bin then run the below command:
./addNode.sh DMGR_HOST DMGR_SOAP_PORT
-Deleting old back up directory
-Backing up the original cell repository
-Creating node agent configuration for new node
-Adding new node configuration to cell : DmgrCell
-Synchronizing configuration between node and cell


15. What is SOAP port (SOAP) means?
SOAP is an XML-based protocol that consists of three parts: an envelope that defines a framework for describing message content and process instructions, a set of encoding rules for expressing instances of application-defined data types, and a convention for representing remote procedure calls and responses.
SOAP is transport protocol-independent and can be used in combination with a variety of protocols. In Web services that are developed and implemented for use with Web Sphere Application Server, SOAP is used in combination with Hypertext Transport Protocol (HTTP), HTTP extension framework, and Java Messaging Service (JMS). SOAP is also operating system independent and not tied to any programming language or component technology.
Soap port we generally use to connect to DMGR. If we are using addNode.sh command to federate the node then also we need this port number.


16. Syntax to deploy application with wsadmin scripting?
$AdminApp install "location_of_ear.ear" {-node nodeName -cell cellName -server serverName}


17. How do you mean by fix pack?
It is recommended from IBM to resolve the issue with any WAS versions. it provides minor new features to enhance performance of previous WAS release.


18. How to take back up of WAS?
From the bin directory of WAS, run the backupConfig.sh command to take back up of the config files and the backed up zip file will be in the current location.


19. What is difference between thread dump and core dump?
Thread Dump: When we trigger a thread dump on a application server,all active thread informations will be dumped into file which is known as thread dump. Here we can get information about thread like active thread, hung thread, dead lock, runnable and inactive thread info.
Command: kill -3 PID
Core/Heap Dump: It’s snap shot of our JVM’s Heap memory, so here we can have all active java objects and their activities which object doing what and how much memory it is occupying....


20. Explain the types of Cluster?
Types of clusters:
vertical cluster - members of cluster must be at same node
horizontal cluster - members of cluster must be at different nodes


21. What is Semaphore?
A semaphore is nothing but a term used in UNIX for a variable which acts as a counter. If two processes trying to access the same file simultaneously then by assigning value to semaphore, we can control the access of file when other process is already using that file.


22. What is Zombie process?
Zombie process or defunct process is a process that has completed execution but still has an entry in the process table. This entry is still needed to allow the process that started the (now zombie) process to read its exit status.




When a process ends, all of the memory and resources associated with it are deallocated so they can be used by other processes. However, the process's entry in the process table remains. The parent can read the child's exit status by executing the wait system call, at which stage the zombie is removed. The wait call may be executed in sequential code, but it is commonly executed in a handler for the SIGCHLD signal, which the parent receives whenever a child has died.


A zombie process doesn't react to signals because it's not really a process at all- it's just what's left over after it died. What's supposed to happen is that its parent process was to issue a "wait()" to collect the information about its exit. If the parent doesn't (programming error or just bad programming), you get a zombie. The zombie will go away if its parent dies- it will be "adopted" by init which will do the wait()- so if you see one hanging about, check its parent; if it is init, it will be gone soon, if not the only recourse is to kill the parent..Which we may or may not want to do.

No comments:

Post a Comment