[JBoss Seam] - Re: EntityManager: For newbies or to close gaps in your know
by bfo81
The Extended Persistence Context only says, that the entities "live" in the managed state for multiple method invocations, in opposition to the "normal" Persistence Context, in which the entities get detached after a method has finished.
Transactions are completely indepent from that. And always remember that transactions are an isolated piece of work. Just think of it as football (soccer, not american football, please *g*) matches. Losing one match doesn't mean you can't win the next ;).
There's just one thing you should bare in mind: after a rollback the involved entities might be in a dirty state.
Now, to your question: If you want to have a transaction span multiple method invocations I'd say that you should switch to user managed transactions (instead of container managed ones - there's a certain EJB annotation for that, but at the moment I don't know which one). Then you can start a transaction and finish it later, in another method. But I never did this so don't trust me without testing that yourself ;).
But, I can hear Gavin screaming, "children, don't do this at home" ;). Whenever you have a transaction opened for a longer period, you might have serious problems with scalability. Multiple open transactions may block each other. In a clean software architecture transactions are lasting only a short time.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990533#3990533
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990533
18 years, 1 month
[JBossWS] - HELP with error "Can not connect http client invoker"
by ajay662
My development environment is
jboss 4.0.5.GA
jbossws-1.0.4.GA
Trying to consume remote web-services from an MDB, using "service-ref" element in the deployment descriptor as mentioned in the JBossWS User guide. While invoking a web-service method, I get the following exception. I have looked through the forums but did not find any relevant help...
I have already tried to increase the timeout value to 2 minutes using StubExt class... same results. My standalone client (outside of Jboss) works fine.
Here is the exception stack
13:18:47,103 ERROR [CallImpl] Call invocation failed with unkown Exception
| javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148)
| at $Proxy73.getSipCacheStatus(Unknown Source)
| at com.mycompany.enms.status.PollClusterMDB.pollCluster(PollClusterMDB.java:120)
| at com.mycompany.enms.status.PollClusterMDB.onMessage(PollClusterMDB.java:144)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
| at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:47)
| at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
| at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
| at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
| at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
| at org.jboss.mq.SpySession.run(SpySession.java:323)
| at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:201)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
| ... 32 more
| Caused by: java.net.ConnectException: Connection timed out: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.Socket.connect(Socket.java:516)
| at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
| at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
| at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
| at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
| at sun.net.www.http.HttpClient.New(HttpClient.java:287)
| at sun.net.www.http.HttpClient.New(HttpClient.java:299)
| at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:796)
| at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:748)
| at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:673)
| at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:840)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:163)
| ... 37 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990528#3990528
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990528
18 years, 1 month