EJB Section Index | Page 26
Do JTS implementations support nested transactions?
A JTS transaction manager must support flat transactions; support of nested transactions is optional. If a client begins a transaction, and within that transaction begins another transaction, the...more
How does a client application create a transaction object?
How you gain access to UserTransaction objects varies depending on the type of client. Enterprise JavaBeans provides two types of transaction management:
Container-managed transactions. As the ...more
How does a session bean obtain a JTA UserTransaction object?
If it's necessary to engage in explicit transaction management, a session bean can be designed for bean-managed transactions and obtain a UserTransaction object via the EJBContext using the getUse...more
How does an enterprise bean that uses container-managed transactions obtain a JTA UserTransaction object?
It doesn't! By definition, container-managed transaction processing implies that the EJB container is responsible for transaction processing. The session bean has only limited control of transac...more
Is an EJB, JMS, or general-purpose Java application server a transaction manager?
It depends on the server implementation. The JTA and JTS specifications define client-, application-, and transaction manager-level operations. There is nothing to prevent a Java application ser...more
Is it necessary for an entity bean to protect itself against concurrent access from multiple transactions?
No. One of the motivations for using a distributed component architecture such as Enterprise JavaBeans is to free the business logic programmer from the burdens that arise in multiprogramming sce...more
Why would a client application use JTA transactions?
One possible example would be a scenario in which a client needs to employ two (or more) session beans, where each session bean is deployed on a different EJB server and each bean performs operati...more
Why would a session bean use bean-managed transactions?
In some situations, it's necessary for a (stateful) session bean to selectively control which methods participate in transactions, and then take over the bundling of operations that form a logical...more
How does passivation work in stateful session beans?
Unlike entity beans and stateless session beans, stateful session bean are usually evicted from memory when they are passivated. This is not true of all vendors but this view serves as good model ...more
What is passivation and activation?
Passivation and activation are two phases of a resource management technique that reduces the number of bean instances needed to service all clients. Passivation is the process of disassociating ...more
Are Enterprise JavaBeans and JavaBeans the same thing?
Enterprise JavaBeans and JavaBeans are not the same thing; nor is one an extension of the other. They are both component models, based on Java, and created by Sun Microsystems, but their purpose ...more
What is a BMP bean?
BMP: Bean-Managed Persistence
A BMP bean is an entity bean that synchronizes its state with the database manually. In other words, the bean developer must code explicit database calls into the b...more
What is a CMP bean?
CMP: Container-Managed Persistence
A CMP bean is an entity bean whose state is synchronized with the database automatically. In other words,
the bean developer doesn't need to write any explicit...more
What is an entity bean?
An entity bean is a type of enterprise bean; a type of EJB server-side component. Entity bean components implement the javax.ejb.EntityBean interface and can be container-managed (CMP) or bean-ma...more
What is a stateless session bean?
A stateless session bean is an enterprise bean (EJB component) that provides a stateless service to the client. Conceptually, the business methods on a stateless session bean are similar to proced...more