Your Ad Here

Saturday, January 3, 2009

J2EE Interview questions & answers

Q : what is J2EE ?what is the features?
J2EE is java to enterprise edition. It is used to develop web applications

Q : Define Hash table?
Hash tables are good for doing a quick search on things.
For instance if we have an array full of data (say 100 items).If we known the position that a specific item is stored in an array, then we could quickly access it. For instance, we just happen to know that the item we want it is at position 3; I can apply:
myitem=myarray[3];
There are many different hash functions. Some hash functions will take an integer key and turn it into an index. A common one is used to the division method

Q : what is the difference between web server & application server ?
A : web server can have only the web container. But Application server can have web container as well as EJB container
Example of Application Server : JBOSS
Web Server : TOMCAT.

Q : What are the components of J2EE application?
A : A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components:
Application clients and applets are client components.
Java Servlet and JavaServer PagesTM (JSPTM) technology components are web components.
Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components.
Resource adapter components provided by EIS and tool vendors

Q : What is a J2EE component ?
A : A self-contained functional software unit supported by the container and configurable at deployment time. The J2EE specification defines the following J2EE components: Application clients and applets are components that run on the client. Java servlet and JavaServer Pages (JSP) technology components are Web components that run on the server. Enterprise JavaBeans (EJB) components (enterprise beans) are business components that run on the server. J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and "standard" Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with a J2EE specification, and deployed to production, where they are run and managed by the J2EE server or client container.

Q : What is "applet"?
A: A J2EE component that is a typically executes in a Web browser but can execute in a variety of other applications or devices that support the applet programming model.

Q : Difference between RMI and EJB?
A : EJB uses RMI technology.
We have to declare the middleware services needed by the EJB in a descriptor.
The Applet server will generate stubs for the same.

RMI : one has to write the middleware services. (txn mgmt, persitence.)

EJB cannot be invoked directly by the remote clients because there are not network enabled.
Location transparency.

Q : What is a web container?
A :Runtime environment for servlets and JSP
Manages lifecycle of instances
Supports HTTP

Q : What’s the difference between URL Connection instance and URL instance?

A : URL Connection instance represents a link for accessing or communicating with the resource at the location and a URL instance represents the location of a resource.

Q :What technologies are included in J2EE?

A :The primary technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data access API.

Q : What is XLink ?
A : The part of the XLL specification that is concerned with the specifying links between documents.

Q : What is XLL ?

A : The XML Link Language specification, consisting of XLink and XPointer.

Q : What is in-memory replication?
A : The process by which the contents in the memory of one physical m/c is replicated in all the m/c in the cluster is called in-memory replication.
Q : What is a JavaBeans component
A : A JavaBeans class that can be manipulated by tools and composed into the applications. A JavaBeans component must adhere to the certain property and event interface conventions.

Q : What is the J2EE module?
A : The J2EE module consists of one or more J2EE components.For the same container type and one component deployment descriptor of that type

Q : What is a Web resource ?
A static or dynamic object contained in a Web application that can be referenced by a Uniform Resource Locator URL.

Q : What is "application assembler"?
A : A person who combines J2EE components and modules into deployable application units.

Q : What are the four types of J2EE modules?
A : The four types of J2EE modules are
• Application client module
• Web module
• Enterprise JavaBeans module
• Resource adapter module

0 comments:

Your Ad Here