-1

I executing migration from a mobilefirst 7.0 project to mobilefirst 8.0

In 7.0 project there are some java files that does not belong to Adapters, but to server (utils and constant classes, for example).

Checking official documentation for migration purposes, I have not beenable to find anything about how to manage these kind of files.

Anyone could provide me some information about how to migrate this logic?

  • In MFP 7.0, how were these class files used? Where those placed in server/lib folders? And within MFP server , where were these classes used? Within adapters? – Vivin K Jun 28 '18 at 15:49
  • where are these custom java files used from ? are you trying to use these libraries from inside the adapter ? if so check here https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/upgrading/migrating-adapters/#migrating-java-adapters-to-maven-projects-for-mobilefirst-server-v-80 . Point #4 Using either of the following methods, add any JAR files that are not in the Maven repository: Add the JAR files to a local repository, as described in Guide to installing third-party JARs, then add them to dependencies element. Add the JAR files to the dependencies – Kavitha Varadarajan Jun 29 '18 at 02:30
  • @VivinK The classes are inside the mobilefirst project, in a server.java folder. – Alberto Martín-Benito Jun 29 '18 at 08:15
  • @AlbertoMartín-Benito, and where are these classes used? Do you use it in your Javascript adapters? Are these classes used as your customloginmodule? – Vivin K Jun 29 '18 at 15:24
  • @VivinK One of these classes is used as my ConfiguredIdentityLoginModule, and others, I use them in my only Java adapter in the PushAdapterResource.java class, as input services or entries to make modifications or notifications. But I also have other types of classes such as MongoDB connections, and a Current server build level configuration, such as constants.java class. – Alberto Martín-Benito Jul 02 '18 at 07:37

2 Answers2

0

We had similar issue but we tackled it by moving the code to Javascript adapters(incase of static values). But in case of Pure Java code you have to use Java adapter because in MFP 8 we cannot put java files in the servers as the concept of WAR deployment is not there.

Arun Punnath
  • 121
  • 5
0

With MFP 8.0, the concept of packaging custom Java classes within the runtime war file does not exist.

However, you can still use the custom Java classes:

  1. For the custom Java classes that would become your CustomLoginModule/Authenticator:

    With MFP 8.0, customLoginModules and authenticators are replaced by SecurityCheck adapters. These are maven projects. The validation and code that was in your custom classes can be in your SecurityCheck adapter project.

    Details here.

  2. For custom Java classes that are invoked from Javascript adapters:

    Javascript adapters are also maven projects. And the custom classes can be a part of the JS adapter project.

    Details here.

  3. Any other common / utility classes/jar files:

    Add any JAR files that are not in the Maven repository:

More reading about migrating adapters from earlier versions to MFP 8.0.

Vivin K
  • 2,681
  • 1
  • 11
  • 14