Skip to content

Migrate Tentackle Application from RMI to TRIP

This document describes how to migrate an older Tentackle application from RMI to the new TRIP protocol. For the rationale and a full description of the protocol, see the TRIP documentation.

modify the parent pom.xml

Modify the file pattern in the wurbelizer-maven-plugin configuration from rmi to trip

Rename folders and modify imports

  • All folders with the name rmi should be renamed to trip
  • run the build: the wurblets will overwrite the old code with the new one
  • replace in all imports .rmi. with .trip.

Replace the rmi templates in the templates folder

Copy RemoteImplementation.ftl and RemoteInterface.ftl from the tentackle archetype sources to the templates folder of your application.

Locate the application's connection implementation

(such as MyAppConnectionImp.java), which extends RemoteDbConnectionImpl and modify the constructor from:

public MyAppConnectionImpl(RmiServer server, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
          throws RemoteException {

to:

public MyAppConnectionImpl(TripServer server, Transport transport) {
  super(server, transport);
}

and modify createSession to:

public RemoteDbSession createSession(SessionInfo clientInfo) {
    return new MyAppRemoteDbSessionImpl(this, clientInfo, getServer().getSessionInfo());
}

Note that there are no checked exceptions like RemoteException anymore and remove it from the constructor of the session implementation as well.

Check replaced DefaultDomainContextFactory, if any

Check that public DomainContext create() is overridden.

Edit the backend.properties

Change the rmi protocol to trip or trips.