Access beans

WebSphere Commerce commands interact with access beans rather than directly with entity beans. Access beans provide a simpler interface to clients, caching of the home object, and reduced call traffic to the enterprise bean.

Access beans behave like Java beans, and hide all enterprise bean-specific programming interfaces from the client, like the JNDI, home and remote interfaces. Using access beans has additional advantages:

On the access bean, the get and set methods are not automatically cached. Only the methods that are part of the copy helper object are cached. The getters and setters on the remote interface are invoked when called.

In most cases, a program that uses enterprise beans must deal with the JNDI as well as the home and remote interfaces of enterprise beans. To simplify the programming model, an access bean for each enterprise bean is generated. When creating your own enterprise beans, use WebSphere Commerce Developer to generate this access bean.

The following diagram displays the interaction between commands, access beans, entity beans, and the database.

Related concepts

Finding data using an access bean

Updating data using an access bean

Inserting data using access beans

Deleting data using an access bean