This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1)Can we pass colletions through callable statements? If yes how? 2)How do you store Pictures and text files in java? 3)After servlet generation of Jsp which life cycle methods will be generated? 4)Difference bet Resultset and Rowset? 5)Does Jsp supports caching? if yes how? 6)can we deploy an Enterprise application in Tomcat? If yes how? 7)Jsp is single threaded or multithreaded? 8)In base class if you are using one exception, is it possible to use super class of previous exception in child class? 9)BMP or CMP which is better?How? 10)Suppose you are performing operations with 2 databases and one database fials how will you rollback the transaction? 11)Where can i download Tomcat and java software? [ July 03, 2006: Message edited by: Bear Bibeault ]
1. Not sure if you can pass Collection to callable statement.
2. Not clear what you mean by "in Java". If you meant, how do you store picture and text files in the file system using java then; use java.io.FileOutputStream (or other streams) for pictures and java.io.FileWriter (or other writers) for text.
3. There are basically three lifecycle methods in Servlets. init(), service() and destroy().
5. Jsp as technology itself, does not support caching.
7. By default jsp is multi-threaded (meaning multiple threads would execute the jsp code simaltaneously). If you added directive <%@ page isThreadSafe="false" %>, then container ensures that only one thread execute a jsp's servlet object.
9. If bmp would always be better than cmp or otherway, then sun would not have created underperforming technology at all. Depending on the scenario, both has pros and cons.
10. Use xa drivers which supports transactions across the dbms systems.
I agree, these are strange questions to ask in an interview. Most of these can be answered easily within a few minutes given access to the API docs, the specifications and Google. The fact that an applicant remembers these is testimony of a level of basic experience, and of a memory for facts, but doesn't tell an interviewer much about his grasp of underlying concepts. The only one of these I might ask is #9, and pity the poor applicant whose answer favors one over the other instead of saying "it depends". [ July 04, 2006: Message edited by: Ulf Dittmer ]