Questa regola rileva l'utilizzo di chiamate API RMI WebLogic Oracle. Sostituire le chiamate API RMI WebLogic con
chiamate API RMI JavaSoft. Per questa regola verrà fornita una correzione automatica. <Strong>Nota:</Strong> le chiamate API RMI vengono migrate solo se è presente un'API JavaSoft analoga. La seguente tabella
mostra i package RMI JavaSoft.
| Nomi dei package |
|
java.rmi
|
|
java.rmi.activation
|
|
java.rmi.dgc
|
|
java.rmi.registry
|
|
java.rmi.server
|
L'esempio seguente illustra il codice da migrare,.
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");
Remoto remote2 = weblogic.rmi.Naming.lookup ("NameLookup");
CallRouter callRouter = new weblogic.rmi.cluster.CallRouter();
weblogic.rmi.cluster.CallRouter callRouter2 = new weblogic.rmi.cluster.CallRouter();
}
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();
}