Skip to main content

Privado.com - A Private Search Engine

https://www.privado.com/ Your searches should be private. We make sure they really are.  Private Search in Action  We don’t track you  We don’t store your searches in any identifiable way  We don’t store your IP address in our services Your privacy is important.  There are no traces of your activities and personal identity in our servers.  You can learn more about privacy in our blog  We don't like cookies!   https://www.privado.com/

Java J2EE Interview Questions and Answers - Part 7

  1. What is connection pooling?- With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more. Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the resources we need to duplicate rather than the entire servlet. A connection pool can also intelligently manage the size of the pool and make sure each connection remains valid. A number of connection pool packages are currently available. Some like DbConnectionBroker are freely available from Java Exchange Works by creating an object that dispenses connections and connection Ids on request. The ConnectionPool class maintains a Hastable, using Connection objects as keys and Boolean values as stored values. The Boolean value indicates whether a connection is in use or not. A program calls getConnection() method of the ConnectionPool for getting Connection object it can use; it calls returnConnection() to give the connection back to the pool.
  2. Why should we go for interservlet communication?- Servlets running together in the same server communicate with each other in several ways. The three major reasons to use interservlet communication are: a) Direct servlet manipulation - allows to gain access to the other currently loaded servlets and perform certain tasks (through the ServletContext object) b) Servlet reuse - allows the servlet to reuse the public methods of another servlet. c) Servlet collaboration - requires to communicate with each other by sharing specific information (through method invocation)
  3. Is it possible to call servlet with parameters in the URL?- Yes. You can call a servlet with parameters in the syntax as (?Param1 = xxx || m2 = yyy).

 

  1. What is Servlet chaining?- Servlet chaining is a technique in which two or more servlets can cooperate in servicing a single request. In servlet chaining, one servlet’s output is piped to the next servlet’s input. This process continues until the last servlet is reached. Its output is then sent back to the client.
  2. How do servlets handle multiple simultaneous requests?- The server has multiple threads that are available to handle requests. When a request comes in, it is assigned to a thread, which calls a service method (for example: doGet(), doPost() and service()) of the servlet. For this reason, a single servlet object can have its service methods called by many threads at once.
  3. What is the difference between TCP/IP and UDP?- TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. It is like a phone call. UDP is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail.
  1. What is Inet address?- Every computer connected to a network has an IP address. An IP address is a number that uniquely identifies each computer on the Net. An IP address is a 32-bit number.
  2. What is Domain Naming Service(DNS)?- It is very difficult to remember a set of numbers(IP address) to connect to the Internet. The Domain Naming Service(DNS) is used to overcome this problem. It maps one particular IP address to a string of characters. For example, www. mascom. com implies com is the domain name reserved for US commercial sites, moscom is the name of the company and www is the name of the specific computer, which is mascom’s server.
  3. What is URL?- URL stands for Uniform Resource Locator and it points to resource files on the Internet. URL has four components: http://www. address. com:80/index.html, where http - protocol name, address - IP address or host name, 80 - port number and index.html - file path.
  1. What is RMI and steps involved in developing an RMI object?- Remote Method Invocation (RMI) allows java object that executes on one machine and to invoke the method of a Java object to execute on another machine. The steps involved in developing an RMI object are: a) Define the interfaces b) Implementing these interfaces c) Compile the interfaces and their implementations with the java compiler d) Compile the server implementation with RMI compiler e) Run the RMI registry f) Run the application
  2. What is RMI architecture?- RMI architecture consists of four layers and each layer performs specific functions: a) Application layer - contains the actual object definition. b) Proxy layer - consists of stub and skeleton. c) Remote Reference layer - gets the stream of bytes from the transport layer and sends it to the proxy layer. d) Transportation layer - responsible for handling the actual machine-to-machine communication.
  3. what is UnicastRemoteObject?- All remote objects must extend UnicastRemoteObject, which provides functionality that is needed to make objects available from remote machines.
  1. Explain the methods, rebind() and lookup() in Naming class?- rebind() of the Naming class(found in java. rmi) is used to update the RMI registry on the server machine. Naming. rebind(”AddSever”, AddServerImpl); lookup() of the Naming class accepts one argument, the rmi URL and returns a reference to an object of type AddServerImpl.
  2. What is a Java Bean?- A Java Bean is a software component that has been designed to be reusable in a variety of different environments.
  3. What is a Jar file?- Jar file allows to efficiently deploying a set of classes and their associated resources. The elements in a jar file are compressed, which makes downloading a Jar file much faster than separately downloading several uncompressed files. The package java. util. zip contains classes that read and write jar files.

Comments

Post a Comment

Popular Posts

DOT NET Interview Questions with Answers

When not to use Design Patterns? Do not use design patterns in any of the following situations. • When the software being designed would not change with time. • When the requirements of the source code of the application are unique. If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design. When to use Design Patterns? Design Patterns are particularly useful in one of the following scenarios. • When the software application would change in due course of time. • When the application contains source code that involves object creation and event notification. Benefits of Design Patterns: The following are some of the major advantages of using Design Patterns in software development. • Flexibility • Adaptability to change • Reusability What are Design Patterns? A Design Pattern essentially consists of a problem in a software design and a solutio

Probationary/ Specialist Officers in Indian Bank

Probationary/ Specialist Officers Location :  Across India Eligibility: BE/ B.Tech (Che/ Electrical/ Mech/ Prdn/ Textile/ ETE/ ECE/ CS/ IT)/ MCA/ MBA www.freshersworld.com Details:     Indian Bank (A Govt of India Undertaking) Recruitment of Probationary Officers/ Specialist Officers (Industrial Development Officers/ Computer Officers) Indian Bank, a leading Public Sector Bank, with headquarters in Chennai having geographical presence all over India and abroad invites online applications from Indian Citizens for the following posts. Post Code Post Scale Total Vacancy Age as on 01.07.09 Min Max 1 Probationary Officers I 118 21 30 Specialist Officers         Industrial Development Officers in the following Engineering disciplines         2 Chemical I 02 21 30 3 Electrical I 02 21 30 4 Electronics I 02 21 30 5 Leather Technology I 02 21 30 6 Mechanical I 02 21 30 7 Production/ Metallurgy I 02

DesignEvo - A free and easy online logo designer

DesignEvo is  easy-to-use online logo design tool with millions of icons, 100+ stylish  fonts, 3,000+ practical logo templates and handy editing tools. It can help  people easily create appealing and effective logos for their brands,  websites, blogs, social media channels, etc.  It is really awesome and intuitive interface. Easy to design and customize. A person can easily design by selecting a pre-defined logo design and modify it on the fly. Hardly you need 1 minute to design your new logo with minor modifications. Its really awesome site. I suggest you to try it out.   You can discover more about DesignEvo here: https://www.designevo.com Learn more about Designevo  @ YouTube designevo, free logo design, logo maker, create a logo, easy logo maker, design logo free, free logo, logo designs, logo images

Free Softwares 09 July 09

JDownloader JDownloader, open source and platform independent, can help download files from file hosters like Rapidshare.com, Megaupload.com and others. JDownloader can be used by both kinds of users - those who have a premium account and those who don't pay. Features: Support for many file hosting sites, decrypt plug-ins for many services. e.g. sj.org, UCMS, WordPress, skips the limits of Filehosting websites, downloads in multiple paralell streams, download with multiple connections, captcha recognition, automatical file extraction, Can download Youtube, Vimeo, clipfish video, and Mp3 files; 24-hour support, integrates with Firefox, no installation needed, and more. The 15.6 MB JDownloader, v.0.6.193, cross-platform - works on Windows, Linux and Mac OS X, can be downloaded at http://jdownloader.en.softonic.com/download Runs on Java 1.5 or higher. jGnash jGnash is a free personal finance manager with many features available in commercial versions. Main Features

Mobile Number Portability in India by Sept 20

Department of Telecom has issued ( .pdf ) a notification stating that long awaited number portability will finally be available by September 20. The main object of number portability is to be able to retain the same number even after switching between different mobile service providers.   Mobile Number Portability gives a mobile subscriber the leverage of retaining his/her mobile phone number even after switching between networks. As per Department of Telecom - Mobile Number Portability is to be implemented in Delhi, Mumbai, Maharashtra and Gujarat Service areas of Zone I and Zone 2 includes Kolkata, Tamil Nadu, Chennai, Andhra and Karnataka of within six months of award of license by September 20, 2009, and in the rest of the country by March 20, 2010. Syniverse Technologies have been licensed for MNP operations in Zone I while MNP Interconnection got licensed for MNP operations in Zone 2.   TRAI will decide all kinds of mobile number portability tariffs like the transaction

Contact Form

Name

Email *

Message *