Documentation Center

Upgrading to a Java/JSP Web application-based UGC Community Service microservice (discouraged)

Continuing to use a Web application, containing the UGC Community Service microservice, is deprecated and strongly discouraged. The resources required for such an upgrade are not shipped with the product deliverable.

Procedure

  1. Access the library location of the Web application that contains your UGC Community Web service.
  2. Remove the following JAR files, which this Role no longer uses:
    • asm.jar
    • cd_odata.jar
    • cd_odata_types.jar
    • commons-collections.jar
    • hibernate-jpa-2.0-api.jar
    • jackson-core-asl.jar
    • jackson-jaxrs.jar
    • jackson-mapper-asl.jar
    • jackson-xc.jar
    • jboss-transaction-api_1.1_spec.jar
    • jdbcpool.jar
    • jersey-client.jar
    • jersey-core.jar
    • jersey-json.jar
    • jersey-server.jar
    • jersey-servlet.jar
    • json-smart.jar
    • spring-asm.jar
    • spring-context-support.jar
    • ugc_dynamic.jar
    • ugc_taglib.jar
    • ugc_tcdl.jar
    • ugc_webservice.jar
  3. Also remove the following JAR files, which have a new filename in this Role (showing the version):
    • activation.jar
    • antlr.jar
    • aopalliance.jar
    • cd_ambient.jar
    • cd_broker.jar
    • cd_cache.jar
    • cd_core.jar
    • cd_datalayer.jar
    • cd_dynamic.jar
    • cd_linking.jar
    • cd_model.jar
    • cd_tcdl.jar
    • cd_wai.jar
    • commons-dbcp.jar
    • commons-pool.jar
    • dom4j.jar
    • easylicense.jar
    • guava.jar
    • hibernate-commons-annotations.jar
    • hibernate-core.jar
    • hibernate-entitymanager.jar
    • javassist.jar
    • jaxb-api.jar
    • jaxb-impl.jar
    • jboss-logging.jar
    • jcl-over-slf4j.jar
    • jettison.jar
    • jsoup.jar
    • logback-classic.jar
    • logback-core.jar
    • serializer.jar
    • slf4j-api.jar
    • spring-aop.jar
    • spring-beans.jar
    • spring-context.jar
    • spring-core.jar
    • spring-expression.jar
    • spring-jdbc.jar
    • spring-orm.jar
    • spring-tx.jar
    • stax-api.jar
    • ugc_model.jar
    • ugc_storage.jar
    • xalan.jar
  4. Contact SDL Customer Support to obtain a WAR file for the Content Service, called community-service.war. Unpack this file to a location of your choice, then navigate to the WEB-INF/lib/ folder.
  5. Copy all files in this location to your Role's library location.
  6. Depending on the Web application server you use, remove the following JAR files you just copied:
    Web application serverFile to remove
    Oracle WebLogicstax-api-VERSION.jar
    RedHat JBoss
    • serializer-VERSION.jar
    • stax-api-VERSION.jar
    • xalan-VERSION.jar

    where VERSION is the version number of the JAR file.

  7. Access the configuration location and do one of the following:
    • If you have modified the file logback.xml, merge its contents with that of the file Content Delivery\roles\ugc\service-community\standalone\config\logback.xml.
    • Otherwise, copy Content Delivery\roles\ugc\service-community\standalone\config\logback.xml over your current logback.xml.
  8. In the configuration location, open the following files for editing:
    • cd_webservice_conf.xml
    • cd_storage_conf.xml
    • cd_ambient_conf.xml
  9. From cd_webservice_conf.xml, copy the section called <OData>, with all of its contents, to your clipboard.
  10. In cd_storage_conf.xml, place your cursor before the <License> section and paste the copied code.
  11. Save and close cd_storage_conf.xml.
  12. From cd_webservice_conf.xml, copy the sections called <AuthenticationServer> and <Accounts>, with all of their contents, to your clipboard.
  13. In cd_ambient_conf.xml, place your cursor inside the <Security> section, before the <Rules> subsection or, if there is no <Rules> subsection, just before the closing tag </Security>, and then paste the copied code.
  14. If you use OAuth authentication, add an OAuthEnabled attribute to the Security element and set it to true.
  15. If you use OAuth authentication, add the following subelement inside the Security element:
    <RequestValidator>com.sdl.web.oauth.validator.OAuth2RequestValidator</RequestValidator>
  16. If you use OAuth authentication, cut the <SharedSecret> element out of your Security section and paste it inside the <AuthenticationServer> section you just pasted from cd_webservice_conf.xml, replacing any <SharedSecret> element that is already there.
  17. Add the following Claim elements to your <GloballyAcceptedClaims> section:
    <Claim Uri="taf:tracking:id"/>
    <Claim Uri="taf:claim:contentdelivery:webservice:user"/>
    <Claim Uri="taf:claim:contentdelivery:webservice:post:allowed"/>
  18. Remove all Path elements inside the <ExcludedPaths> section, and add the following Path element:
    <Path>/token.svc</Path>
  19. In your Cartridge element for the UGC Cartridge, add a new attribute called Category and set it to system, so that the element looks like this:
    <Cartridge Category="system" File="ugc_ambient_cartridge_conf.xml" />
  20. Inside the <Cookies> section, add the following subelement:
    <Cookie Type="ADF" Name="TAFContext" />
  21. Save and close cd_ambient_conf.xml.
  22. Close cd_webservice_conf.xml. You can now delete this file.
  23. If your Web application server is WebSphere, in the folder WebSphere/Liberty/usr/servers/defaultServer/, do the following in the file server.xml:
    1. Check for the line <feature>javaee-7.0</feature> (in the featureManager section). If you see it, add the line <feature>cdi-1.0</feature> and save and close server.xml to commit your changes.
    2. Ensure that the file contains an applicationMonitor element with its updateTrigger attribute set to disabled.
  24. Restart the Web application that contains the Role.