JavaEE basics


The complexity of the EJB programming model has hindered the adoption of J2EE.

"If all you've got is a hammer, every problem tends to look like a nail." Burce Tate, author of Better, Faster, Lighter Java calls the combination of these predilections the "Golden Hammer" theory.

Both Hibernate and Spring have had a huge impact on the upcoming EJB3.0 specification, and due to the influence of these external frameworks, EJB3.0 will be lighter and simpler to use.

You don't need an EJB or an EJB container to use a DataSource.
You can configure a standalone Tomcat container with a database connection pool and use a DataSource.

Even so, the acronym "You Ain't Gonna Need It(YAGNI)" should never be too far from the forefront of your application design.

Transactions are usually synchronous and represent a series of sequential steps to curry out a business process.

Session Beans allow the developer to group the steps of a business process into a single transaction.
The activeties contained in a Session Bean are synchronous.

Message-Driven Beans are good for processing business logic asynchronously and/or executing long-running tasksin the background.

They listen on Java Messaging Service destinations(Queue and Topics) and process incoming messages as they arrive.

Entity Beans are persistence mechanism that encapsulates Create, Read,Update and Delete(CRUD) operations on database tables.

I refferenced

JBoss At Work: A Practical Guide

JBoss At Work: A Practical Guide

Thanks proggraming!