[jboss-user] [Remoting] - Re: Pure RMI
ron.sigal@jboss.com
do-not-reply at jboss.com
Tue Sep 16 02:30:52 EDT 2008
"hudara" wrote :
| 1. Where can I find a document describing how to do it on jBoss.
|
Given that you are talking about pure java RMI, instead of a JBoss facility such as JBossRemoting, I doubt that there is any document specifically about your situation. I could be wrong ...
"hudara" wrote :
| 2. How can I solve the "anonymous port selection"
|
Use
| public static Remote exportObject(Remote obj, int port)
| throws RemoteException
|
or
| public static Remote exportObject(Remote obj, int port,
| RMIClientSocketFactory csf,
| RMIServerSocketFactory ssf)
| throws RemoteException
|
in java.rmi.server.UnicastRemoteObject.
"hudara" wrote :
| 3. If I execute the java.rmi.registry.LocateRegistry.createRegistry method upon server startup, and try to bind this RMI for the defual port (1099), I get an error saying that this port is already bind.
|
In Remoting we do this:
| try
| {
| log.debug("Creating registry for " + port);
|
| registry = LocateRegistry.createRegistry(port);
| }
| catch(ExportException exportEx)
| {
| log.debug("Locating registry for " + port);
|
| // Probably means that the registry already exists, so just get it.
| registry = LocateRegistry.getRegistry(port);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176678#4176678
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176678
More information about the jboss-user
mailing list