MobileFirst Server V8.0.0에서 작동하도록 기존 어댑터 마이그레이션

improve this page | report issue

개요

MobileFirst Server v8.0부터 어댑터는 Maven 프로젝트입니다. 이전 버전의 MobileFirst Server에서 개발된 어댑터를 업그레이드하는 방법에 대해 학습합니다.

이 페이지에서는 MobileFirst Server V6.2 이상에 대해 작동하도록 개발된 어댑터를 MobileFirst Server v8.0에 대해 작동하도록 마이그레이션하기 위해 수행해야 하는 단계를 설명합니다.
우선 v8.0에서 더 이상 사용되지 않는 기능 및 API 요소와 서버 측 API 변경사항에서 설명하는 어댑터 API의 변경사항을 살펴보십시오.

마이그레이션 지원 도구로 어댑터 마이그레이션

마이그레이션 지원 도구로 기존 어댑터를 더 쉽게 마이그레이션합니다. 자세한 정보는 여기를 참조하십시오.

MobileFirst Server v8.0에서 기존 어댑터를 그대로 사용

다음 기준에 일치하지 않는 경우 기존 어댑터를 MobileFirst Server v8.0에 그대로 배치할 수 있습니다.

어댑터 유형 조건
Java PushAPI 또는 SecurityAPI 인터페이스 사용
JavaScript
  • IBM Worklight V6.2 이하를 사용하여 빌드되었습니다.
  • HTTP 또는 SQL이 아닌 연결 유형을 사용합니다.
  • securityTest 사용자 정의가 있는 프로시저 포함
  • 사용자 ID로 백엔드에 연결하는 프로시저 포함
  • 다음 API를 사용합니다.
    • WL.Device.*
    • WL.Geo.\*
    • WL.Server.readSingleJMSMessage
    • WL.Server.readAllJMSMessages
    • WL.Server.writeJMSMessage
    • WL.Server.requestReplyJMSMessage
    • WL.Server.getActiveUser
    • WL.Server.setActiveUser
    • WL.Server.getCurrentUserIdentity
    • WL.Server.getCurrentDeviceIdentity
    • WL.Server.createEventSource
    • WL.Server.createDefaultNotification
    • WL.Server.getUserNotificationSubscription
    • WL.Server.notifyAllDevices
    • WL.Server.notifyDeviceToken
    • WL.Server.notifyDeviceSubscription
    • WL.Server.sendMessage
    • WL.Server.createEventHandler
    • WL.Server.setEventHandlers
    • WL.Server.setApplicationContext
    • WL.Server.fetchNWBusinessObject
    • WL.Server.createNWBusinessObject
    • WL.Server.deleteNWBusinessObject
    • WL.Server.updateNWBusinessObject
    • WL.Server.getBeaconsAndTriggers
    • WL.Server.signSoapMessage
    • WL.Server.createSQLStatement

Java 어댑터를 MobileFirst Server v8.0을 위한 Maven 프로젝트로 마이그레이션

  1. adapter-maven-archetype-java 원형을 사용하여 Maven 어댑터 프로젝트를 작성하십시오. artifactId 매개변수를 설정하는 경우 어댑터 이름을 사용하고 package 매개변수의 경우 기존 Java 어댑터의 패키지와 동일한 패키지를 사용하십시오. 자세한 정보는 Java 어댑터 작성을 참조하십시오.
  2. 1단계에서 작성한 새 어댑터 프로젝트의 src/main/adapter-resources 폴더에 있는 어댑터 디스크립터 파일(adapter.xml)을 겹쳐쓰십시오. 디스크립터에 대한 세부사항은 Java 어댑터 디스크립터 파일을 참조하십시오.
  3. 새 어댑터 프로젝트의 src/main/java 폴더에서 모든 파일을 제거하십시오. 그런 다음 폴더 구조는 동일하게 유지하면서 이전 Java 어댑터 프로젝트의 src/ 폴더에서 모든 Java 파일을 복사하십시오. 이전 어댑터의 src 폴더에 있는 모든 비Java 파일을 새 어댑터의 src/main/resources 폴더로 복사하십시오. 기본적으로 src/main/resources는 존재하지 않습니다. 따라서 어댑터에 비Java 파일이 포함되어 있는 경우 이를 작성하십시오. Java 어댑터 API의 변경사항에 대한 자세한 정보는 v8.0에서 서버 측 API 변경사항을 참조하십시오.

    다음 다이어그램은 v7.1까지의 어댑터 구조와 v8.0부터의 Maven 어댑터 구조를 설명합니다.

    ├── adapters
     │   └── RSSAdapter
     │       ├── RSSAdapter.xml
     │       ├── lib
     │       └── src
     │           └── com
     │               └── sample
     │                   ├── RSSAdapterApplication.java
     │                   └── RSSAdapterResource.java
    

    Java 어댑터의 새 구조:

    ├── pom.xml
     ├── src
     │   └── main
     │       ├── adapter-resources
     │       │   └── adapter.xml
     │       └── java
     │           └── com
     │               └── sample
     │                   ├── RSSAdapterApplication.java
     │                   └── RSSAdapterResource.java
    
  4. 다음 메소드 중 하나를 사용하여 Maven 저장소에 없는 JAR 파일을 추가하십시오.

JavaScript 어댑터를 MobileFirst Server v8.0을 위한 Maven 프로젝트로 마이그레이션

  1. adapter-maven-archetype-http 또는 adapter-maven-archetype-sql 원형을 사용하여 Maven 어댑터 프로젝트를 작성하십시오. artifactId 매개변수를 설정하는 경우 어댑터 이름을 사용하십시오. 자세한 정보는 JavaScript 어댑터 작성을 참조하십시오.
  2. 1단계에서 작성한 새 어댑터 프로젝트의 src/main/adapter-resources 폴더에 있는 어댑터 디스크립터 파일(adapter.xml)을 겹쳐쓰십시오. 디스크립터에 대한 세부사항은 JavaScript 어댑터 디스크립터 파일을 참조하십시오.
  3. 새 어댑터 프로젝트의 src/main/adapter-resources/js 폴더에 있는 Javascript 파일을 겹쳐쓰십시오.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on June 29, 2020