[
http://jira.jboss.com/jira/browse/EJBTHREE-823?page=comments#action_12351109 ]
Sureshbabu Thyvalappil commented on EJBTHREE-823:
-------------------------------------------------
This is the output I get from the example I posted in
JIRA. It got the ejb reference from the remote server.
But after that it is looking to connect to local JBOSS
server(same machine where the client runs). If I've a
JBOSS server running locally, I dont get the socket
error.
--------------------
Got the ejb remote reference =
jboss.j2ee:ear=svc-rptv1.ear,jar=svc-rptv1.jar,name=ReportService,service=EJB3
org.jboss.remoting.CannotConnectException: Can not get
connection to server. Problem establishing socket
connection.
at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:267)
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.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
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:77)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
at $Proxy0.resubmit(Unknown Source)
at
reportclient.ReportClient.main(ReportClient.java:25)
Caused by: java.net.ConnectException: Connection
refused
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:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:535)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:471)
at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:263)
... 14 more
--- "Sureshbabu Thyvalappil (JIRA)"
http://jira.jboss.com/jira/browse/EJBTHREE-823?page=comments#action_12351108
http://jira.jboss.com/jira/browse/EJBTHREE-823?page=comments#action_12351025
p.put(Context.PROVIDER_URL,"jnp://remote-host:1099");
System.out.println("report.resubmit.."+report.resubmit(null,0L));
http://jira.jboss.com/jira/secure/Administrators.jspa
____________________________________________________________________________________
p.put(Context.PROVIDER_URL,"jnp://remote-host:1099");
System.out.println("report.resubmit.."+report.resubmit(null,0L));
http://jira.jboss.com/jira/secure/Administrators.jspa
____________________________________________________________________________________
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
Unable to call ejb remotely
---------------------------
Key: EJBTHREE-823
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-823
Project: EJB 3.0
Issue Type: Bug
Environment: JBOSS 4.0.5 with EJB 3.0
Reporter: Sureshbabu Thyvalappil
Assigned To: Carlo de Wolf
I'm using JBOSS 4.0.5GA with ejb3. I am running into weird behavior when running java
client from remote machine. If I run it from the same machine where the jboss server is
running, no problem. So here is the behavior I'm noticing.
FOr the jndi lookup of ejb, it is connecting the remote server and gets a reference to
the ejb. But when I call a method on the ejb reference, it is trying to call a method on
the local machine( I mean the same machine where the client is running).
Sounds very weird to me. Any help is appreciated from EJB3 experts.
I upgraded to EJB3 RC9 patch1, but same behavior.
Here is the client code ..
try
{
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL,"jnp://remote-host:1099");
InitialContext ctx = new InitialContext(p);
IReportService report = (IReportService) ctx.lookup(
"ejb3/xxx/ReportService");
System.out.println("Got the ejb remote reference = "+report);
System.out.println("report.resubmit.."+report.resubmit(null,0L));
ReportJob reportJob = new ReportJob();
System.out.println("B4 report.submitRequest..");
report.submitRequest(reportJob);
System.out.println("After report.submitRequest..");
}
catch (Exception e)
{
e.printStackTrace();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira