Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2559 | minor | always | 03-28-08 07:43 | 03-28-08 15:46 | |
|
|||||
Reporter: | ferg | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.5 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.6 | ||
|
|||||
Summary: | 0002559: EJB/setRollbackOnly | ||||
Description: |
(rep by Carljohan Carlsson) Im trying to set up CMT with EJB (resin 3.1.5) and running into some problems when rolling back a transaction. Any ideas? /Carljohan EJB: @Stateless @TransactionManagement(TransactionManagementType.CONTAINER) public class UserServiceImpl extends GenericService implements UserService { .. @TransactionAttribute(TransactionAttributeType.REQUIRED) public Group saveGroup(Group g) { if(...) { LOG.warn("Rolling back transaction"); sessionContext.setRollbackOnly(); } } Log: [18:09:23.285] {http--8080-1} Transaction[01:0dac5463] begin [18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback-only: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback-only: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} Transaction[01:0dac5463] rollback [18:09:23.285] {http--8080-1} javax.servlet.ServletException: javax.ejb.TransactionRolledbackLocalException: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) [18:09:23.285] {http--8080-1} at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) [18:09:23.285] {http--8080-1} at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87) [18:09:23.285] {http--8080-1} at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:181) [18:09:23.285] {http--8080-1} at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266) [18:09:23.285] {http--8080-1} at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:269) [18:09:23.285] {http--8080-1} at com.caucho.server.port.TcpConnection.run(TcpConnection.java:603) [18:09:23.285] {http--8080-1} at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721) [18:09:23.285] {http--8080-1} at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643) [18:09:23.285] {http--8080-1} at java.lang.Thread.run(Thread.java:595) [18:09:23.285] {http--8080-1} Caused by: javax.ejb.TransactionRolledbackLocalException: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} at com.caucho.ejb3.xa.XAManager.commit(XAManager.java:247) [18:09:23.285] {http--8080-1} at _ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.addUser(UserServiceImpl__EJB.java:122) [18:09:23.285] {http--8080-1} at _ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__EJBLocal.addUser(UserServiceImpl__EJB.java:354) ... [18:09:23.285] {http--8080-1} Caused by: com.caucho.transaction.RollbackExceptionWrapper: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} at com.caucho.transaction.TransactionImpl.commit(TransactionImpl.java:579) [18:09:23.285] {http--8080-1} at com.caucho.transaction.TransactionManagerImpl.commit(TransactionManagerImpl.java:271) [18:09:23.285] {http--8080-1} at com.caucho.jca.UserTransactionImpl.commit(UserTransactionImpl.java:417) [18:09:23.285] {http--8080-1} at com.caucho.jca.UserTransactionProxy.commit(UserTransactionProxy.java:148) [18:09:23.285] {http--8080-1} at com.caucho.ejb3.xa.XAManager.commit(XAManager.java:243) [18:09:23.285] {http--8080-1} ... 111 more [18:09:23.285] {http--8080-1} Caused by: java.lang.IllegalStateException: invalid transaction [18:09:23.285] {http--8080-1} at com.caucho.ejb.AbstractContext.setRollbackOnly(AbstractContext.java:322) [18:09:23.285] {http--8080-1} at com.stendahls.ddt.logic.UserServiceImpl.saveGroup(UserServiceImpl.java:104) [18:09:23.285] {http--8080-1} at _ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.saveGroup(UserServiceImpl__EJB.java:198) [18:09:23.285] {http--8080-1} at com.stendahls.ddt.logic.UserServiceImpl.addUser(UserServiceImpl.java:73) [18:09:23.285] {http--8080-1} at _ejb.UserServiceImpl.UserServiceImpl__EJB$UserService__Bean.addUser(UserServiceImpl__EJB.java:116) [18:09:23.285] {http--8080-1} ... 110 more |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|