Pages

Ads 468x60px

Sunday, 14 October 2012

IBM Interview Questions-1 in Websphere Application Server


Part - I: IBM INTERVIEW  

1. Tell me about your educational background.
2. Tell me about your day to day activity.
3. what is load balancing?
A) Edge component, BIGIP product hardware load balance.
It will be connected to router and switches, Webserver – to – app. server load balancer
4. What is Work Load Management?
A) Failover, High availability, scalability and security are coming from Clustering (WLM).
Two main features are - Load Balancing - AffinityWebSphere WLM is offering these two features on different levels like - Application/web Server Clustering
5. what is meant by profile? How many types of profiles are there in Was v6.0?
A) 3 types of profiles in 6.0 1.application server , 2. dmgr, 3.default
in 6.1 there are 4 – 1.dmgr, 2.app.serv, 3.default,4.cell profile(already federated appserver profile)
6. how you fedarate a node from deployment manager? and how you federate when global security is enabled.?
A) we can federate it from console, need to select Node under system administration section, then select a new node button then provide required(soap port) data.
7. What is SSL ? hOW You configure SSL?
A) It is Already been configured will use dummy, web server part, certificate, configure in that virtual host.
8. What is meant by Horizontal Clustering? Explain?
A) DONE
9. How to check disk usage in linux or unix?
A) Du -k
10. How to check the multiple NIC in Unix or linux?
A) ifconfig -a
11. How to identify and kill a process ID?
A) Ps –ef
12. What are the measures you follow while deploying an application in production environment?
A) we need to consider below steps.
1. need to take necessary backups, 2. Raise a change request, 3. Approval request, 4. schedule date from change control.
13. what is the use of trace.log and activity.log?
A) we can use “showlog” commad in bin directory for getting tracer information.
Trace.log : It will have details about the WAS Environment, understandable text format.
Activity.log : It will have complete information about Application server environment, and it is not in readable format, “waslogbr.bat” for opening/viewing this log. It will have information about complete base class and other stuff. We have to use “symptom database” for fixing/compare identifying the issue.
15. where do you get performance information in log files of an application server?
A) there are 2 logfiles
1. NativeError.log – at what state the GC happened and how much memory freed up.
2. NativeOut.log – it is having general logs.

Cluster Configuration and Deploy Applications


Clusters & Configuration

With Network Deployment, you can use application server clustering to enhance
workload distribution. A cluster is a logical collection of application server processes that provides workload balancing and high availability.

Application servers in a cluster are members of that cluster and must all have
identical application components on them. Other than the applications on them, cluster members do not have to share any other configuration data.

For example, one cluster member might run on a large multi-processor server
while another member of that same cluster might run on a small mobile computer. The server configuration settings for each of these two cluster

members is very different, except the application components that are assigned
to them. In that area of configuration, they are identical. The members of a cluster can be located on a single node (vertical cluster), across multiple nodes (horizontal cluster), or on a combination of the two.

When you install, update, or delete an application, the updates are automatically
distributed to all members in the cluster. In WebSphere Application Server V5, if
you updated an application on a cluster, you had to stop the application on every
Server in the cluster, install the update, and then restart the server. With
WebSphere Application Server V6, the Rollout Update option allows you to
update and restart the application servers on each node, one node at a time.
This provides continuous availability of the application.

CREATION OF CLUSTERS:

            Open the admin console of deployment manager

In left hand side console
à Select the server
            -     Application Servers
            -     WebServers
            -     Generic Servers
-     JMS Servers
-          Clusters
-          Cluster Topology

à Click on: Clusters
n  Click on: New
n  Enter the cluster name: Sumanth (name of the cluster)

à Existing Server
0 : Do not include an existing server in this cluster (in this we can create new servers)
                                                0: Select an existing server to add to this cluster ( in this we can select the servers already which are created)
Note: if you want create the new server the click on : Do not include an existing server in this cluster
n  Click on next
Member name  : server1 (name of the server)
            Click on : apply

If you want to create one more server:  enter the member name again
n  Click on next

è If you want to use the existing server click on : Select an existing server to add to this cluster 
n  Browse for the path the server

D:\IBM\WebSphere\AppServer\profiles\Dmgr01\config\cells\mirdev81Cell01\nodes\mirdev81CellManager01\servers

n  Click on : next

è Summary (it will show all the select components to create the cluster)
è Click on : FINISH
è Click on : SAVE

è Expand + total changes document: 30 (in total it tells about the servers)
è Synchronize changes with Nodes

TO SEE THE PORT NUMBERS:

è Click on selected server
      ex: server2
      à Click on Ports
      à Wc adminhost : in this we can see the port number

TO START THE CLUSTER:

à Select the server
            -     Application Servers
            -     WebServers
            -     Generic Servers
-     JMS Servers
-          Clusters
-     Cluster Topology

è Click on : Clusters
     
      select                     name                status
sumanth                 

è Click on: Start (it will start the cluster and shows in status)
NOTE: if the cluster not started, then start the each server in the cluster)

TO DEPLOY AN APPLICATION ON CLUSTER:

            Open the admin console of deployment manager

In left hand side console
à Select the server
            -     Application Servers
            -     WebServers
            -     Generic Servers
-     JMS Servers
-          Clusters
-          Cluster Topology

è Select the Application server
            à Click on : install new application

è Path of the new application
n  Local file system
n  Remote file system

à click on Local file system : EJB.War   ( Browse for the location the file)

NOTE: select the War File or Ear File
      WAR FILE: Web Arch File
      EAR File : Enterprise Arch

èContext Root : naidu (name of the context root, by this name we will open the browser later)
à Click on : next

è Application security warning
                  à Click on : continue

è Select installed options
                  à Click on : next

è Map modules to server

Select        Modules          URL                Server
                  EJB Client       Client.waR,     WebSphereCell=
WEB-INF/      mirdev30cell01,
WEB.XML     node=mirdev30node01, server=server1

è Cluster and Server: webspherecell=miredv30cell01, cluster=sumanth
NOTE: the above clusters and servers shows,  the clusters and server which are already created and select the required cluster to deploy the application.

è Select the cluster sumanth
                              à Click on : Apply
                              à Click on : next
                              à Click on : next
                  à Click on : Finish

è Save the master configuration            
                  à Click on : save

è select the war file and start

NOTE : after creation of cluster, Go to the browser

                  http://localhost:9081/sumanth

                  sumanth : cluster root name
                  9081 : port number (wc dafault host)

TO SEE THE PORT NUMBER:
                  à servers
n  Application server
Click on required server and click on ports
-- Wc dafault host

Saturday, 13 October 2012

Explain about Three-tier architectures


Three-tier architectures

WebSphere Application Server provides the application logic layer in a three-tier architecture, enabling client components to interact with data resources and legacy applications.
Collectively, three-tier architectures are programming models that enable the distribution of application functionality across three independent systems, typically:
  • Client components running on local workstations (tier one)
  • Processes running on remote servers (tier two)
  • A discrete collection of databases, resource managers, and mainframe applications (tier three)
These tiers are logical tiers. They might or might not be running on the same physical server.
Three tier architecture
First tier. Responsibility for presentation and user interaction resides with the first-tier components. These client components enable the user to interact with the second-tier processes in a secure and intuitive manner. WebSphere Application Server supports several client types. Clients do not access the third-tier services directly. For example, a client component provides a form on which a customer orders products. The client component submits this order to the second-tier processes, which check the product databases and perform tasks that are needed for billing and shipping.
Second tier. The second-tier processes are commonly referred to as the application logic layer. These processes manage the business logic of the application, and are permitted access to the third-tier services. The application logic layer is where most of the processing work occurs. Multiple client components can access the second-tier processes simultaneously, so this application logic layer must manage its own transactions.
In the previous example, if several customers attempt to place an order for the same item, of which only one remains, the application logic layer must determine who has the right to that item, update the database to reflect the purchase, and inform the other customers that the item is no longer available. Without an application logic layer, client components access the product database directly. The database is required to manage its own connections, typically locking out a record that is being accessed. A lock can occur when an item is placed into a shopping cart, preventing other customers from considering it for purchase. Separating the second and third tiers reduces the load on the third-tier services, supports more effective connection management, and can improve overall network performance.
Third tier. The third-tier services are protected from direct access by the client components residing within a secure network. Interaction must occur through the second-tier processes.
Communication among tiers. All three tiers must communicate with each other. Open, standard protocols and exposed APIs simplify this communication. You can write client components in any programming language, such as Java or C++. These clients run on any operating system, by speaking with the application logic layer. Databases in the third tier can be of any design, if the application layer can query and manipulate them. The key to this architecture is the application logic layer.

Configuring JDBC, Explain about JNDI

1. What is JDBC, JNDI? 
      

      JDBC – Java Database Connectivity 
      JNDI – Java Naming and Directory Interface



2. What type of driver you are using? Type 4 driver ?

  Type 1 driver: JDBC-ODBC Bridge
  This driver called as JDBC-ODBC bridge.The Java Statements converts to JDBC statements.JDBC   statements calls ODBC by using JDBC-ODBC bridge. ODBC drivers convert into the requirements of databases.
  Java--->JDBCStat-->JDBC-ODBC bridge-->ODBC-->Databases.
  Type 2 driver: Native-API/partly Java driver
  This driver is called as Native Driver where it requires the some native code to connect to the       databases.
  Type 3 Driver: Net-protocol/all-Java driver
  This driver is called as Protocal driver where
  Java-->JDBC statements-->SQLStatements--> databases.
  Type 4 Driver: This driver directly converts the java statements to SQl Statements which    require to databases. It wont convert to JDBC statement

3. what is meant by connection pooling?

connection pool is a 
cache of database connections maintained by the database so that the connections can be reused when the database receives future requests for data. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and wastes resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database

4. What is JNDI ?

  We can register resources in the application server’s java naming and directory interface (jndi)  namespace. Client applications can then obtain the references to these resource objects in their programs.


Configuring a JDBC provider using the administrative console
  1. Open the administrative console.
  2. Click Resources > JDBC Providers.
  3. Select the scope at which applications can use the JDBC provider. (This scope becomes the scope of your data source.) You can choose a cell, node, cluster, or server
  4. Click New.
  5. Use the first drop-down list to select the database type of the JDBC provider you need to create.
If the list of database types does not include the product that you want to use, select User-Defined. This selection triggers the console to display your provider type as User-defined JDBC provider, and your implementation type as User-defined.
From the second drop-down list, select your JDBC provider type.
  1. From the third drop-down list, select the implementation type that is necessary for your application. If your application does not require that connections support two-phase commit transactions, choose Connection Pool Data Source. Choose XA Data Source, however, if your application requires connections that support two-phase commit transactions. Applications that use this data source configuration have the benefit of container-managed transaction recovery.
  2. Click Next to view the general property settings page for your JDBC provider.
  3. Ensure that all required properties have valid values.
  4. Click Apply to view the page with your new JDBC provider settings. Note that two active data source links now appear under the Additional Properties heading on this page. To set up a data source, click the link that corresponds to the type required by your application
  5. Click OK to return to the JDBC providers page, where your new JDBC provider appears in the list.
Remember: If you modify the class path or native library path of a JDBC provider, click OK and then restart every application server within the scope of that JDBC provider. Otherwise, the new configuration does not work, and you receive data source failure messages
Configuring a data source using the administrative console
  1. Open the administrative console.
  2. Click Resources > JDBC Providers.
  3. Choose the JDBC resource provider under which you want to create your data source. The detail page for this provider is displayed.
  4. Under Additional Properties, click the Data Sources link that is appropriate for your application. The Data sources or Data sources (Version 4) page is displayed.
  5. Click New to display the Data source settings page.
  6. Verify that all the required properties have valid values.
The following steps guide you through supplying the property values, a process that is basically the same for both data source types:
    1. Select a DataStoreHelper class name.
      • You can choose a DataStoreHelper class name from the list that is provided. The application server provides a class called DataStoreHelpers, or you can keep the default selection.
      • To use a data store helper other than what is provided, click Specify a user-defined DataStoreHelper. Type a fully qualified class name in the field that is provided.
    2. The next section of properties varies according to the database selection, provider type, and implementation that you chose for your JDBC provider. These properties are either required or highly recommended for your data source. Provide valid values for these settings if you do not want to accept the default values.
    3. Click Component-managed Authentication Alias if your database requires a user ID and password for a connection. This alias is used only when the application resource reference is using res-auth = Application.
Important:(For components with res-auth=Container) Both the Container-managed Authentication Alias and Mapping-Configuration Alias settings are deprecated. They are superseded by the specification of a login configuration on the resource-reference mapping at deployment time. You must now use this login setting to define the aliases at deployment.
    1. If you chose XA Data Source as the implementation type of your JDBC provider, you need to specify the alias used during transaction recovery processing. An additional section entitled Authentication Alias for XA Recovery is available. Select either Use Application Authentication Alias to use the same value that you chose for component-managed authentication, or select Specify: to choose a different alias from the drop-down list.
  1. Click Apply to view a page with your new data source settings. Additional properties and Related items sections are now available on this page. Additional properties contains the Connection pool, Custom properties, and WebSphere Application Server data source properties choices. (If you are using a Version 4 data source, however, you see only the Connection pool and Custom properties links.)
    1. Click on the first link to define settings that affect the behavior of the Java 2 Connector (J2C)
    2. Use the WebSphere Application Server data source properties page to input settings that exclusively affect the application server's connection to the database.
    3. Go to the Custom properties page to view and modify additional properties that the database vendor might require or recommend for the connection of its product to an application server.
    4. The Related items section (applicable only to later version data sources, not Version 4 data sources) contains the J2C Authentication data entries choice. Here, you can specify a list of user IDs and passwords for J2C security to use.
  2. Click Save.
  3. Return to the data source page to confirm that your new data source is displayed in the list
Trace strings for JDBC data sources

 Identify your database type by selecting the trace group WAS.database and typing one of the following trace strings in the console:
  • com.ibm.ws.database.logwriter Trace string for databases that use the GenericDataStoreHelper. You can also use this trace string for unsupported databases.
  • com.ibm.ws.db2.logwriter Trace string for DB2 databases.
  • com.ibm.ws.oracle.logwriter Trace string for Oracle databases





Friday, 12 October 2012

WebSphere Application Server Interview Questions Part-1


1.What is WebSphere?

   WebSphere refers to a brand for IBM software products. It is designed for setting up, operation and integration of electronic business applications. These applications could perform well on cross platform environment. These set of software are java based web technologies.

WebSphere is a set of Java-based tools from IBM that allows customers to create and manage sophisticated business Web sites.


2.What is master repository?

  Deployment manager contains the MASTER configuration and application files. All updates to the configuration files should go through the deployment manager.

3. WebSphere packages?

    Express, base, network deployment

4. Diff b/w 5.0 and 6.0?

   Web Sphere Studio 3.5, comes up with Visual Age for Java. WSAD 5.0 supports J2EE 1.3 java specifications. RAD 6.0 supports J2EE 1.4 and integrated with Eclipse 3.0, UML Visual Editor, Tomcat Jakarta, Ant scripting, EJB universal test client and SOA tools.

5. Diff b/w Weblogic and WebSphere?

  Both BEA Weblogic and IBM’s WebSphere provide J2EE based application servers which are competitors. WebSphere leverages more on connectivity issues with MQ and legacy systems with strong dominance in J2EE.

6. What are the different JMS providers available in different WAS versions? 
    
   WAS 6 
   WebSphere Embedded Messaging 
   WebSphere MQ 
   Generic 
               V5 Default Messaging 

                                           WAS 5 
                                           Generic JMS Provider 
                                           WebSphere JMS Provider 
                                           WebSphere MQ JMS Provider 
        

7. What is JavaBean?

  A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods.

8. What is the profile?

  Profiles are a set of files that represent a websphere application server configuration.

9. What is the application server?

  The application server provides a runtime environment in which to deploy, manage, and run j2ee applications.

10. Why use the boostrap port number?

  Client applications use the bootstrap port to access websphere’s built-in object request broker (orb) to use enterprise java beans in applications installed on the application server. The java naming and directory interface service provider url used by the client application needs to reference the bootstrap port to obtain an initial context for looking up ejb’s it wants to use. (For communicate two servers)







WebSphere Application Server Architecture

                                                                                                                            First we need to understand the architecture