susanjin
发贴: 0
积分: 0
|
于 2003-03-28 11:30
我通过 InitialContext ic = new InitialContext(); UserTransaction ut = (UserTransaction) ic.lookup("UserTransaction"); ut.begin(); ...... ut.commit(); 来调用事务处理,为什么抛出如下错误: java.lang.IllegalStateException: No transaction. at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:72) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep torCMT.java:201) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:6 0) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:130) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai ner.java:313) at org.jboss.ejb.Container.invoke(Container.java:712) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java: 382) at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 60) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:701) at java.lang.Thread.run(Thread.java:536)
请问各位是何原因?谢谢
|