This essay developed out of conversations I've had with several other programmers about why Java smelled suspicious. It's not a critique of Java!
Sycorax - complete tutorials
Programming Tutorials
" Java provides the industry - software companies and customer alike , an opportunity to create a true open computing environment where software is portable,
and customers benefit from increase competition. "
Java and the Future
December 1, 2008-LEJB 3.1: EJB New and Improved!
The EJB 3.0 specification was a huge improvement from what you were used to in the early versions of EJB. Available as an early draft, EJB 3.1 has many more features and is even easier to use.
December 1, 2008-Should Java Assert that Network I/O Can't Occur on the UI Thread?
Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done.
Register now to recieve special alert and latest technology news!
EJB 3.0 Entity Beans Tutorial
They can be used to map an entry in a database table to a class. (Object Relational Mapping) Instead of using result Sets from a database query you work with a class. The application server provides the functionality to load, update or delete the values of a class instance to the database. Example Of Entity Bean With Source Code
Some Usefull Points About Entity Beans:
Entity Beans are Plain Java Objects.
No required interfaces/inheritance
All public methods nonfinal, all instance variables private
Non-abstract persistent properties
. Public/protected get/set pair
. Or private instance variable
Public/protected constructor with no arguments
. Identifier + Version properties
. No home interface required
. Support for inheritance / polymorphism!
O/R Mapping Metadata as annotations
Table mappings - @Table, @SecondaryTable
Column mappings - @Column, @JoinColumn
Associations - @ManyToOne, @OneToOne, @OneToMany,@ManyToMany
Inheritance - @Inheritance, @DiscriminatorColumn
Identifier and Version properties - @Id, @Version
Entity Bean Life Cycle:
An entity bean exists in one of three states:
No state -
When a bean instance is in this state, it has not been instantiated yet. We identify this state to provide
a beginning and an end for the life cycle of a bean instance.
Pooled state -
When an instance is in the pooled state, it has been instantiated by the container but has not yet been
associated with an EJB object.
Ready State -
A bean instance in this state has been associated with an EJB object and is ready to respond to
business method invocations.