ejb3 « Transaction « Java Database Q&A





1. EJB3 Transaction Propagation    stackoverflow.com

I have a stateless bean something like:

@Stateless
public class MyStatelessBean implements MyStatelessLocal, MyStatelessRemote {
    @PersistenceContext(unitName="myPC")
    private EntityManager mgr;

    @TransationAttribute(TransactionAttributeType.SUPPORTED)
    public ...

2. How are EJB3 transactions propgated over multiple session beans?    stackoverflow.com

I've read the EJB3 spec and the latest O'Reilly and Manning books and yet I can't see defined anywhere how transactions are propagated over multiple session beans. For example, if I call ...

3. EJB3 - handling RollBackExceptions    stackoverflow.com

I have an EJB3 application which consists of some EJB's for accessing a DB, and exposed via a Session Bean as a web service. Now there are two things I need to ...

4. EJB Transaction Type    stackoverflow.com

i have looked for and compreensive article on this and have yet to find one good enough. Can some one explain to me the workings of the transaction types? (Required, RequiresNew, Mandatory, ...

5. Examples or Uses Cases to explain EJB Transaction Attributes    stackoverflow.com

There are some good explanations of EJB Transaction Attributes (and annotations) out there, for example, OpenEJB's. But sometimes when I try to cover this with someone who hasn't worked with ...

6. MDB Transaction Propagation    stackoverflow.com

I am very new to EJB 3.0 I have deployed a EAR in WebLogic 10.3 g which have two ejb modules called

  1. ServicesDump
  2. MessageDump
In ServicesDump i have a session bean which doing the database ...

7. EJB3: Why are transaction semantics and statefulness considered implementation details?    stackoverflow.com

Transaction semantics and state-fullness are considered implementation details in EJB3. An implementation can decide whether to use bean or container managed transactions. It can decide the type of of container managed transaction. It can ...

8. Transaction management in iBATIS 3 inside an EJB (3.1) container    stackoverflow.com

Is anybody out there using iBATIS 3 as their persistence framework inside an EJB container? I recently started building a new system for which I choose EJB 3.1 (the version of ...

9. Transactions (Atomicity property) in EJB 3 apply only to Database Operations - Am I right?    stackoverflow.com

I know that transactions could be used to bring about atomicity. Like if methodOne() methodTwo() methodThree() are clubbed into one transaction, if any of the method fails, the entire operation is ...





10. Can BMT transaction join with an existing transaction?    stackoverflow.com

I find that in a session bean, while using Container-Managed-Transactions, the transaction can be made to join with the existing client-transaction using transactional attributes like REQUIRED / SUPPORTS. While using Bean-Managed-Transaction, is ...

11. EJB CMT TransactionAttributeType.REQUIRES_NEW doesn't work    stackoverflow.com

    @Stateless    @LocalBean
    public class MySLSB {

            @Resource
    ...

12. EJB 3.0 transaction boundary calling one local EJB from another    stackoverflow.com

Imagine the following two ejb3.0 stateless session beans, each implements a local interface and they are deployed to the same container:

public class EjbA {
    @EJB 
   ...

13. How can i use serializable transactions on JEE 6?    stackoverflow.com

I am learning the new annotations for transaction management, like @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW), but i could not find out how to create a transaction with SERIALIZABLE isolation. Is this possible on a per-method ...

14. Does this run in transaction?    stackoverflow.com

Let's say I have two EJBs A and B:

public class A implements AInterface {

    private B b;
    ...
    //This method will NOT ...

15. Ejb3 stateless bean with CMT    stackoverflow.com

Is it possible to have something like this? Client code in a thread with pseudo code :

transaction.begin();
ejb.method();
transaction.commit();
The method() belongs to an EJB3 stateless session bean, annotated with TransactionAttributeType.REQUIRED. The method() could set ...

16. Commit while Open new Transaction within Transaction    stackoverflow.com

Using Ejb3.0, Weblogic 11g, JDBC I am invoking a method which is running remotely in another deployment EAR. The method in the remote deployment being invoked but it's annotated with the @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) the problem ...





17. Stateful EJB Lifecycle question    stackoverflow.com

I have the following bean declaration:

@Stateful
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class InteruptBean implements Interrupt {

private boolean interrupt = false;

@Override
public boolean check() {
    return interrupt;
}

@Override
public void interrupt() {
    interrupt = ...

18. Difference between javax.ejb.SessionSynchronization and javax.transaction.Synchronization    stackoverflow.com

I am working on an EJB3 application with mainly stateless session beans. They use container managed transactions. I want the beans to be aware of the transactions (for logging, etc). I can ...

19. Why does CMT commit on exit of ejb method when transaction attribute is "Required"?    stackoverflow.com

I am consistently finding that my already-existing transaction is getting committed inside any method of an EJB marked @ejb.transaction type="Required". Can this be correct? My expectation is, an EJB ...

20. EJB transaction isolation levels    stackoverflow.com

Considering we have some ejb's and their transaction settings are : ejb1 starts doing work with the Requires_New attribute and calls ejb2 which has also requires new attribute on its side. My question ...

21. How can I send XMPP messages after a successful transaction?    stackoverflow.com

In my project I have all services designed as stateless session beans. During the workflow, new data is created and this should be reported back to the clients. I only want ...

22. Asynchronous EJB 3.1 methods and Transactions    stackoverflow.com

I wrote a small test to understand asynchronized behavior in EJB3.1 using @Asynchronous annotation. It seems that: If the method exist in the same bean as the caller,

  1. Call is no ...

23. Example of EJB3 Mybatis and CMT    stackoverflow.com

Somebody knows an example with EJB3 and Mybatis where the container controls the transaction, the only part of code I founded was.. SQLMapConfig.xml


<transactionManager type="EXTERNAL">
<property name="SetAutoCommitAllowed" value="false"/>
...