2. Pros
JDBC Hibernate EJB 3.0
You have complete Simple to write CRUD A lot less artifacts than
control (create, retrieve, update, EJB
over the persistence delete) operations. 2. x. Make use of
because this is the No container or annotations or attributes
building blocks of nearly application server is based programming.
all other persistence required and can be Narrows the gap
technologies in Java. plugged into an existing between EJB
Can call Stored container. 2. x and O/R mapping.
Procedures. Tools are available to Do support OO concepts
Can manipulate relatively simplify like inheritance.
large data sets. mapping relational data
to objects and quick to
develop
www.rajkrrsingh.blogspot.com
3. Cons
JDBC Hibernate EJB 3.0
You will have to write a lot of Little or no capabilities for Since it is new, might be too
code to perform a little. remote access and early to use in commercial
Easy to make mistakes in distributability. projects.
properly managing Mapping schemas can be It is still evolving.
connections and can cause tedious and O/R mapping
out of cursors issues. has its tricks like using lazy
Harder to maintain because initialization, eager loading
changes in schemas can etc. What works for one may
cause lot of changes to your not work for another.
code. Limited clustering
Records need to be locked capabilities.
manually (e.g. select for Large data sets can still
update). cause memory issues.
Support for security at a
database level only and no
support for role based
security without any add on
APIs like Aspect Oriented
Programming etc.
www.rajkrrsingh.blogspot.com
4. Conclusions
JDBC Hibernate EJB 3.0
Where possible stay Suitable for records in As a rule of thumb,
away use suitable for distributed
from using JDBC unless between 100 and 5000. and clustered
you Watch out for memory applications, which is
have compelling reason issues, when heavily transaction
to using large data sets. based. Records in
use it for batch jobs use say between 1 and
where 100.
large amount of data
need to be transferred,
records in use greater
than 5000, required to
use Stored Procedures
etc.
www.rajkrrsingh.blogspot.com