This is a discussion on Java/J2EE interview Questions within the Interview Questions & Answers and Tips forums, part of the DiscussWeb IT Curriculum category; Can we explicitly destroy a servlet object? No we can not destroy a servlet explicitly its all done by the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#21
| |||
| |||
| Can we explicitly destroy a servlet object? No we can not destroy a servlet explicitly its all done by the container. Even if you trycalling the destroy method container does not respond to
__________________ Venkat knowledge is Power |
|
#22
| |||
| |||
| What are the limitations of using Local object? Local object only work if you are calling beans in the same process. Second they marshaldata by ref rather than by Val. This may speed up your performance but you need tochange semantics for the same. So finally it’s a design and the requirement decision. Ifyou are expecting to call beans remotely then using local object will not work.
__________________ Venkat knowledge is Power |
|
#23
| |||
| |||
| what is Passivation and Activation in EJB? When we are dealing with stateful session beans we need to store the client conversationof the bean so that it can be available in client’s next request. But when we talk aboutserver it has limited resources. If the conversation of the bean is large then the server canrun out of resource. So in order to preserve resources EJB server swaps this conversationaldata in memory to hard disk thus allowing memory to be reclaimed. This process ofsaving the memory data to hard disk is called as “Passivation”. Now when the clientcomes back the conversational data is again swapped from the hard disk to the bean. Thisprocess is called as “Activation”. The container informs the bean that its about to passivateor activate using the "ejbPassivate()" and "ejbActivate()" methods.
__________________ Venkat knowledge is Power |
|
#24
| |||
| |||
| Can beans who are involved in transaction have “Passivation”process? No.
__________________ Venkat knowledge is Power |
|
#25
| |||
| |||
| (A) In what format is the conversational data written to the disk? Bean conversational data is saved in the disk as serialized object. This is possible because“javax.ejb.EnterpriseBean” implements “java.io.Serializable” interface. So during passivation time it converts the bean conversational data to a bit-blob and during activation it just reverses the process.
__________________ Venkat knowledge is Power |
|
#26
| |||
| |||
| Define struts? Struts are an open source framework for developing JAVA web applications. It extendsJava Servlets API and helps developers to adopt MVC architecture. MVC pattern is goodbut developing the same can be real pain. Using struts it’s a breeze to implement MVC inprojects. Struts provide a standard way of implementing MVC.
__________________ Venkat knowledge is Power |
|
#27
| |||
| |||
| Can you explain the directory structure for a struts folder in brief? Below are the folders from point of view of root folder.META-INF: - This directory has the Meta information.WEB-INF/classes: - This location has the actual JAVA classes.WEB-INF/classes/ApplicationResources.properties:- Contains text which application canuse. For instance error messages.WEB-INF/lib/struts.jar:- Contains the Struts servlet, helper classes, taglib code etc.WEB-INF/*.tld:- The Struts tag libraries.WEB-INF/struts-config.xml:- A Struts configuration file.WEB-INF/web.xml:- Configuration file for the servlet containerIndex.jsp:- All JSP files come in the root directory as this one Index.jsp.
__________________ Venkat knowledge is Power |
|
#28
| |||
| |||
| What is serialization? Serialization is a process by which an object instance is converted in to stream of bytes.There are many useful stuff you can do when the object instance is converted in to stream of bytes for instance you can save the object in hard disk or send it across the network.
__________________ Venkat knowledge is Power |
|
#29
| |||
| |||
| What’s the use of Externalizable Interface? When performance becomes a important criteria, then you can serialize using thejava.io.Externalizable interface instead of the Serializable interface. Externalizable requiresthat you write the details of reading and writing the object's state to the byte stream. TheObjectOutputStream class no longer simplifies this process. You must use the methodsreadExternal and writeExternal method to write the object in to stream and read fromstream.
__________________ Venkat knowledge is Power |
|
#30
| |||
| |||
| what are JAVAdoc doclets? Doclets helps us to specify the content and format for Javadoc tool. By default Javadocuses the standard doclet provided by sun. But you can supply your own customized outputfor Javadoc.
__________________ Venkat knowledge is Power |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Greetings from Java J2EE web development team | tenax_technologies | Introductions | 1 | 07-04-2009 11:53 PM |
| Asp Interview Questions | sureshbb | ASP and ASP.NET Programming | 35 | 10-29-2008 07:58 PM |
| CSS Interview Questions And Answers | Sabari | Interview Questions & Answers and Tips | 137 | 11-25-2007 08:38 PM |
| HR Interview Questions with Answers | Sabari | Interview Questions & Answers and Tips | 63 | 11-23-2007 05:13 AM |
| Interview Questions | shiva | Interview Questions & Answers and Tips | 6 | 08-24-2007 01:28 AM |
Our Partners |