Showing posts with label Java Technology. Show all posts
Showing posts with label Java Technology. Show all posts

Friday, July 09, 2010

J2ee Interview Questions and Answers

1. What makes J2EE suitable for distributed multitiered Applications?
Ans : The J2EE platform uses a multitiered distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multitiered J2EE environment to which the application component belongs. The J2EE application parts are:

* Client-tier components run on the client machine.
* Web-tier components run on the J2EE server.
* Business-tier components run on the J2EE server.
* Enterprise information system (EIS)-tier software runs on the EIS server.

2. What is J2EE?
Ans : J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications.

3. What do Enterprise JavaBeans components contain?
Ans : Enterprise JavaBeans components contains Business code, which is logic
that solves or meets the needs of a particular business domain such as banking, retail, or finance, is handled by enterprise beans running in the business tier. All the business code is contained inside an Enterprise Bean which receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.

4. Is J2EE application only a web-based?
Ans : No, It depends on type of application that client wants. A J2EE application can be web-based or non-web-based. if an application client executes on the client machine, it is a non-web-based J2EE application. The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a servlet running in the web tier.

5. Are JavaBeans J2EE components?
Ans : No. JavaBeans components are not considered J2EE components by the J2EE specification. They are written to manage the data flow between an application client or applet and components running on the J2EE server or between server components and a database. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.

6. Is HTML page a web component?
Ans : No. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either.

7. What can be considered as a web component?
Ans : J2EE Web components can be either servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.

8. What is the container?
Ans : Containers are the interface between a component and the low-level platform specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.

9. What are container services?
Ans : A container is a runtime support of a system-level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading.

10. What are the components of J2EE application?
Ans: 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:

1. Application clients and applets are client components.
2. Java Servlet and JavaServer Pages technology components are web components.
3. Enterprise JavaBeans components (enterprise beans) are business components.
4. Resource adapter components provided by EIS and tool vendors.



Sunday, May 23, 2010

Java Fundamental-X

1. What is J2EE Connector?
The J2EE Connector API is used by J2EE tools vendors and system integrators to create resource adapters that support access to enterprise information systems that can be plugged into any J2EE product. Each type of database or EIS has a different resource adapter.

2. What is JAAP?
The Java Authentication and Authorization Service (JAAS) provide a way for a J2EE application to authenticate and authorize a specific user or group of users to run it. It is a standard Pluggable Authentication Module (PAM) framework that extends the Java 2 platform security architecture to support user-based authorization.

3. What is Model 1?
Using JSP technology alone to develop Web page. Such term is used in the earlier JSP specification. Model 1 architecture is suitable for applications that have very simple page flow, have little need for centralized security control or logging, and change little over time. Model 1 applications can often be refactored to Model 2 when application requirements change.

4. What is Model 2?
Using JSP and Servlet together to develop Web page. Model 2 applications are easier to maintain and extend, because views do not refer to each other directly.

5. What is Struts?
A Web page development framework. Struts combine Java Servlets, Java Server Pages, custom tags, and message resources into a unified framework. It is a cooperative, synergistic platform, suitable for development teams, independent developers, and everyone between.

6. How is the MVC design pattern used in Struts framework?
In the MVC design pattern, application flow is mediated by a central Controller. The Controller delegates requests to an appropriate handler. The handlers are tied to a Model, and each handler acts as an adapter between the request and the Model. The Model represents, or encapsulates, an application's business logic or state. Control is usually then forwarded back through the Controller to the appropriate View. The forwarding can be determined by consulting a set of mappings, usually loaded from a database or configuration file. This provides a loose coupling between the View and Model, which can make an application significantly easier to create and maintain.
Controller--Servlet controller which supplied by Struts itself; View --- what you can see on the screen, a JSP page and presentation components; Model --- System state and a business logic JavaBeans.

7. What does web module contain?
The web module contains:
o JSP files,
o class files for Servlets,
o GIF and HTML files, and
o A Web deployment descriptor.
Web modules are packaged as JAR files with a .war (Web Archive) extension.

8. What APIs are available for developing a J2EE application?
o Enterprise JavaBeans Technology(3 beans: Session Beans, Entity Beans and Message-Driven Beans)
o JDBC API(application level interface and service provider interface or driver)
o Java Servlets Technology(Servlet)
o Java ServerPage Technology(JSP)
o Java Message Service(JMS)
o Java Naming and Directory Interface(JNDI)
o Java Transaction API(JTA)
o JavaMail API
o JavaBeans Activation Framework(JAF used by JavaMail)
o Java API for XML Processing(JAXP,SAX, DOM, XSLT)
o Java API for XML Registries(JAXR)
o Java API for XML-Based RPC(JAX-RPC)-SOAP standard and HTTP
o SOAP with Attachments API for Java(SAAJ)-- low-level API upon which JAX-RPC depends
o J2EE Connector Architecture
o Java Authentication and Authorization Service(JAAS)

Saturday, May 08, 2010

Java Fundamental-IX

1. Are JavaBeans J2EE components?
NO. JavaBeans components are not considered J2EE components by the J2EE specification. JavaBeans components written for the J2EE platform have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.

2. Is HTML page a web component?
NO. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the server-side utility classes are not considered web components, either.

3. What is the container?
A container is a runtime support of a system-level entity. Containers provide components with services such as lifecycle management, security, deployment, and threading.

4. What is the web container?
Servlet and JSP containers are collectively referred to as Web containers.

5. What is the thin client?
A thin client is a lightweight interface to the application that does not have such operations like query databases, execute complex business rules, or connect to legacy applications.

6. What are types of J2EE clients?
o Applets
o Application clients
o Java Web Start-enabled rich clients, powered by Java Web Start technology.
o Wireless clients, based on Mobile Information Device Profile (MIDP) technology.

7. What is deployment descriptor?
A deployment descriptor is an Extensible Markup Language (XML) text-based file with an .xml extension that describes a component's deployment settings. A J2EE application and each of its modules has its own deployment descriptor.

8. What is the EAR file?
An EAR file is a standard JAR file with an .ear extension, named from Enterprise Archive file. A J2EE application with all of its modules is delivered in EAR file.

9. What are JTA and JTS?
JTA is the abbreviation for the Java Transaction API. JTS is the abbreviation for the Java Transaction Service. JTA provides a standard interface and allows you to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK implements the transaction manager with JTS. But your code doesn't call the JTS methods directly. Instead, it invokes the JTA methods, which then call the lower-level JTS routines.
Therefore, JTA is a high level transaction interface that your application uses to control transaction. And JTS is a low level transaction interface and EJBs uses behind the scenes (client code doesn't directly interact with JTS. It is based on object transaction service (OTS) which is part of CORBA.

10. What is JAXP?
JAXP stands for Java API for XML. XML is a language for representing and describing text-based data which can be read and handled by any program or tool that uses XML APIs.

Sunday, May 02, 2010

Java Fundamental-VIII

1. What is J2EE?
J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multi tiered, and web-based applications.

2. What is the J2EE module?
A J2EE module consists of one or more J2EE components for the same container type and one component deployment descriptor of that type.

3. What are the components of J2EE application?
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:
o Application clients and applets are client components.
o Java Servlets and Java Server Pages TM (JSPTM) technology components are web components.
o Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components.
o Resource adapter components provided by EIS and tool vendors.

4. What are the four types of J2EE modules?
1. Application client module
2. Web module
3. Enterprise JavaBeans module
4. Resource adapter module

5. What does application client module contain?
The application client module contains:
o class files,
o an application client deployment descriptor.
Application client modules are packaged as JAR files with a .jar extension.

6. What does Enterprise JavaBeans module contain?
The Enterprise JavaBeans module contains:
o class files for enterprise beans
o An EJB deployment descriptor.
EJB modules are packaged as JAR files with a .jar extension.

7. What does resource adapt module contain?
The resource adapt module contains:
o all Java interfaces,
o classes,
o native libraries,
o other documentation,
o A resource adapter deployment descriptor.
Resource adapter modules are packages as JAR files with a .rar (Resource adapter Archive) extension.

8. Is J2EE application only a web-based?
NO. A J2EE application can be web-based or non-web-based. If an application client executes on the client machine, it is a non-web-based J2EE application. The J2EE application can provide a way for users to handle tasks such as J2EE system or application administration. It typically has a graphical user interface created from Swing or AWT APIs, or a command-line interface. When user request, it can open an HTTP connection to establish communication with a Servlet running in the web tier.

Tuesday, January 12, 2010

Java Fundmental-VII

1. Do I need to use synchronized on setValue(int)?
Ans : It depends whether the method affects method local variables, class static or instance variables. If only method local variables are changed, the value is said to be confined by the method and is not prone to threading issues.
2. Do I need to use synchronized on setValue(int)?
Ans : It depends whether the method affects method local variables, class static or instance variables. If only method local variables are changed, the value is said to be confined by the method and is not prone to threading issues.
3. What is the SwingUtilities.invokeLater(Runnable) method for?
Ans : The static utility method invokeLater(Runnable) is intended to execute a new runnable thread from a Swing application without disturbing the normal sequence of event dispatching from the Graphical User Interface (GUI). The method places the runnable object in the queue of Abstract Windowing Toolkit (AWT) events that are due to be processed and returns immediately. The runnable objectâۉ„¢s run() method is only called when it reaches the front of the queue. The deferred effect of the invokeLater(Runnable) method ensures that any necessary updates to the user interface can occur immediately, and the runnable work will begin as soon as those high priority events are dealt with. The invoke later method might be used to start work in response to a button click that also requires a significant change to the user interface, perhaps to restrict other activities, while the runnable thread executes.
4. What is the volatile modifier for?
Ans : The volatile modifier is used to identify variables whose values should not be optimized by the Java Virtual Machine, by caching the value for example. The volatile modifier is typically used for variables that may be accessed or modified by numerous independent threads and signifies that the value may change without synchronization.
5. Which class is the wait() method defined in?
Ans : The wait() method is defined in the Object class, which is the ultimate superclass of all others. So the Thread class and any Runnable implementation inherit this method from Object. The wait() method is normally called on an object in a multi-threaded program to allow other threads to run. The method should should only be called by a thread that has ownership of the objectâۉ„¢s monitor, which usually means it is in a synchronized method or statement block.
6. Which class is the wait() method defined in?
Ans : I get incompatible return type for my threadâۉ„¢s getState( ) method! - It sounds like your application was built for a Java software development kit before Java 1.5. The Java API Thread class method getState() was introduced in version 1.5. Your thread method has the same name but different return type. The compiler assumes your application code is attempting to override the API method with a different return type, which is not allowed, hence the compilation error.
7. What is a working thread?
Ans : A working thread, more commonly known as a worker thread is the key part of a design pattern that allocates one thread to execute one task. When the task is complete, the thread may return to a thread pool for later use. In this scheme a thread may execute arbitrary tasks, which are passed in the form of a Runnable method argument, typically execute(Runnable). The runnable tasks are usually stored in a queue until a thread host is available to run them. The worker thread design pattern is usually used to handle many concurrent tasks where it is not important which finishes first and no single task needs to be coordinated with another. The task queue controls how many threads run concurrently to improve the overall performance of the system. However, a worker thread framework requires relatively complex programming to set up, so should not be used where simpler threading techniques can achieve similar results.
8. What is a green thread?
Ans : A green thread refers to a mode of operation for the Java Virtual Machine (JVM) in which all code is executed in a single operating system thread. If the Java program has any concurrent threads, the JVM manages multi-threading internally rather than using other operating system threads. There is a significant processing overhead for the JVM to keep track of thread states and swap between them, so green thread mode has been deprecated and removed from more recent Java implementations. Current JVM implementations make more efficient use of native operating system threads.
9. What are native operating system threads?
Ans : Native operating system threads are those provided by the computer operating system that plays host to a Java application, be it Windows, Mac or GNU/Linux. Operating system threads enable computers to run many programs simultaneously on the same central processing unit (CPU) without clashing over the use of system resources or spending lots of time running one program at the expense of another. Operating system thread management is usually optimised to specific microprocessor architecture and features so that it operates much faster than Java green thread processing.

Monday, January 11, 2010

Java Fundmental-II

1. The Java language is:
a. Interpreted at run time.
b. Compiled to obtain executable target files.
c. Designed for recursive string processing.
d. Designed for matrix algorithm processing.

2. The Java language is designed to:
a. Run on a simulated Java machine.
b. Run directly on Intel microprocessors.
c. Designed for RISC computing architectures.
d. Designed for CISC computing architectures.

3. The Java language will run:
a. On any computer where the Java simulated machine is installed.
b. On any computer attached to the Internet.
c. On any computer with a Web browser installed.
d. On any computer which will also run C++.

4. The Java language provides the programmer with:
a. No ability to access or manipulate memory.
b. Protected access to machine memory.
c. Dynamically created data structures linked with pointers.
d. Access to the memory of a local machine through a network.

5. The Java language is:
a. An object oriented programming language.
b. A structured programming language.
c. A procedural programming language.
d. A stack oriented programming language.

6. The Java language was designed:
a. To create event driven programs with graphical interfaces.
b. To unify all different approaches to object orientation.
c. To provide a learning tool for beginning programmers.
d. To force programmers to implement all needed program elements themselves.

7. The Java language has most in common with the following language:
a. C#.                      b. C.                  c. C++.                 d. Basic.
8. The basis for object oriented programming can be found in which of the following?
a. All of the items listed.
b. It is an outgrowth of the availability of powerful hardware.
c. It is useful in the development of graphical user interfaces.
d. It solved some of the problems associated with structured programming.

9. That unit of code in Java that contains the specifications for objects is:
a. A class.          b. A method.         c. An instance variable.      d. A constructor.

10. Which of the following is true?
a. An object receives copies of all instance variables, but shares method code.
b. An object receives copies of all instance variables and all methods.
c. An object receives copies of all methods, but shares instance variables.
d. An object shares both instance variables and methods with other objects.

11. Encapsulation refers to the idea that:
a. Instance variables can only be accessed by means of methods.
b. Methods can only be accessed by means of instance variables.
c. All other methods must be defined within the main() method.
d. Instance variables can only be declared within methods.

12. In order to use objects of a given class the programmer needs to:
a. Know what the methods do, but not how they do it.
b. Know all of the instance variables of the class.
c. Know how the method algorithms were implemented.
d. Know the types of all of the instance variables of the class.

13. Java programs have to be saved with the following extension:
a. .java               b. .txt           c. .doc             d. .xls

14. In Java programs, the name of the class has to:
a. Be the same as the name of the file it is saved in.
b. Be different from the name of the file it is saved in.
c. Be all capital letters.
d. Be all small letters.

Friday, January 01, 2010

Java Fundamental-VI

1. What is the purpose of finalization?
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.


2. What is the difference between the Boolean & operator and the && operator?
- If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.


3. How many times may an object's finalize() method be invoked by the garbage collector?
An object's finalize() method may only be invoked once by the garbage collector.


4. What is the purpose of the finally clause of a try-catch-finally statement?
The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.


5. What is the argument type of a program s main() method?
A program's main() method takes an argument of the String[] type.


6. Which Java operator is right associative?
The = operator is right associative.


7. Can a double value be cast to a byte?
Yes, a double value can be cast to a byte.


8. What is the difference between a break statement and a continue statement?
A break statement results in the termination of the statement to which it applies (switch, for, do, or while). A continue statement is used to end the current loop iteration and return control to the loop statement.


9. What must a class do to implement an interface?
It must provide all of the methods in the interface and identify the interface in its implements clause.


10. What is the advantage of the event-delegation model over the earlier event-inheritance model?
The event-delegation model has two advantages over the event-inheritance model. First, it enables event handling to be handled by objects other than the ones that generate the events (or their containers). This allows a clean separation between a component s design and its use. The other advantage of the event-delegation model is that it performs much better in applications where many events are generated. This performance improvement is due to the fact that the event-delegation model does not have to repeatedly process unhandled events, as is the case of the event-inheritance model.

Monday, December 21, 2009

JAVA Vs. DOTNET

# JAVA


  • Java is developed by Sun Microsystems
  • Java is a light weight language and can be run on almost all the OS(it require less hardware)
  • Java you need to confirm it that all the objects are destroyed before application quits.
  • Java has no standard tool is available. Although, many third party IDEs are available
  • Java is a programming language designed to be run on many different platforms, and so uses a common language which has to be compiled and run on different platforms (eg. windows, mac and linux).Any OS which is able to install JVMJava can be used to write programs for many different operating systems
  • Java interface, a null object reference maps to the VT_NULL VARIANT value
  • Java interface, all failure HRESULTs from the underlying COM interface are reported by throwing a com.ca.openroad.COMException containing that HRESULT value




# .NET


  • .Net is developed by Microsoft Corporation
  • .Net needs a very heavy framework to be installed which have higher Hardware requirements too compared to Java
  • .Net garbage collector runs at a certain interval and see is there is any memory occupied by anyobject whose parent is now finished processing (for eg. you closed an application), in this casethe garbage collector automatically removes the reference of that object and free up the memory
  • .Net a standard development IDE is available that is Microsoft Visual Studio
  • .NET, takes on a different approach, by allowing you to program in any language you choose,but has compilers for many different languages that generates a platform specific code (i.e.Microsoft or Windows).
  • .NET can be used to make any programming language into a Windows program.NET COM interoperability layer maps null .NET object references to VT_EMPTY. VT_NULLis mapped to a special object type of class “System.DBNull”.
  • .NET COM interoperability layer does something similar, using theInteropServices.COMException class. However, it uses that exception class only as a lastresort. If there is already a .NET exception class that reasonably represents the meaning of aparticular HRESULT, the interoperability layer throws that .NET exception instead of a COMException.

Saturday, December 12, 2009

Java Fundamental-V

>
1. What is the use of preparedstatement?
Preparedstatements are precompiled statements. It is mainly used to speed up the process of inserting/updating/deleting especially when there is a bulk processing.


2. What is callable statement? Tell me the way to get the callable statement?
Callablestatements are used to invoke the stored procedures. You can obtain the callablestatement from Connection using the following methods prepareCall(String sql) prepareCall(String sql, int resultSetType, int resultSetConcurrency)


3. In a statement, I am executing a batch. What is the result of the execution?
It returns the int array. The array contains the affected row count in the corresponding index of the SQL.


4. Can a abstract method have the static qualifier?
No


5.. What are the different types of qualifier and what is the default qualifier?
public, protected, private, package (default)


6. What is the super class of Hashtable?
Dictionary

Java Fundamental-IV



1. What are types of J2EE clients?
Answer: J2EE clients are the software that access the services components installed on the J2EE container. Following are the J2EE clients:
a) Applets
b) Java-Web Start clients
c) Wireless clients
d) Web applications


2. What do you understand by JTA and JTS?
Answer: JTA stands for Java Transaction API and JTS stands for Java Transaction Service. JTA provides a standard interface which allows the developers to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK uses the JTA transaction manager to implement the transaction. The code developed by developers does not calls the JTS methods directly, but only invokes the JTA methods. Then JTA internally invokes the JTS routines. JTA is a high level transaction interface used by the application code to control the transaction.


Java Fundamental-III


1. When should the method invokeLater()be used?
This method is used to ensure that Swing components are updated through the event-dispatching thread.


2. How can a subclass call a method or a constructor defined in a superclass?
Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass’s constructor.


3. What’s the difference between a queue and a stack?
Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule.


4. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?
Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.


5. What comes to mind when you hear about a young generation in Java?
Garbage collection.


6. What comes to mind when someone mentions a shallow copy in Java?
Object cloning.


7. If you’re overriding the method equals() of an object, which other method you might also consider?
hashCode()


8. You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList?
ArrayList


9. How would you make a copy of an entire Java object with its state?
Have this class implement Cloneable interface and call its method clone().




10. How can you minimize the need of garbage collection and make the memory use more effective?
Use object pooling and weak object references.


11. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?
If these classes are threads I’d consider notify() or notifyAll(). For regular classes you can use the Observer interface.


12. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?
You do not need to specify any access level, and Java will use a default package access level


13. What are the contents of web module?
Answer: A web module may contain:
a) JSP files
b) Java classes
c) gif and html files and
d) web component deployment descriptor


14. Differentiate between .ear, .jar and .war files.
Answer: These files are simply zipped file using java jar tool. These files are created for different purposes. Here is the description of these files:
.jar files: These files are with the .jar extenstion. The .jar files contains the libraries, resources and accessories files like property files.
.war files: These files are with the .war extension. The war file contains the web application that can be deployed on the any servlet/jsp container. The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.
.ear files: The .ear file contains the EJB modules of the application.


15. What is the difference between Session Bean and Entity Bean?
Answer:
Session Bean: Session is one of the EJBs and it represents a single client inside the Application Server. Stateless session is easy to develop and its efficient. As compare to entity beans session beans require few server resources.


A session bean is similar to an interactive session and is not shared; it can have only one client, in the same way that an interactive session can have only one user. A session bean is not persistent and it is destroyed once the session terminates.


Entity Bean: An entity bean represents persistent global data from the database. Entity beans data are stored into database.


16. Why J2EE is suitable for the development distributed multi-tiered enterprise applications?
Answer: The J2EE platform consists of multi-tiered distributed application model. J2EE applications allows the developers to design and implement the business logic into components according to business requirement. J2EE architecture allows the development of multi-tired applications and the developed applications can be installed on different machines depending on the tier in the multi-tiered J2EE environment . The J2EE application parts are:


a) Client-tier components run on the client machine.
b) Web-tier components run on the J2EE server.
c) Business-tier components run on the J2EE server and the
d) Enterprise information system (EIS)-tier software runs on the EIS servers


17. Why do understand by a container?
Answer: Normally, thin-client multi-tiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components. In addition, the J2EE server provides underlying services in the form of a container for every component type. Because you do not have to develop these services yourself, you are free to concentrate on solving the business problem at hand (Source: http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Overview4.html ).


In short containers are the interface between a component and the low-level platform specific functionality that supports the component. The application like Web, enterprise bean, or application client component must be assembled and deployed on the J2EE container before executing.


18. What are the services provided by a container?
Answer: The services provided by container are as follows:
a) Transaction management for the bean
b) Security for the bean
c) Persistence of the bean
d) Remote access to the bean
e) Lifecycle management of the bean
f) Database-connection pooling
g) Instance pooling for the bean

Search Aptipedia