|
| |
| |
| |
|
Statistics |
| Unique Visitors: 491 |
| Total Unique Visitors: 729464 |
| Visitors Out: 942 |
| Total Visitors Out: 942 |
|
|
|
| |
|
|
| |
|
| 42 Important EJB Interview Question |
| 2007-11-26 00:38:04 |
1. What is EJB
EJB stands for Enterprise JavaBean and is a widely-adopted server side component architecture for J2EE. It enables rapid development of mission-critical application that are versatile, reusable and portable across middleware while protecting IT investment and preventing vendor lock-in.
2. What is session Facade?
Session Facade is a design pattern to access the Entity bean [...]...
|
| |
|
| Java System Design & Analysis Patterns Interview Questions |
| 2007-11-04 12:59:49 |
1. What is an analysis pattern?
2. What are the differences between analysis patterns and design patterns?
3. How does “Extreme Programming” (XP) fit with patterns?
4. What is the disadvantage of using the Singleton pattern? It is enticing to use this pattern for all the classes as it makes it easy to get the reference of the [...]...
|
| |
|
| Struts Interview questions |
| 2007-10-02 11:33:14 |
Is Struts threadsafe?
Yes
1. Response is handled by light-weight Action object; rather than individual servlet.
2. Servlet instantiates Action class once and allows other requests to be threaded through the original object.
3. This conserves resources and provides best throughput.
What are the various Struts Tag libraries?
Struts provide many tag [...]...
|
| |
|
| Websphere Interview Questions |
| 2007-10-02 11:28:09 |
How to choose websphere over other application servers?
Selecting application server is part of architechtural process when infrastructure is defined. It depends on several facots:
1. External systems your application will be interacting
2. Type of application you have
3. Target availability of system.
4. Corporate standards
[...]...
|
| |
|
| JSP Interview Questions |
| 2007-10-02 11:27:05 |
JSP Action:
* JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine.
* Consist of typical (XML-base) prefix of ‘jsp’ followed by a colon, followed by the action name followed by one or more attribute parameters. [...]...
|
| |
|
| UML interview questions |
| 2007-10-02 11:24:23 |
What is UML?
Graphical language for visualizing, specifying, constructing and documenting the artifacts of the system. allows to create blueprints of all the aspects of the system, before physically implementing the system.
What is modeling? What are the advantages of creating a model?
Well-accepted engineering technique which helps build a model. Model is the simplification of [...]...
|
| |
|
| Servlet Interview Questions |
| 2007-10-02 11:21:58 |
The java.servlet.Servlet interface defines 3 methos known as life-cycle method.
1. public void init(ServletConfig config) throws ServletException: servlet is constructe, then initialized with the init() method.
2. public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException: any request from client are handled initially by the service() method before delegating to the [...]...
|
| |
|
| Sample Java Interview Questions |
| 2007-10-02 11:18:56 |
Inheritance:
Process by which one object acquires the properties of another object. Inheritance allows well-tested procedures to be reused and enables changes to make once and have effect in all relevant places.
Implicit Casting:
Process of simply assigning one entity to another without any transformation guidance to the compiler.
Native method: method that is not implemented in [...]...
|
| |
|
| EJB Interview Questions |
| 2007-10-01 20:35:09 |
2. What is session Facade?
Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. It increases the performance over the network. In this case we call session bean which on turn call entity bean.
3. What is EJB role in J2EE?
EJB technology is the core of [...]...
|
| |
|
| Jakarta struts interview questions |
| 2007-10-01 14:28:41 |
1. What is Jakarta Struts Framework?
Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications. Jakarta Struts is robust architecture and can be used for the development of application of any size. Struts framework makes it much easier to design scalable, reliable Web applications with Java.
2. What is [...]...
|
| |
|
| Java Interview Questions Part 1 |
| 2007-10-01 14:14:25 |
1. Can there be an abstract class with no abstract methods in it?
Yes
2. Can an Interface be final?
No
3. Can an Interface have an inner class?
Yes.
public interface abc
{
static int i=0; void dd();
class a1
{
a1()
{
int j;
System.out.println(”inside”);
};
public static void main(String a1[])
{
System.out.println(”in interfia”);
}
}
}
4. Can we define private and protected modifiers for variables in interfaces?
No
5. What is Externalizable?
Externalizable [...]...
|
| |
|
| Line tools NetBeans plugin |
| 2007-09-19 22:22:00 |
I don’t like overloading my IDE with a bunch of plugins, but this is a must-have for my NetBeans. I use it everyday to copy and paste lines of text without using CTRL-C CTRL-V. This is its official description:
Line Tools Support following operations in text editors: 1. Move Line (or lines spanned by [...]...
|
| |
|
| Latest Java interview questions |
| 2007-09-17 22:00:34 |
1. When we declare a Private Constructor?
Ans. If we dont want the constructor to be visible to the extend classes then we can declare a constructor to be private and also if we want a class to made as a singleton class then we have to declare it has private
2. What is the difference between [...]...
|
| |
|
| JAVA overloaded |
| 2007-09-15 20:22:00 |
JAVA is now the stock symbol for Sun, replacing SUNW. This word JAVA has become more overloaded, and can mean at least 3 things: (1) the Java programming language; (2) the Java Island in Indonesia; and (3) the stock symbol for Sun Microsystems.
So every time you google “java”, you will have more mixed results [...]...
|
| |
|
| Frequently Asked Questions on Servlets Concepts |
| 2007-08-16 19:39:02 |
1. How do u deal property files in servlet?
2. What methods do u use in Servlet - Applet communication ?
3. What are the types of Servlet ?
4. Difference between HttpServlet and Generic Servlets ?
5. Difference between doGet and doPost ?
6. What are the methods in HttpServlet?
7. What are the types of SessionTracking?
8. What is Cookie ? Why is Cookie used ?
9. If my browser [...]...
|
| |
|
| Frequently Asked Questions on Servlets Concepts |
| 2007-08-16 19:39:02 |
1. How do u deal property files in servlet?
2. What methods do u use in Servlet - Applet communication ?
3. What are the types of Servlet ?
4. Difference between HttpServlet and Generic Servlets ?
5. Difference between doGet and doPost ?
6. What are the methods in HttpServlet?
7. What are the types of SessionTracking?
8. What is Cookie ? Why is Cookie used ?
9. If my browser [...]...
|
| |
|
| Java class extends clause comes before implements clause |
| 2007-08-11 10:26:00 |
The following class failed to compile with either JDK 5 or 6:import java.io.Serializable;
public class ImplementsExtendsOrder implements Serializable extends Object {
}
—————
jdk6injavac ImplementsExtendsOrder.java
ImplementsExtendsOrder.java:7: ‘{’ expected
public class ImplementsExtendsOrder implements Serializable extends Object {...
|
| |
|
| Java class extends clause comes before implements clause |
| 2007-08-11 10:26:00 |
The following class failed to compile with either JDK 5 or 6:import java.io.Serializable;
public class ImplementsExtendsOrder implements Serializable extends Object {
}
—————
jdk6binjavac ImplementsExtendsOrder.java
ImplementsExtendsOrder.java:7: ‘{’ expected
public class ImplementsExtendsOrder implements Serializable extends Object {...
|
| |
|
| 260 Frequently Asked Questions in java |
| 2007-08-10 17:10:30 |
Can a main() method of class be invoked in another class?
What is the difference between java command line arguments and C command line arguments?
What is the difference between == & .equals
What is the difference between abstract class & Interface.
What is singleton class & it’s implementation.
Use of static,final variable
Examples of final class
Difference between Event propagation [...]...
|
| |
|
| 260 Frequently Asked Questions in java |
| 2007-08-10 17:10:30 |
Can a main() method of class be invoked in another class?
What is the difference between java command line arguments and C command line arguments?
What is the difference between == & .equals
What is the difference between abstract class & Interface.
What is singleton class & it’s implementation.
Use of static,final variable
Examples of final class
Difference between Event propagation [...]...
|
| |
|
| A simple EJB 3 + Servlet application |
| 2007-07-09 20:38:00 |
In previous post, I wrote a simple EJB3 bean invoked from a standalone java client. Standalone java client is convenient for prototyping and testing purpose. The most common way to invoke EJB is from a web app. Here I will add such a simple web app to invoke the foo-ejb module written [...]...
|
| |
|
| A simple EJB 3 + Servlet application |
| 2007-07-09 20:38:00 |
In previous post, I wrote a simple EJB3 bean invoked from a standalone java client. Standalone java client is convenient for prototyping and testing purpose. The most common way to invoke EJB is from a web app. Here I will add such a simple web app to invoke the foo-ejb module written [...]...
|
| |
|
| A simple EJB 3 application, hand-made |
| 2007-06-26 21:00:00 |
This is a simple EJB 3 app that is written, deployed and run from command line and vim, with no IDE, no ant, no maven, no admin console. The target appserver is glassfish.
1. project directory structure:
C:simple-ejb3> tree /A /F
+—classes
| —foo
—src
—foo
Client.java
[...]...
|
| |
|
| A simple EJB 3 application, hand-made |
| 2007-06-26 21:00:00 |
This is a simple EJB 3 app that is written, deployed and run from command line and vim, with no IDE, no ant, no maven, no admin console. The target appserver is glassfish.
1. project directory structure:
C:simple-ejb3> tree /A /F
+—classes
| —foo
—src
—foo
Client.java
[...]...
|
| |
|
| Java Architect Interview Questions |
| 2007-06-26 09:30:00 |
Java Architect Interview Questions
1. What do you understand by UML. How to interpret UML diagrams?2. State the effect of encapsulation, inheritance, and use of interfaces on architectural characteristics?3. Differentiate between 2 tier, 3 tier and n-tier architectures.4. How do the following characteristics scalability,performance, high availabilty behave based on the above architecture selected.5. In what all [...]...
|
| |
|
| Java Architect Interview Questions |
| 2007-06-26 09:30:00 |
Java Architect Interview Questions
1. What do you understand by UML. How to interpret UML diagrams?2. State the effect of encapsulation, inheritance, and use of interfaces on architectural characteristics?3. Differentiate between 2 tier, 3 tier and n-tier architectures.4. How do the following characteristics scalability,performance, high availabilty behave based on the above architecture selected.5. In what all [...]...
|
| |
|
| Centralize exception handling in java methods (2) |
| 2007-06-16 18:19:00 |
In this post, I wrote about how to centralize java exception handling inside one method by saving the exception to a local variable. Some of you might ask, “why not put exception logic into a separate private method?” I would avoid this approach for the following reasons:
1. When the exception-handling logic is specific [...]...
|
| |
|
| Centralize exception handling in java methods (2) |
| 2007-06-16 18:19:00 |
In this post, I wrote about how to centralize java exception handling inside one method by saving the exception to a local variable. Some of you might ask, “why not put exception logic into a separate private method?” I would avoid this approach for the following reasons:
1. When the exception-handling logic is specific [...]...
|
| |
|
| Where to put persistence.xml in web app? |
| 2007-06-15 18:01:00 |
In all cases, persistence.xml always resides in {root-of-persistence-unit}/META-INF/ directory. For example,
foo.war:
WEB-INF/classes/META-INF/persistence.xml //good
WEB-INF/classes/com/foo123/jpa/Project.class
WEB-INF/web.xml
index.jsp
You may also package entity classes and persistence.xml inside a library jar, which is packaged inside the war:WEB-INF/lib
foo.war:
WEB-INF/lib/my-entities.jar...
|
| |
|
| Where to put persistence.xml in web app? |
| 2007-06-15 18:01:00 |
In all cases, persistence.xml always resides in {root-of-persistence-unit}/META-INF/ directory. For example,
foo.war:
WEB-INF/classes/META-INF/persistence.xml //good
WEB-INF/classes/com/foo123/jpa/Project.class
WEB-INF/web.xml
index.jsp
You may also package entity classes and persistence.xml inside a library jar, which is packaged inside the war:WEB-INF/lib
foo.war:
WEB-INF/lib/my-entities.jar...
|
| |
|
| Use ant NoBannerLogger and -emacs options for better output (2) |
| 2007-06-13 18:46:00 |
In my previous post, I wrote about using ant options -emacs -logger org.apache.tools.ant.NoBannerLogger to strip out empty targets and task names. Here are more tips to save some typing:
1. define an shell-level alias to include these options.
In bash, add to $HOME/.bashrc:
alias ant=’ant -emacs -logger org.apache.tools.ant.NoBannerLogger’
In tcsh, add to $HOME/.tcshrc:
alias ant ‘ant -emacs...
|
| |
|
| Use ant NoBannerLogger and -emacs options for better output (2) |
| 2007-06-13 18:46:00 |
In my previous post, I wrote about using ant options -emacs -logger org.apache.tools.ant.NoBannerLogger to strip out empty targets and task names. Here are more tips to save some typing:
1. define an shell-level alias to include these options.
In bash, add to $HOME/.bashrc:
alias ant=’ant -emacs -logger org.apache.tools.ant.NoBannerLogger’
In tcsh, add to $HOME/.tcshrc:
alias ant ‘ant -emacs...
|
| |
|
| Centralize exception handling in java methods |
| 2007-06-12 20:54:00 |
Oftentimes we need to handle a series of java exceptions in one method in a similar manner. So it’s desirable to centralize the exception logic to avoid duplication. For example, the following method looks up UserTransaction and then performs the transaction. You will need to handle at least 6 exceptions. I [...]...
|
| |
|
| Centralize exception handling in java methods |
| 2007-06-12 20:54:00 |
Oftentimes we need to handle a series of java exceptions in one method in a similar manner. So it’s desirable to centralize the exception logic to avoid duplication. For example, the following method looks up UserTransaction and then performs the transaction. You will need to handle at least 6 exceptions. I [...]...
|
| |
|
| |
 |