jump to navigation

EAR, WAR, JAR files October 31, 2006

Posted by Allu in J2EE.

An EAR file is a standard JAR file with an “.ear” extension, named from Enterprise ARchive file. A J2EE application with all of its modules is delivered in EAR file. JAR files can’t have other JAR files. But EAR and WAR (Web ARchive) files can have JAR files.
 An EAR file contains all the JARs and WARs belonging to an application. JAR files contain the classes and WAR files contain the Web components (JSPs, static content (HTML, CSS, GIF etc), Servlets etc.). The J2EE application client’s class files are also stored in a JAR file. EARs, JARs, and WARs all contain an XML-based  deployment descriptor.

What is a daemon thread? October 28, 2006

Posted by Allu in JAVA.

Daemon threads are sometimes called “service” threads. These are threads that normally run at a low priority and provide a basic service to a program or programs when activity on a machine is reduced. An example of a daemon thread that is continuously running is the garbage collector thread. This thread is provided by the JVM.

Session Context  Vs Entity Context October 27, 2006

Posted by Allu in EJB.
1 comment so far

Session Context – is the gateway for the EJB Bean to interact with the Container.  (Transaction State and Security State ).  No need of user implementation

EJB Context – where EJBean will perform call back methods to the container.  It will help bean to ascertain their status.

Differences between normal Beans and EJBs? October 12, 2006

Posted by Allu in J2EE, JAVA.
add a comment

JavaBeans may be visible or nonvisibleat runtime. For example, the visual GUI component may be a button, list box, graphic, or a chart

An EJB is a nonvisual, remote object

Java Beans are intended to be local to a single process and are primarily intended to run on the client side. Although one can deevelop server-side JavaBeans, it is far easier to develop them usin the EJB specification instead.

EJBs are remotely executable components or business objects that can be deployed only on the server

JavaBeans is a component technology to create generic java component that can be composed together into applets and applications

Even though EJB is a component technology, it neither builds upon nor extends the original javaBeans specification.

Java Bean have an external interface called the properties interface, which allows a builder tool to interpret the functionality of the bean

EJBs have a deployment descriptor that describes its functionality to an exteternal builder tool or IDE


Difference between error and an exception? October 5, 2006

Posted by Allu in JAVA.

An error is an irrecoverable condition occurring at runtime. Such as OutOfMemory error. These JVM errors and you can not repair them at runtime. While exceptions are conditions that occur because of bad input etc. e.g. FileNotFoundException will be thrown if the specified file does not exist. Or a NullPointerException will take place if you try using a null reference. In most of the cases it is possible to recover from an exception (probably by giving user a feedback for entering proper values etc.).

Different types of inner classes October 2, 2006

Posted by Allu in JAVA.

Nested top-level classes– If you declare a class within a class and specify the static modifier, the compiler treats the class just like any other top-level class. Any class outside the declaring class accesses the nested class with the declaring class name acting similarly to a package. e.g., outer. inner. Top-level inner classes implicitly have access only to static variables. There can also be inner interfaces. All of these are of the nested top-level variety.

Member classes – Member inner classes are just like other member methods and member variables and access to the member class is restricted, just like methods and variables. This means a public member class acts similarly to a nested top-level class. The primary difference between member classes and nested top-level classes is that member classes have access to the specific instance of the enclosing class.

Local classes – Local classes are like local variables, specific to a block of code. Their visibility is only within the block of their declaration. In order for the class to be useful beyond the declaration block, it would need to implement a more publicly available interface. Because local classes are not members, the modifiers public, protected, private, and static are not usable.

Anonymous classes – Anonymous inner classes extend local inner classes one level further. As anonymous classes have no name, you cannot provide a constructor.