[EJB 3.0] - InvokeRemoteInterceptor reconnect for each call
by yborgne
Hi,
I'am using JBossAS 4.2.0 GA on Windows XP to bench the remoting call to EJB3.
After approximately 3000 calls, this exception occured :
| org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://10.129.3.232:3873/]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:525)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1544)
| at org.jboss.remoting.Client.invoke(Client.java:530)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
| at $Proxy0.getDatas(Unknown Source)
| at com.lapeyre.test.Bench.main(Bench.java:34)
| Caused by: java.net.BindException: Address already in use: 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.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:516)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:796)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:521)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1544)
| at org.jboss.remoting.Client.invoke(Client.java:530)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
If i look for used TCP ports, during execution of my test, i can see that a new local port (on the client) is used for each call.
In org.jboss.aspects.remoting.InvokeRemoteInterceptor source code, a remoting Client is created, connected and disconnected for each call :
| public class InvokeRemoteInterceptor ...
|
| public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
| {
| ...
| Client client = new Client(locator, subsystem);
|
| try
| {
| client.connect();
| ...
| }
| finally
| {
| client.disconnect();
| }
| }
|
Is there a InvokeRemoteInterceptorWithPooledClient class somewhere, or a special configuration ?
Thanks
-Yvan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050061#4050061
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050061
17 years, 6 months
[JBoss AOP] - Re: unable to resolve an AOP IllegalArgumentException
by kabir.khan@jboss.com
As you say, BilanCongesServiceImpl does implement org.jboss.aop.Advised which means that your classes have been woven at compile-time.
When you say your AOP version is 1.3, I hope this does not mean you have downgraded the AOP version in AS 4.0.5.GA? AS 4.0.5.GA ships with AOP 1.5.2.GA and should stay on that AOP version or higher.
So, I guess what this means is that you are compiling the classes with AOP 1.3 and running with AOP 1.5.2.GA/AS 4.0.5.GA, which will not work as I have now stated a few times. Or maybe I am confused since you have two threads open on the same subject, and in one place you are stating that you have disabled the AOP builder while now you are saying that (surprise) compiling with the AOP builder weaves the classes, in which case I am not sure why you sent me the war.
To be clear again, do NOT compile your classes with the AOP builder, and deploy them in JBoss with loadtime weaving enabled. Try the "injboss" tutorial example to satisfy yourself that it does actually work when you do not mix and match AOP versions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050058#4050058
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050058
17 years, 6 months
[Remoting] - Re: Problem calling EJB3 method via HTTP only
by formica
Just for info, I made a test using in the annotation the variable jboss.bind.address and the client fails with the following:
| org.jboss.remoting.transport.http.WebServerError: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><TITLE>ERROR: The requested URL could not be retrieved</TITLE><STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE></HEAD><BODY><H1>ERROR</H1><H2>The requested URL could not be retrieved</H2><HR noshade size="1px"><P>While trying to retrieve the URL:<A HREF="http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet">http://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet</A><P>The following error was encountered:<UL><LI><STRONG>Invalid URL</STRONG></UL><P>Some aspect of the requested URL is incorrect. Possible problems:<UL><LI>Missing or incorrect access protocol (should be `http://'' or similar)<LI>Missing hostname<LI>Illegal double-escape in the URL-Path<LI>Illegal character in hostname; underscores are not allowed</UL><P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>. <BR clear="all"><HR noshade size="1px"><ADDRESS>Generated Thu, 31 May 2007 09:44:28 GMT by asap01.cern.ch (squid/2.6.STABLE1)</ADDRESS></BODY></HTML>
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:375)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050057#4050057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050057
17 years, 6 months
[JBoss Seam] - Seam persistence with Web Service
by paradigmza
Hello,
I am trying to use Seam managed persistence (Seam Application Framework) with a web service on Jboss 4.0.5 with ws 1.2.1 and seam 1.2.1.
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
| public class JustSwipeService {
|
| @WebMethod
| public boolean saveSettlement(Settlement settlement) throws Exception {
| SettlementHome settlementHome = (SettlementHome) Component.getInstance(
| "settlementHome", true);
| settlementHome.setInstance(settlement);
| settlementHome.persist();
| return true;
| }
|
| }
When I call this I get the exception
anonymous wrote :
| 11:15:50,459 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
| at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:469)
| at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442)
| at org.jboss.seam.persistence.EntityManagerProxy.joinTransaction(EntityManagerProxy.java:113)
| at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:47)
is there an elegant way to solve this?
Thanks
Sean.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050055#4050055
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050055
17 years, 6 months