Topic
  • 3 replies
  • Latest Post - ‏2012-10-04T16:43:32Z by ddougherty
ddougherty
ddougherty
21 Posts

Pinned topic WL 503 custom war install on WAS

‏2012-09-25T17:17:56Z |
Hi,

The default IM install on WAS creates a custom property on the JVM for worklight.home and installs the worklight ear and war with parent classloader last.

The custom war install in the Admin guide section 2.7 does not mention these steps anymore, are they still necessary?

thanks,
dave
  • ddougherty
    ddougherty
    21 Posts

    Re: WL 503 custom war install on WAS

    ‏2012-09-25T19:13:25Z  
    These steps are documented in Appendix B but the main line doc only references Appendix B for 5002 installations.

    The IM install also defines the Worklight shared library and references from the worklight.war. So I guess my question has morphed into what is necessary to install a custom worklight. war. This is the appendix B stps

    1. define the WL INSTALL root - the IM install does not appear to do this - is it necessary?
    2. set the worklight home on the JVM - IM install does this, so I assume I have to do it on a manual WAS install
    3. create WL shared lib - IM install does this, so I assume I have to do this on a manual WAS install
    4. JDBC provider and DS setup - this has to be done on a manual install
    5. install the custom war - map the shared lib and context root
    6. set the parent last classloader on the ear and war - IM does this so I assume I have to do this on a manual WAS install
    7. set the classloader to single on the server - IM does NOT do this - is this necessary ?
  • MichaelOrtman
    MichaelOrtman
    35 Posts

    Re: WL 503 custom war install on WAS

    ‏2012-10-02T18:48:49Z  
    These steps are documented in Appendix B but the main line doc only references Appendix B for 5002 installations.

    The IM install also defines the Worklight shared library and references from the worklight.war. So I guess my question has morphed into what is necessary to install a custom worklight. war. This is the appendix B stps

    1. define the WL INSTALL root - the IM install does not appear to do this - is it necessary?
    2. set the worklight home on the JVM - IM install does this, so I assume I have to do it on a manual WAS install
    3. create WL shared lib - IM install does this, so I assume I have to do this on a manual WAS install
    4. JDBC provider and DS setup - this has to be done on a manual install
    5. install the custom war - map the shared lib and context root
    6. set the parent last classloader on the ear and war - IM does this so I assume I have to do this on a manual WAS install
    7. set the classloader to single on the server - IM does NOT do this - is this necessary ?
    5002 installations should be very similar, if not identical, to a 5003 installation process for WAS. I reviewed the Appendix B steps and they look correct to me. I would follow the Appendix B steps and follow up if you have an problems.
  • ddougherty
    ddougherty
    21 Posts

    Re: WL 503 custom war install on WAS

    ‏2012-10-04T16:43:32Z  
    So here is what if found out:

    The manual install of a custom war has the following steps documented in the Admin appendix:
    1. create databases
    2. create tables via worklight provided scripts
    3. create provider and DS's

    4. define worklight.home on JVM
    5. define WL_INSTALL_HOME variable - not necessay if you use full path for the shared library definition
    6. define Worklight Platform Library for worklight-jee-library.jar

    7. Install custom war from Studio
    a. choose detail install
    b. map shared lib to war
    c. set the context root

    8. set the classloader to parent last on ear and war

    9. edit worklight.properties in WAS installedApps directory to correct connectivity settings, context and DB settings

    10. set classloader policy on server to single - I never did this in 502 or 503 - can anyone explain where this came from or why?



    From my findings, you can not install a custom war on a was profile using the above procedure - you get the unable to parse response error on the init call because the content type is not being set correctly. (http://www.ibm.com/developerworks/forums/thread.jspa?threadID=456651&tstart=60)
    If you look at the response headers you will see:

    Content-Language:en-US
    Date:Wed, 03 Oct 2012 00:42:19 GMT
    P3P:policyref="/w3c/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
    Server:WebSphere Application Server/8.0
    Transfer-Encoding:chunked
    X-Powered-By:Servlet/3.0

    instead of the normal:

    Cache-Control:no-cache, must-revalidate
    Content-Language:en-US
    Content-Length:1241
    Content-Type:application/json; charset=UTF-8
    Date:Wed, 03 Oct 2012 01:06:39 GMT
    Expires:Sat, 26 Jul 1997 05:00:00 GMT
    P3P:policyref="/w3c/p3p.xml", CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"
    Server:WebSphere Application Server/8.0
    X-Powered-By:Servlet/3.0

    I have recreated this scenario on two separate WAS profiles.
    So that means for now, you can only install a custom war on a WAS profile that you ran the IM default install against first.

    The procedure then becomes:

    1. reuse the database definitions/setup from the IM install of the default worklight.war OR

    Create a new database setup
    a. create databases
    b. create tables via worklight provided scripts
    c. create provider and DS's

    2. the worklight.home property on the JVM and the shared lib will already be defined

    3. uninstall the default worklight.war

    4. install your custom war
    map lib to war
    set the context root

    5. set classloader to parent last on the ear and war

    6. edit worklight.properties in WAS installedApps directory to correct connectivity settings, context and DB settings