[Remoting] - Can custom APIs be bound in the RMI Registry started by JBos
by venkatramanan1
Team
This is Venkatramanan, a developer from AdventNet WebNMS (http://www.adventnet.com/products/webnms/index.html).
When we used JBoss 5Beta 4 to deploy, we found the below issue.
We started the default JBoss & ensured that RMI registry was running (Port 1099 & 1098 was listening). But when we tried to bind our APIs using Naming.Bind , it threw the following exception:
FileServer: non-JRMP server at remote endpoint
| java.rmi.ConnectIOException: non-JRMP server at remote endpoint
| at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
| at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
| at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
| at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
| at java.rmi.Naming.rebind(Naming.java:160)
| at FileServer.main(FileServer.java:11)
Code we used is a simple one & a sample implementation from SUN's RMI code - http://java.sun.com/developer/technicalArticles/RMI/rmi_corba - File transfer using RMI
FileInterface fi = new FileImpl("FileServer");
| Naming.bind("//127.0.0.1/FileServer", fi);
Even variations "like <IP_Address>/FileServer" or "localhost/FileServer" did not work.
When we searched with the stack trace, we found from an http://mail-archive.objectweb.org/proactive/2005-01/msg00009.html that:
"Romain" wrote : You can have a look at http://www.jboss.org/index.html?module=bb&op=viewtopic&t=27490 or go to JBOSS web site at search in the forums for rmi registry.
| Unless I misunderstood everything, you cannot use JBOSS as RMI Registry(i.e by just starting the server). Of course I am pretty sure that it is possible to start it in a separate process: in a Servlet for instance, or maybe to start it as a service, but for sure with the default configuration, when starting the server, there is no RMI Registry running by default
But I found that in JMXConnectorServerService.java, LocateRegistry.createRegistry is called. (But I doubt whether this source is called at all)
He has also referred a JBoss Forum http://www.jboss.org/index.html?module=bb&op=viewtopic&t=27490
Now can we understood this as "The registry started with JBoss cannot be used for binding Custom APIs. Atleast does it means that we have to do some more special configuration or source change to bind custom APIs in JBoss' RMI registry?"
Kindly clarify
Thanks & regards
Venkatramanan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141326#4141326
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141326
18 years
[Clustering/JBoss] - Re: Only one scheduler across all nodes in the cluster
by tpawankumar
Hi All,
I am using scheduler in clustered environment.
Following is jboss-service.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
| <mbean code="org.jboss.varia.scheduler.Scheduler"
| name="com.covad:service=Scheduler">
| <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">com.covad.scheduler.HearBeatScheduler</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">60000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| </mbean>
| </server>
|
I have configured two nodes on two different machines.
This HeartBeatScheduler class publishes messages on the JMS topic.
I want only one node to publish the message.But both nodes are publishing the messages.
I am using Jboss 4.2.1 GA and i am deploying the same .sar in both the machines.
Please suggest me where i am going wrong.
Thanks,
Pavan.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141319#4141319
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141319
18 years