Troubleshooting
CMT Problems
Q1: | Why do I get an error when I call setRollbackOnly? |
Your method probably has a transaction type of Supports, Never, or NotSupported. You can only roll back a transaction when the method's transaction type is Required, RequiresNew, or Mandatory. | |
Q2: | Why can't I call getUserTransaction when I use CMT? |
By using CMT you have agreed that you don't want to manage your bean's transaction scope. You shouldn't be using the UserTransaction object anyway. |
BMT Problems
Q1: | Why do I get an error when I call setRollbackOnly on the SessionContext object? |
When using BMT, you should use the setRollbackOnly in the UserTransaction object (which you get by calling getUserTransaction on the SessionObject). | |
Q2: | Isn't the BMT a subway? |
Yes, the ... |
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.