This rule detects the use of Oracle WebLogic RMI API calls. Replace the WebLogic RMI API calls with JavaSoft
RMI API calls. A quick fix for this rule is available in the source scanner.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, followed by the application of the quick fix.
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();
}
span class="Code">
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();
}