Do not use WebLogic RMI API calls

This rule detects the use of Oracle WebLogic RMI API calls. Replace the WebLogic RMI API calls with JavaSoft RMI API calls. An automated fix will be provided for this rule. Note: RMI API calls are only migrated if there is an analogous JavaSoft API. The following table shows the JavaSoft RMI packages.

Package Names
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server

The following example illustrates the code to be migrated, .

Example of the code before migration:

import java.net.MalformedURLException;
import weblogic.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.Remote;;
import java.rmi.RemoteException;

...

void main( String[] args ) {
Remote remote = Naming.lookup("NameLookup");
Remote remote2 = weblogic.rmi.Naming.lookup("NameLookup");

CallRouter callRouter = new weblogic.rmi.cluster.CallRouter();
weblogic.rmi.cluster.CallRouter callRouter2 = new weblogic.rmi.cluster.CallRouter();

}
Example of Code after migration:

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

...

void main( String[] args ) {
Remote remote = Naming.lookup("NameLookup");
Remote remote2 = java.rmi.Naming.lookup("NameLookup");

CallRouter callRouter = new weblogic.rmi.cluster.CallRouter();
weblogic.rmi.cluster.CallRouter callRouter2 = new weblogic.rmi.cluster.CallRouter();

}