DEPLOYMENT
Package customized code in library EAR:
Once all the classes are created and implemented, generate the required ear deployments. The following two EARs need to be created: com.ofss.digx.cz.app.extsystem.ear and obdx.cz.app..domain.ear.
To generate an EAR in eclipse, we need to create an Enterprise Application Project and include the required project/s during the creation.The REST IDM (“obdx.app.rest.idm.ear”) already deployed on the server must be modified in order to get the CZ EARs deployment working.
For the purpose two modifications must be done:
- Add the CZ EARs in the weblogic-application.xml file located at obdx.app.rest.idm.ear/META-INF/ weblogic-application.xml. Changes are depicted below:
- Add CZ Servlet and the servlet mapping in the web.xml file located at obdx.app.rest.idm.ear/com.ofss.digx.appx.service.rest.war/WEB-INF/web.xml. The changes are depicted below
web.xml file already has so many servlets, do not change them, just add the CZ Servlet
In the above CZ servlet the “Register my custom provider” part of init-params tag is depicted below:
- Add the CZ EARs in the weblogic-application.xml file located at obdx.app.timer.ear/META-INF/ weblogic-application.xml. Redeploy the timer ear.
Deploying application in Weblogic:
The two EARs created should be deployed in the existing deployment setup. Please deploy the com.ofss.digx.app.rest.idm.ear as an application and com.ofss.digx.cz.app.extsystem.ear and obdx.app.cz.domain.ear as library.
Test the application:
Once the application is up, please go to the deployments section of the Weblogic Server. In the control option, you’ll find the option to test the application. Just to verify, check whether the context-root of the custom application is changed to digx/cz. The request URL for testing this application will be –s
http://<hostname>:<port>/digx/cz/v1/application.wadl