A Techno Blog, mainly about Java


I made it to the JUG meeting on JDO/EJB3.0.

I was paying more attention to the JDO information. He mentioned that the object relational mapping (I guess from a design perspective) consists of two step process : mapping (easy part), then making it quick.

Also, he said that JDO works with J2EE, but does not require it. Another point was the JDO defers the datastore decisions. Meaning the spec does not call just for relational databases.
Last point was that 20-40% of JDBC persistence is spent on persistence infrastructure.

October 19, 2004 Posted by | EJB, JDO | Leave a comment

1 for Java?

Sun Proposes Single Persistence model. But, what about Hibernate?

September 27, 2004 Posted by | EJB | Leave a comment

Enterprise Java Beans

I just picked up Richard Monson-Haefel’s EJB bookwhich covers EJB 2.0, but here is an related article Developing Your First EJBs, Part 2

Access the actual Bean which live in the EJB container via the Home Interface
and the Remote Interface.

Home Interface (extend javax.ejb.EJBHome) : life cycle methods

Remote Interface (extend javax.ejb.EJBObject) : business methods of
the bean

Call back methods: notification methods that are invoked when certain events occur

Entity Bean (like what id done by JDO or Hibernate): represent data in a database

Session Beans:

Interesting, EJB and JDO.

September 24, 2004 Posted by | EJB | Leave a comment

EJBs intro

Java Enterprise Connectivity: Enterprise Java Beans (EJB) – an
architecture for the development and deployment of transactional, distributed
object applications-based, server-side software components.

The concept behind
the EJB is to allow the application programmer to concentrate on business logic
and and shield him/her from complex system level services. To acheive this, the
EJB components must operate within a controlled environment called the
container. The container is responsible for all system level services such as
instance pooling, transaction handling, security, exception handling, and data

When a client application invokes a remote method on an
enterprise bean, the container first intercepts the invocation to ensure
persistence (means that its state, the values of its variables, can be perserved
across multiple invocations of a program that references the object),
transactions, and security are applied properly to every operation a client
performs on the bean. The container manages security, transactions, and
persistence automatically for the bean, so the bean developer doesn’t have to
write this type of logic into the bean code itself. The enterprise bean
developer can focus on encapsulating business rules, while the container takes
care of everything else.

Session EJB: is a nonpersistant object that implements some business
logic on the server. A client can access a Session EJB through an implemented
Remote interface. Session EJBs can either be stateful or stateless. Stateful
Session Beans exist for the duration of a single client/server session and the
client has reference to a stateful Session Bean that is potentially valid for
the lifetime of the client. However, a stateless Session Bean is not necessarily
holding reference to a particlular Session Bean. Instead, the stateless Session
Bean executes on behalf of a single client.

Entity EJB: is a persistent object that represents an object view of
information stored in a persistent data store. Each Entity EJB carries its own
identity . Entity EJBS that manage thir own persistance are called BMP Entity
Beans. Entity EJBs that delegate their persistence to the EJB container are
called CMP Entity Beans.

The container lies between the client and the bean.
To create an EJB server side component, the bean developer provides two
interfaces plus the beans implementation class.  The beans are accessed by
client applications over the network through their remote and home

 Remote and Home Interfaces: The remote and home interfaces
represent the bean, but the container insulates the beans from direct access
from client applications.  

The Home interface represents life cycle methods of the component (create,destroy,find). 
It extends the javax.ejb.EJBHome interface. 

The Remote interface represent the business methods of the bean. It extends
the javax.ejb.EJBObject interface. 

Enterprise JavaBeans Fundamentals

Developing an Entity Bean

Sample: Session Enterprise Beans
A downloadable ZIP file containing
the complete code for the home and remote interfaces of a session enterprise

Message Service Overview
An introduction to the Java Message Service
API, outlining how it can be used to add asynchronous messaging to your Java
enterprise applications.

Sun’s product page for EJB technology.

A resources page offering a download of the EJB
specification, from Sun Microsystems

Sample: Bean Implementation Class for a Session Enterprise Bean
downloadable ZIP file containing the complete code for a session enterprise
bean’s implementation class.

Sample: Entity Beans
A downloadable ZIP file containing the complete
code for a bean managed entity bean and a test client application.

Sample: Client Applications and Session Beans
A downloadable ZIP
file containing the complete code for a client application that uses a
session bean.

and deploy an EJB
JavaPro Article

started with EJBs
DeveloperWorks Course

EJB 3.0 Tutorial

July 18, 2004 Posted by | EJB | Leave a comment