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
rmishould be renamed totrip - 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:
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.
Related Documentation¶
- TRIP — Tentackle Remote Invocation Protocol — the protocol you are migrating to, including its transport schemes (
trip,trips, …). - Session — session and connection handling affected by the migration.
- PDO / Persistent Domain Objects — the objects that travel between client and server.