IT Community - Software Programming, Web Development and Technical Support

Java/J2EE interview Questions

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 ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > DiscussWeb IT Curriculum > Interview Questions & Answers and Tips

Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools Display Modes
  #21  
Old 09-13-2007, 12:49 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #22  
Old 09-13-2007, 12:50 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23  
Old 09-13-2007, 12:51 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24  
Old 09-13-2007, 12:51 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

Can beans who are involved in transaction have “Passivation”process?

No.
__________________
Venkat
knowledge is Power
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #25  
Old 09-13-2007, 12:52 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

(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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #26  
Old 09-13-2007, 12:53 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #27  
Old 09-13-2007, 12:53 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #28  
Old 09-13-2007, 12:55 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #29  
Old 09-13-2007, 12:56 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #30  
Old 09-13-2007, 12:56 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 347
Venkat is on a distinguished road
Thumbs up Re: Java/J2EE interview Questions

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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


All times are GMT -7. The time now is 12:03 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0