September 10, 2012 at 1:45 PM
Advantage of system.gc():
System.gc() runs the Garbage Collector.The JVM performs this recycling of all discarded obj's even if gc is not invoked explicitly.System.gc() is a static method so it is more convenient to use.
Advantages of Annotations:
1)It has made Enterprise Application Development easy.
2)Annotations are generally used to embed in a program data that would otherwise be furnished in a side file. With annotations, you put the specification information right in your code next to the program element that it affects. This is a more intuitive and convenient approach.
3)Annotations typically contain several optional elements to allow detailed customization of an application.
4)One immediate benefit of annotations for web services is that many formerly required markers, such as the extends java.rmi.Remote and throws java.rmi.RemoteException that were borrowed from remote method invocation (RMI), are no longer necessary.
Java EE 5 platform provides annotations for the following tasks:
Defining and using web services
Developing EJB software applications
Mapping Java technology classes to XML
Mapping Java technology classes to databases
Mapping methods to operations
Specifying external dependencies
Specifying deployment information, including security attributes.
Advantage of Spring Framework:
1)Spring is Lightweight container.
2)No App Server Dependent ? like EJB JNDI Calls.
3)Objects are created Lazily , Singleton - configuration
4)Components can added Declaratively.
5)Initialization of properties is easy ? no need to read from properties file.
6)Declarative transaction, security and logging service - AOP
7)application code is much easier to unit test.
8)With a Dependency Injection approach, dependencies are explicit, and evident in constructor or JavaBean properties.
9)Spring's configuration management services can be used in any architectural layer, in whatever runtime environment.
10)Spring can effectively organize your middle tier objects.
11)Not required special deployment steps.
Eager and Lazy loading:
lazy loading means that any foreign key references that you have in you table will be loaded only when referred to by the application.
Eager loading means everything will be loaded at once.
Hibernate adopts the mechanism of lazy loading to load objects from databases. Lazy loading contributes a lot to improve the performance of an application by limiting the amount of objects that will be needed.
Eager loading loads the full objects tree once. Because eager loads multiple related objects with a single SELECT statement instead of using multiple SELECT statements, therefore in some situations, eager loads can also improve the performance of the application by reducing the times of accessing the database.
Related Tutorials/Questions & Answers:
Garbage CollectorGarbage Collector Hi,
Can any one please tell me what are the types of
garbage collector ??
Regards:
Akash
GARBAGE COLLECTORGARBAGE COLLECTOR What is
garbage collector in java?
In order to achieve run-time polymorphism in java following supports needed.
At first overrides the super-class one or more methods in subclass this is due
Advertisements
garbage collectorgarbage collector Hi
what is the adventage using system.gc() method ?
what is the adventage f annotation in java ?
how can we loads the spring...;Advantage of system.gc():
System.gc() runs the
Garbage Collector.The JVM
WHAT IS GARBAGE COLLECTOR AND HOW IT IS USEDWHAT IS
GARBAGE COLLECTOR AND HOW IT IS USED WHAT IS
GARBAGE COLLECTOR AND HOW IT IS USED
The
garbage collector collects
garbage. When you create object they produce
garbage, and the
garbage collector gets rid
Java Garbage collectorJava
Garbage collector What kind of thread is the
Garbage collector thread? Hi Friend,
It is a daemon thread.
Thanks
Java garbage collectorJava
garbage collector Does
garbage collection guarantee that a program will not run out of memory? Hi,
The Java
Garbage Collector does not guarantee of this.
Thanks
Java garbage collectorJava
garbage collector Which is
garbage collected first: Normal variables or static variables
garbage collector - Java Interview Questionsgarbage collector what is the use of
garbage collector? Hi friend,
import java.util.Vector;
public class GarbageDemo{
public...;
for (int i = 0; i < size; i++) {
}
System.out.println("
Garbage garbage collector - Java Interview QuestionsHow
Garbage Collector Works how does
Garbage Collection works?
Garbage Collection in JavaGarbage
Collector Garbage collection"... unreferenced objects on the fly. if you want more details about
Garbage Collector Garbage Collection;
In the example we are describing how the
garbage
collector works..., first we are creating three
objects to give the
garbage collector something... the
last one to determine the time taken by the
garbage collector to complete
Code for Garbage Collection to force a
garbage
collector to work by creating many objects.
Description... collection.
First of all we have created an object for the
garbage collector... Code for
Garbage Collection
Java garbage collectionJava
garbage collection How many times may an object's finalize() method be invoked by the
garbage collector garbage collection - Java Beginners then it will be automatically deleted by the
garbage collector.
It save the some amount..."algorithms.Instead of "destructor"
in c++ , java supports
garbage collector...
garbage collection wat is the use of
garbage collection
garbage collection in java_TO_REPLACE_2
In this section, you will learn how to force a
garbage collector... for the
garbage collector to
perform some operation. Then we have used the System.gc...
.style1 {
color: #FFFFFF;
}
Garbage Collection in Java
In java
Garbage collection process in java - Java Beginners
In Java the
Garbage collection process is known as
Garbage Collector.
The
Garbage....
Program can call the System.gc() method to call the
Garbage Collector...
Garbage collection process in java Name the process used for
Garbage garbage collectiongarbage collection how to use
garbage collection in program using core java
What is garbage collection? - Java Beginners.
The
Garbage collector is responsible for running the
Garbage collection process.... But
Garbage collector will finally decide weather to call
Garbage collection...What is
garbage collection? Hi,
Tell me about
garbage collection
Garbage collectionGarbage collection why
garbage collection? How it works?
Garbage collection is one of the most important features of Java. The purpose of
garbage collection is to identify and discard objects that are no longer
Java Garbage Collection. The
garbage collector determines
which objects are no longer referenced...
Java
Garbage Collection
... on
garbage collection. The name "
garbage collection"
implies
ModuleNotFoundError: No module named 'garbage'ModuleNotFoundError: No module named '
garbage' Hi,
My Python... '
garbage'
How to remove the ModuleNotFoundError: No module named '
garbage... to install padas library.
You can install
garbage python with following command
ModuleNotFoundError: No module named 'Collector'ModuleNotFoundError: No module named '
Collector' Hi,
My Python... '
Collector'
How to remove the ModuleNotFoundError: No module named '
Collector' error?
Thanks
Hi,
In your python environment you
Getting garbage valueGetting
garbage value Thanks for the reply. Its works well, but whenever I'm using numeric value from 0010 to 0757 it is returning some
garbage value. I dont have the idea what is going wrong. Please give me some idea to solve
Getting garbage valueGetting
garbage value Thank You Sir for helping me out from the problem. Now I'm facing some problem with the value I'm passing to the textfield from the link gets some
garbage value whenever I'm using some particular set
Getting garbage valueGetting
garbage value Thank You Sir for helping me out from the problem. Now I'm facing some problem with the value I'm passing to the textfield from the link gets some
garbage value whenever I'm using some particular set