Information Technology Reference
In-Depth Information
Object agentName = agentDOViaXPath2.get("name");
S AMPLE 6. Navigating from Agent to property.
agentAsDO.delete();
S AMPLE 7. Deleting an Agent.
Finally, a DataObject may be deleted by invoking the DataObject.delete()
method, as shown in Sample 7 .
4 . 2
E n t e r p r i s e J a v a B e a n s : C o n c e p t s
EJBs are a component model for enterprise applications written in Java. In contrast
to SDOs, EJBs are a relatively mature technology: version 1.0 [11] was released in
1998, version 2.0 in 2001, and a draft version 3.0 is currently (in 2005) under review.
We offer a brief overview of the EJB programming model here; in addition to the
specifications [10] themselves, thorough coverage is presented in [28] .
Three types of EJBs exist:
(1) entity beans, components that are shareable and transactionally recoverable,
and whose state is typically persistent in a datastore (e.g., an account in a
banking system);
(2) session beans, transient business process components that can participate in a
transaction without being transactionally recoverable themselves (e.g., a funds
transfer between two accounts). Session beans can maintain client state across
method invocations ( stateful session beans), or they may maintain no client
state between method boundaries ( stateless session beans);
(3) message-driven beans, asynchronous components that are invoked by JMS
[16] messages. Message-driven beans play an application role that is similar
to session beans, and differ chiefly in that (1) they are asynchronous and (2) do
not have an API that is driven by clients.
In the client EJB programming model, life-cycle operations (e.g., creation and query)
are performed on an EJB Home . Homes are thus “factories” that produce and aggre-
gate EJBs of a specific interface type. If an EJB exists, and the client has obtained a
reference to it from its Home, the client can then directly invoke the EJB's interface
methods.
Search WWH ::




Custom Search