RMI registry on multiple net interfaces

I'm interested in creating several RMI registry servers, each one listening in one different net interface of the same machine (two ethernet cards). Is there any way to do this without using custom RMI socket factories? From the documentation I have read, it looks like there's no possibility to choose a specific network interface. Instead, RMI registry chooses the one associated to localhost.
Thanks in advance.
Zealon

You could use
LocaeRegistry.createRegistry(port,csf,ssf) with an
RMIServerSocketFactory that binds the ServerSocket to
the appropriate network address, but you will then
discover that you can only have one Registry per JVM
because it has a fixed objectID, so don't bother.
But actually, why do you want to do this? Your stated
reason is not correct. By default any ServerSocket,
including those created by the Registry and RMI, is
bound to 'any', which means it should accept from all
network interfaces. Perhaps you have the classic
'hosts' hosts/DNS setup problem where your servers
embed 127.0.0.1 in the stub? Use
-Djava.rmi.server.hostname at the server JVM, or
better still fix your 'hosts' file or DNS setup.
EJPThanks for your reply. Maybe I didn't explain myself enough.
I'm working in medical electrocardiography, and have a PC with two net interfaces. The first one is bound to a LAN IP address that belongs to a medical network. Each one of the hosts in this medical network is an electrocardiography monitor, attached to a patient..
The second net interface is an external IP address (not LAN address).
I created a remote class called MonitorFactory, that should provide information about the electrocardiography monitors existing into the medical network. It works OK, and I cand bind MonitorFactory objects to a RMI registry with no problem at all.
There are some reasons I would like to use several RMI registries:
- First one, I need to control access from external network to my medical network. Medical patient data must be handled very carefully. I thought I could do so by enabling/disabling an RMI registry bound to the external IP address. This way, I could enable access to medical data from outside the medical network, by registering my MonitorFactory objects to this external RMI registry, but only when I decide to do that.
- Second one, I want an RMI registry always running bound to the medical LAN IP address, so I could use the applications that use MonitorFactory like a local application, not only like a remote one.
This scheme represents the system I have to build:
PC with two network interfaces
External PC <----------->|213.xxx.xxx.xxx 192.xxx.xxx.xxx|<----------> Medical network
MonitorFactory - Listens to medical data into 192.xxx.xxx.xxx network only. Bound to
external RMI registry when available and always bound to internal RMI registry.
External RMI registry - bound to 213.xxx.xxx.xxx. Enabled when I decide to do so.
Internal RMI registry - bound to 192.xxx.xxx.xxx. Always enabled.
If I create an RMI registry bound to "any" of the interfaces, I always risk my medical data to the Internet, because there is always a port open at 213.xxx.xxx.xxx accepting connections.
One possible solution could be using SSL sockets for RMI. This way, only allowed clients could connect to RMI registry. But what worries me most is the fact that a port could be open to the Internet - what about attacks to this open port? If those attacks could make RMI registry fall, medical data flow to another information systems could be interrupted, including medical alarms like critical patient status.
On the other way, I would like to maintain RMI default sockets for compatibility and future releases of my application.
Any suggestions?
Thanks in advance.
Zealon.

Similar Messages

  • RMI for multiple remote interfaces

    We have a few classes that extend multiple remote interfaces. The stub and
    skeleton created by the weblogic rmi compiler have strange names like
    WLSkel3f2i4g44322n5l3i1r224p60697473f.class and
    WLStub3f2i4g44322n5l3i1r224p60697473f.class.
    Is this ok? How can we make it create "normal" class names?
    Thanks,
    Inbal

    try using the -nomanglednames option on the weblogic.rmic compiler.
    I think what you've got is OK - it's a result of the clever stubs weblogic
    generates for rmi.
    It's documented in the "Using weblogic RMI" guide.
    -Dominic
    Inbal Ronen wrote:
    We have a few classes that extend multiple remote interfaces. The stub and
    skeleton created by the weblogic rmi compiler have strange names like
    WLSkel3f2i4g44322n5l3i1r224p60697473f.class and
    WLStub3f2i4g44322n5l3i1r224p60697473f.class.
    Is this ok? How can we make it create "normal" class names?
    Thanks,
    Inbal

  • RMI registry weirdness, API versioning, and more

    Hi folks,
         I have some RMI questions. I'd like to start by giving background on the software and our intentions with RMI.
         Our software is a molecular biology analysis and simulation tool. Since the technology is very proprietary, we've used RMI to split the Java software into a front-end GUI client that that's distributed to users and a back-end server that makes use of our in-house C++ tools.
         At the moment our user base is small, mostly a handful of academic researchers, but even with these few releases are getting difficult to manage. The problem, of course, is that when the server back-end is upgraded, if any serializable or remotable APIs are changed, the user must also upgrade their client. Our users have made it clear that this is an unacceptable inconvenience, and since we frequently push new feature-filled releases, its difficult to keep the APIs stable. Additionally, 40% of the original code base is absolute tripe, the inflexible, ill-thought, and monolithic work of a contractor who was at at deadline and had to 'just get the job done'. With only two developers (one of them part-time), we are forced to rewrite portions of this old code in small spurts as most of our time is taken up either adding features or working on the C++ tools. In short, there's simply no way we can stabilize our APIs at this time.
         My first (perhaps naive) solution was simple: the client/server pair are built with a common API version number that is incremented each time the API of a serializable or remotable API must be changed for a new release. This version number is appended to the RMI URI for the server. For example, when using API version 13, if the back-end service is told to listen on the following URI:
         //remote.mycompany.com/myobject
    ...the back-end would implicitly bind to...
         //remote.mycompany.com/myobject-13
         Since the client and server are built with the same API version, the client knows to append -13 to whatever URI the user specifies to connect to a back-end with a compatible API. This lets the user think they're connecting to the 'usual' URI, but allows us to run servers with varying APIs concurrently on the same physical machine, thus our users can upgrade at their leisure and we can push new releases whenever we please.
         I prefer this solution because its very non-intrusive code-wise and allows us developers complete freedom, but it seems prone to subtle problems. We have three releases (hence three servers) and clients are able to function initially, but eventually they start reporting not-bound and class UID/checksum errors - exactly what this system is supposed to prevent. The three services appear to work when started initially but fail sporadically after some period of time. It seems to me that the RMI registry is getting confused when deciding which classes from which service should be sent to which client.
         I should note that rmiregistry requires us to pass in the path to our classes to its JVM (with -J) or it throws NoClassDefFoundError errors when a client connects to the back-end service (if memory serves, our logger is the offending class, so perhaps the registry is executing a static initializer that prints log messages or something). We only pass in the path to one set of classes right now (the oldest of our API revisions). I'm not sure if passing all three would help, but I don't see how it would, and I really don't have the time to experiment. Interestingly, this class path requirement only started happening a few weeks ago - previously rmiregistry didn't seem to care where our logging classes were. I'm not sure if this is contributing to the concurrency problem stated above, but if there's reasonable suspicion I'm more than happy to figure out why this is happening. Also, I remember reading on some web site that setting the rmiregistry class path with -J could cause other strange problems relating to RMI stubs, so could this be a likely suspect? I wish I was more familiar with the guts of RMI as to know what's going on in the registry. Should I be seeing such problems when binding multiple versions of the same class instance?
         I suppose I'd really like, aside from the informed opinions and suggestions of experienced Java programmers, is an architectural overview of the RMI implementation so I can answer these questions myself, but I haven't found anything in that vein. Ideally I'd like to look at the code for the RMI implementation. Is this possible? I'm not 'hip' to Sun's code sharing policies, what portions of their code base they open up if any. Can anyone offer any hints?
         We did come up with some other possible solutions for the API versioning problem. Dynamic class loading via HTTP in particular is my next best hope. Tentatively speaking, it seems that this would help minimize API breakage so long as modifications are limited to adding elements to the API and not removing them. It seems to me that allowing users to download classes at runtime would allow us developers more flexibility, even though users would be forced to upgrade every once in a while, albeit less frequently than they otherwise would.
         Also considered was a separate tool for automated management of the client software, i.e., an auto-update utility. I'd rather not go down this path; I think it would annoy our users, and our two-man development team is busy enough without worrying about more cruft.
         Any additional suggestions are welcome, as is any insight into the Sun's RMI implementation. Advice, links to documentation, "hey stupid, google for <somthing obvious>" would be appreciated.
    Cheers :-)
    -Nick

    or you could buy mine (http://www.rmiproxy.com/javarmi), but I'll give you three tips:
    (1) If possible don't change existing interfaces, just extend them, i.e. version them by extending them:
    public interface MyRemoteVersion1 extends Remote {}
    public inteface MyRemoteVersion2 extends MyRemoteVersion1 {}This way old clients can still use the old services even if they receive a newer stub.
    (2) Do the same with the implementations, and load & register both, with different names as ou are doing. Don't use the same class name for a new version otherwise you will confuse the class loader. Altneratively you could use different class loaders for teh different versions to keep them separate, but that's a large can of worms.
    (3) Ignore your feelings about the code base. It's installed out there and it's a product now, you just have to live with it unless you can instaneously upgrade all your clients, which you can't. You will probably always have a client running the original version for reasons entirely beyond your control.
    (4) Do use the codebase feature if you possibly can. Don't install anything at a client that it could get via a codebase, e.g. stubs. The only thing that clients should need is the remote interfaces and the the true client code.
    (5) Make sure every version of every marshalled class has the same setversionuid and make sure that this is there from the beginning. Make sure you only evolve these classes in ways which will be compatible under serialization - see the spec.
    Good luck
    EJP

  • Is the RMI registry "process-atomic"?

    Hi,
    Sorry if this is a really stupid question, and I have really tried to find this out on my own.
    When I say "process" I mean Process, as opposed to Thread.
    What I mean is, if one Process calls Registry.bind( String, Remote ), can we be sure that another Process which does the same thing one nanosecond later will get an AlreadyBoundException if it calls with the same String?
    The context is that up to now I have been starting the RMI Server (only for logging at the mo, these are my first steps) explicitly in a Process. But now I want to move to "lazy" startup of the RMI registry and of the Server... so I would go LoggerInterface.log( bindingName, message ), and if the name "bindingName" is not presently in the registry it will create a new Server, and log the message using it.
    More specifically, this is about me trying to automate OpenOffice apps using Java... and it occurs to me that 2 events could indeed happen almost simultaneously, so in fact even explicitly starting up the Server in each handler module might encounter "Process concurrency" problems ... so I need to have an answer to this.
    I hope the answer is yes... otherwise I'm going to be a bit flummoxed about how to ensure one doesn't start up one Server Process from one calling Process, and another Server Process from another calling Process.
    Thanks

    I mean to use rebind() instead of the lookup()/bind() pair. It is atomic.... I understand it is atomic, but my point is that between checking whether you need to rebind (because the bound stub is invalid) and actually doing the rebind there will be an interval. If you systematically use rebind, without a prior check to make sure your Remote is actually attached to an existing Process, every call will cause a new Server Process to be created and then rebound, one after another. Which would be a mess.
    I'm going to spend a bit of time looking at your two references... thanks for them.
    I have thought of a possible solution involving a sort of lock, but I'm not sure if it works.
    1. create a "DummyInterface" extending Remote:
    public interface DummyInterface extends Remote {
    }2. in the Process + Thread which actually sets up the Registry, bind a DummyInterface
    Registry reg = null;
    try {
      reg = LocateRegistry.createRegistry( 1099 );
    } catch (RemoteException e) {
      return; // is this right? see below...
    DummyInterface dummyStub = new DummyInterface(){};
    try {
      dummyStub = (DummyInterface) UnicastRemoteObject.exportObject( dummyStub, 0);
    } catch (RemoteException e) {
      // TODO sthg
      e.printStackTrace();
    try {
      reg.bind( "DummyLockForLoggerServer", dummyStub );
    } catch (AlreadyBoundException e) {
      // every Thread in every Process (except the first such) to call "bind" will get here
      return;
    } catch (Exception e) {
      // TODO sthg
      e.printStackTrace();
    }3.     the first Process + Thread which wants to set up the LoggerServer will have first to unbind the DummyLock.
    try {
       reg.unbind( "DummyLockForLoggerServer" );
    } catch (AccessException e) {
       // TODO sthg
       e.printStackTrace();
    } catch (RemoteException e) {
       // TODO sthg
       e.printStackTrace();
    } catch (NotBoundException e) {
      // every Thread in every Process (except the first such) to call "unbind" will get here
      return;
    // only one Thread in one Process will ever succeed in getting here
    // start the LoggerServer
    String qualifiedClassName = ".... rmi.LoggerServer";
    String[] a_commandArgs = { "java", qualifiedClassName, "logName" };
    Process process = null;
    try {
      process = Utils.runSubprocess(a_commandArgs, null, ProcessSettings.getJavaRootDir());
    } catch (IOException e) {
       // TODO sthg
       e.printStackTrace();
    }... however there seem to be one or two questions about this:
    - does reg = LocateRegistry.createRegistry( 1099 ); throw a RemoteException if the Registry is already bound? I don't know and intend to do a few experiments to find this out for myself. But in any event only one Process+Thread can ever bind the dummy lock
    - there might be a race condition nonetheless to do with the interval between creating the Registry and binding the dummy lock... during this interval the Registry is established, and the dummylock is not yet set up... but I think this does no harm, as a Process trying to start the LoggerServer during this time will get the "NotBoundException" and simply return (and the calling thread will then sleep for a bit before trying again).

  • RMI Registry as a service.

    I have found evidence that supports the possibility of rmiregistry.exe running as a service on windows, but I have not found any "How-To" for it. I wrote a batch file to run the command:
    sc create "RMI Registry" binpath= "c:\Program Files\Java\jdk1.6.0_03\jre\bin\rmiregistry.exe" displayname= "RMI Registry" start= "auto"
    However, when I attempt to start the service, I get the message:
    ERROR 1053: The service did not respond to the start or control request in a timely fashion.
    Where did I go wrong or is it just not possible?

    Do some searching in this forum and you may find some more leads. Also: try hard to google for it.
    The registry exe simply does not have the interfacing required to act as a service.
    So what most people do is try to write or obtain a service wrapper that can talk to/be controlled by the service manager, and which can also run the registry exe as another process.

  • Zone with multiple logical interfaces

    Hi,
    How can multiple logical network interfaces be added to a running zone?
    I have configured and installed a whole root zone with one shared-ip network interface.
    Now, I need to add more logical interfaces to the same zone.
    On a physical server with a bge interface, I would create a /etc/hostname file for each logical interface such as
    $ ls /etc | grep host
    hostname.bge0
    hostname.bge0:1
    hostname.bge0:2
    hostname.bge0:3
    hostname.bge0:4
    hostname.bge1
    hostname.bge1:1
    hostname.bge1:2
    hostname.bge1:3
    hostname.bge3
    hosts
    $How can the above be done for a zone?

    Hi
    This requires 2 steps. Firstly update your zone configuration to add the logical interface and its associated IP address.
    Assuming from below you want the logical interface to be added to bge0 then do the following replacing the zonename and ip address for whatever is appropriate for you.
    # zonecfg -z itchyzone
    zonecfg:itchyzone1> add net
    zonecfg:itchyzone1:net> set address=192.168.1.21
    zonecfg:itchyzone1:net> set physical=bge0
    zonecfg:itchyzone1:net> end
    zonecfg:itchyzone1> exitYou can do the above as many times as you like to create multiple logical interfaces for the zone.
    After doing the above you will need to reboot the zone to get the new logical interface.
    However if you cant reboot the zone you can plumb a logical interface into the zone by running something similar to the following (change for your zonename, IP etc) from the global zone:
    # ifconfig bge0 addif 192.168.1.21 netmask + broadcast + zone itchyzone1 upyou will now have an extra interface in the zone (in this case called itchyzone1). To verify, login to the zone and run ifconfig -a and you will see your new interface.
    # zlogin itchyzone1
    [Connected to zone 'itchyzone1' pts/4]
    Last login: Mon Oct  5 22:24:15 on pts/4
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    # ifconfig -a
    lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000
    bge0:2: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
            inet 192.168.1.20 netmask ffffff00 broadcast 192.168.1.255
    bge0:3: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
            inet 192.168.1.21 netmask ffffff00 broadcast 192.168.1.255Hope this helps
    Martin

  • Unable to contact the RMI registry

    Can anyone please help with this error?
    exception: flex.messaging.MessageException: Unable to contact
    the RMI registry on 'localhost' to look for the oldFusion Data
    Management Service: java.rmi.onnectionIOException: error during
    JRMP connection establishment; nested exception is:
    java.net.SocketTimeoutException: Read time out.
    This is a previously working flex app, but a fresh install of
    ColdFusion 7 and I've enabled FDS in CF Admin.

    Can anyone please help with this error?
    exception: flex.messaging.MessageException: Unable to contact
    the RMI registry on 'localhost' to look for the oldFusion Data
    Management Service: java.rmi.onnectionIOException: error during
    JRMP connection establishment; nested exception is:
    java.net.SocketTimeoutException: Read time out.
    This is a previously working flex app, but a fresh install of
    ColdFusion 7 and I've enabled FDS in CF Admin.

  • RMI registry reset

    Hi there,
    I'm writing a RMI application where I need to clean up the RMI registry as soon as the ip address of the server machine changes.
    Let's say that I want to make an object (class Obj) accessible from a RMI client through the following code:
    Obj obj = new Obj();
    UnicastRemoteObject.exportObject(obj,RMIPort); //export the new object
    registry = LocateRegistry.createRegistry(RMIPort); //Create a new registry
    registry.rebind("myObject", obj); //Bind the object to the registryOnce I detect an ip change I need to clean up the register and I need to publish a new Obj object on it. The new object has to accessible from a RMI client instead of the previous. I tried something like:
    UnicastRemoteObject.unexportObject(obj,RMIPort); //unexport the old object
    Obj obj2 = new Obj(); //Create a new object
    UnicastRemoteObject.exportObject(obj2,RMIPort); //export the new object
    registry = LocateRegistry.getRegistry(RMI_PORT);
    registry.rebind("myObject", obj2); //Bind the new object to the registry with the same name "myObject"But when the last line of code is executed, an exception "java.rmi.UnmarshalException: Error Unmarshaling return header" is thrown.
    Do you guys have any suggestions?

    This is the complete stack trace:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.net.SocketException: Connection reset
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
         at pack.net.stud.Stud.reset(Stud.java:184)
         at pack.net.connectors.IPChangeDetector.run(IPChangeDetector.java:74)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 6 moreThanks
    Francesco

  • Cannot connect to the RMI registry.

    SunMC 3.6.1 used to work fine, now get this error when running init.es_server start:
    main: Successfull in setting up firewall support
    Cannot connect to the RMI registry. Please check if the port myserver:2099 is in use or the interfaces are up.
    Listen failed on port: 0; nested exception is:
    java.io.IOException: Unable to get Any Free Port in the Range 2000-6000
    Details as below
    java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
    java.io.IOException: Unable to get Any Free Port in the Range 2000-6000
    * terminating execution *
    netstat shows nothing on this port. Even tried es-config -A but same results.
    Where to look for the source of this trouble?

    Hi wrobbins2,
    wrobbins2 wrote:
    SunMC 3.6.1 used to work fine, now get this error when running init.es_server start:
    main: Successfull in setting up firewall support
    Cannot connect to the RMI registry. Please check if the port myserver:2099 is in use or the interfaces are up.
    Listen failed on port: 0; nested exception is:
    java.io.IOException: Unable to get Any Free Port in the Range 2000-6000
    Details as below
    java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
    java.io.IOException: Unable to get Any Free Port in the Range 2000-6000
    * terminating execution *
    netstat shows nothing on this port. Even tried es-config -A but same results.
    Where to look for the source of this trouble?Did anything change with your NIC/interface settings? Or VPN software installed? IPMP set up? I've seen things like this happen when an interface had been flagged as online... but has no IP info assigned. SunMC is going to try to grab ports on each interface... and if one doesn't have an IP assigned it will fail.
    Regards,
    [email protected]

  • Has the RMI registry properly started?

    I removed all the package statements from the ComputePi example in the java.sun.com rmi tutorial. I compiled all the classes in one folder and also generated the stub and skeleton. Then I said start rmiregistry. Another Dos window briefly appears and vanishes. Then I said java ComputeEngine. Connection refused to host. Nested ecxeption is java.net.ConnectException.... Can anyone tell me what the problem could be. I am not getting any confirmation that the rmi registry started properly. I am using windows 2000 professional.

    Is there a registered process in the Windows task-manager that looks like the registry??

  • Can anybody help me to understand this RMI registry service code?

    RMI is so difficult to me. please let me know following code what it means.
    If this class is instantiated with 50000 port number,
    Does RMI Registry Service get started with 50000 port number in place of rmiregistry commands?
    And I don't have to execute rmiregistry command?
    thanks in advance.
    import java.rmi.AccessException;
    import java.rmi.AlreadyBoundException;
    import java.rmi.NotBoundException;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import java.rmi.registry.Registry;
    import java.rmi.server.ObjID;
    import java.rmi.server.RemoteServer;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import sun.rmi.server.UnicastServerRef;
    import sun.rmi.transport.LiveRef;
    * Registry implementation.
    * @version 1.0
    public class RegistryImpl extends RemoteServer implements Registry {
         private static final long serialVersionUID = -7162736590129110751;
         private Hashtable bindings;
        private static ObjID id = new ObjID(0);
         * @param i port number
         * @throws RemoteException
        public RegistryImpl(int i) throws RemoteException {
            bindings = new Hashtable(101);
            LiveRef liveref = new LiveRef(id, i);
            setup(new UnicastServerRef(liveref));
        private void setup(UnicastServerRef unicastserverref) throws RemoteException {
            super.ref = unicastserverref;
            unicastserverref.exportObject(this, null, true);
         * Lookup a remote object.
         * @param name Name of the remote object.
         * @return Remote object of the specified name.
        public Remote lookup(String name) throws RemoteException, NotBoundException {
    //        Logger.debug("NamingService", "lookup: " + name);
            Remote obj;
            synchronized(bindings) {
                obj = (Remote)bindings.get(name);
                if(obj == null)
                    throw new NotBoundException(name);
            return obj;
         * Binds the specified name to a remote object.
         * @param name A URL-formatted name for the remote object.
         * @param obj A reference for the remote object (usually a stub).
        public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException {
    //        Logger.debug("NamingService", "bind: " + name);
            checkAccess("Registry.bind");
            synchronized(bindings) {
                if(bindings.containsKey(name))
                    throw new AlreadyBoundException(name);
                bindings.put(name, obj);
         * Destroys the binding for the specified name that is associated with a remote object.
         * @param name A URL-formatted name for the remote object.
        public void unbind(String name) throws RemoteException, NotBoundException, AccessException {
    //        Logger.debug("NamingService", "unbind: " + name);
            checkAccess("Registry.unbind");
            synchronized(bindings) {
                if(!bindings.containsKey(name))
                    throw new NotBoundException(name);
                bindings.remove(name);
         * Rebinds the specified name to a new remote object. Any existing binding
         * for the name is replaced.
         * @param name A URL-formatted name for the remote object.
         * @param obj A reference for the remote object (usually a stub).
        public void rebind(String name, Remote obj) throws RemoteException, AccessException {
    //        Logger.debug("NamingService", "rebind: " + name);
            checkAccess("Registry.rebind");
            bindings.put(name, obj);
         * Returns an array of the names bound in the registry.
         * @return An array of the names bound in the registry.
        public String[] list() throws RemoteException {
            String[] names;
            synchronized(bindings) {
                int i = bindings.size();
                names = new String;
    Enumeration e = bindings.keys();
    while(--i >= 0)
    names[i] = (String)e.nextElement();
    return names;
    * TO-DO
    public static void checkAccess(String s) throws AccessException {
    // check if s is in the list of agents.
    if(true)
    else
    throw new AccessException("");
    public static ObjID getID() {
    return id;

    You don't have any need to understand this code. The complication is due to the registry needing a fixed objectID.
    You just need to know the methods of java.rmi.registry.LocateRegistry class. This allows you to start an RMI Registry inside your JVM and give it any TCP port number you like.

  • Simple question about java.rmi.registry.Registry

    Hi,
    where the object java.rmi.registry.Registry takes a URL to rmiregistry when perform bind method.
    thanks.

    Ok, will try to explain.
    I have a server that I register in the RMI registry. Client from a remote machine get the server (as a remote object) and calls his method for the generation of another object on the parameters passed. The server creates this object and tries to register it in the RMI registry, and this raises an exception Registry.Registry.rebind disallowed; origin /11.0.10.31 is non-local host.
    11.0.10.31 is a IP - address of the client

  • Error in udev change of net interface name wlan0 to wlp3s0

    My quite fresh installation of Arch has started having the following problem:
    the udev rename of my wireless interface from wlan0 to wlp3s0 suddenly stopped working!
    In journalctl, I find the following error line:
    Jan 09 16:23:43 mole systemd-udevd[180]: error changing net interface name wlan0 to wlp3s0: Device or resource busy
    I am using netctl, netctl-auto and netctl-plugd with wpa-supplicant and dhcpd. The issue seems to be that netctl tries to do stuff with wlan0 before udev can rename it, as a  non-predictable race condition. Further down in journal, I have this (non-error) line
    Jan 09 16:23:43 mole systemd[1]: Started (Re)store the netctl profile state.
    Searching Google yielded me a few places talking about this, but no solution as I could see, and they were also possibly quite outdated.
    My ethernet interface is properly renamed and works without issues. I should perhaps also mention that my install is now about 3 weeks old, and I have rebooted the machin a number of times before this behaviour started. In this time I also switched from netctl to wicd back to netctl, and the last switch was only a few days ago.
    I have brainlessly tried various stuff, such as disabling netctl-auto and netctl-plugd for all interfaces, as well as adding a custom renaming rule to
    /etc/udev/rules.d/10-network.rules
    . Needless to say, this didn't resolve my problem.
    In case it is important, I have the following services pertaining to networking running:
    UNIT LOAD ACTIVE SUB DESCRIPTION
    dhcpcd.service loaded active running dhcpcd on all interfaces
    [email protected] loaded failed failed Automatic wireless network connection using netctl profiles
    [email protected] loaded active running Automatic wired network connection using netctl profiles
    netctl.service loaded active exited (Re)store the netctl profile state
    netctl@wlan0_eduroam.service loaded active exited Networking for netctl profile wlan0_eduroam
    polkit.service loaded active running Authorization Manager
    systemd-udev-trigger.service loaded active exited udev Coldplug all Devices
    systemd-udevd.service loaded active running udev Kernel Device Manager
    systemd-update-utmp.service loaded active exited Update UTMP about System Reboot/Shutdown
    wpa_supplicant.service loaded active running WPA supplicant
    Is it right to have netctl.service activated?
    Any help is greatly appreciated.
    Thanks,
    jsrn

    Thanks for the reply, lspci. With the same no. as your question:
    1. Right now I have both wlp3s0_[some interfaces] and wlan0_[same interfaces] since I need both interfaces. All of the names are correct, and their configs are the same expect of course for the Interface-line. I also have an enp0s25_dhcp for my wired connection.
    2. and 3. The custom udev rule that I made after the problem started occurring is in /etc/udev/rules.d/10-network.rules and contains
    SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="a4:4e:31:cd:5d:64", NAME="wlp3s0"
    I can't seem to detect that it has any influence or is even run. But on the other hand, it is exactly this that udev was already trying to do but failing.
    4. I could of course do this. But shouldn't it work without conflicting with the udev rename? The wiki currently recommends exactly these two services.
    Right now my system works, albeit more manually than I would hope. I am on wireless right now, but if I lose connection (bad reception here), then I have to stop the netctl service on wlan0, down the wlan0 link and then restart netctl on wlan0. Also, whenever switching wireless network or to wired, I expect to have to do similar tedious stuff.

  • How to handle multiple inbound interfaces with WSDL messages

    Hi All,
    We have a synchronous: Abap Proxy -> XI -> WebService Scenario. The webservice has multiple SoapActions e.g. SearchForProduct_WithX, SearchForProduct_WithY each with different message types. We have tried to use the receiver determination to send the request to the correct soapaction using conditions e.g. if field X in the request is populated use SearchForProduct_WithX action/message.
    But when we run it through the proxy we get this error:
      <CODE>IF_DETERMINATION.TOO_MANY_IIFS_CASE_BE</CODE>
      <ERRORTEXT>Multiple inbound interfaces not supported for synchronous calls</ERRORTEXT>
    Does anybody know how we can get around this or how best to deal with the multiple soap actions per wsdl situation.

    Hi Yaghya,
    We have used conditions in the Interface Determination. Interestingly if we use an HTTP sender adapter we can use this configuration ... but once we try and use ABAP proxies we get the previous error.
    Another related question ... when we use the http adapter we get a connection time out exception. Same thing happens if we try and use the wsdl tester at /wsnavigator but we can open the wsdl through the browser. Any idea on this one?
    Thanks for all your help.

  • Bind to RMI registry on remote host

    Is it possible to bing to a RMI registry on remote host. I get a Access exception when I try it. Is there is any work around for this?
    Any help will be greatly appreciated.
    Thanks
    R

    :Like I say, JINI uses a different model to RMI, and you can probably have a look at the forum for that here.
    but a way around it is to create a server which listens for requests, accepts a remote object and a remote object name, and binds those into the registry on which its running - remember that the restriction only applies to registering objects, not to looking them up, so, once the object is registered on the remote host, it can be retrieved quite easily.
    This of course leaves the problem of exception ahandling aside, but I trust the problems there are obvious

Maybe you are looking for

  • I bought dragon dictate with my mac pro. NO DVD DRIVE.. now what do i do?

    Can I return it and just get the dragon express in apps? My mom got this Mac book for school and I am paralyzed. I need a talk to text app. She bought the Dragon and we did not know the mac did not have a dvd drive (this is my first mac) PLEASE HELP.

  • How do I marshall a list using javax.xml.bind.annotation?

    Hopefully this is so simple a cave man could do it. I had to remove the Duke Stars for the time being. I found another bug in the program that may have resulted in my array being empty. I'm trying to marshall a standalone document of my DeckImpl clas

  • 2012 iMac 27" Desktop Flashing to Grey ~ 2 seconds

    I have two 2012 27" iMacs in my office, both of them have just started a new behavior where the desktop flashes grey & then back to normal every two seconds or so. They've developed it simultaneously so I assume its a recent update "feature"? Sometim

  • Weblogic 10.3 - Arrays and JAX-RPC Web Services

    We are currently looking at migrating from WL 8.1 to WL 10.3, and have an issue with some of our web services (JAX-RPC) with regards to returning String arrays. We have a web service method that returns a response object. This response object has man

  • Strange behavior with videos...

    I place 4 different videos in one page. Video01, Video02, etc Every video has a custom poster. But when click Video04 the iPad viewer and desktop viewer plays Video03 or Video02 Any advice?