Deploying WebORB for Java

WebORB is packaged as a Java library and a J2EE application. The point of entry into WebORB is a servlet, as a result, the container must support the Servlet API v2.3 or above. There are two ways to deploy WebORB:

  1. WebORB can be deployed as a new web application. This deployment results in a separate web application with all the WebORB functionality available out of the box. User classes must be deployed into the application to enable them for remote access. WebORB installer includes an option to create weborb.war file for application server deployment. Most Java containers support automatic application deployment from the war file. Use the links below for instructions specific to a particular container:
     
    Deploying WebORB into Tomcat
    Deploying WebORB into JBoss
    Deploying WebORB into IBM WebSphere
    WebSphere v. 5.x 
    WebSphere v. 6.x
    WebSphere v. 7.x
    Deploying WebORB into BEA WebLogic
    Depoying WebORB into Sun GlassFish

  2. WebORB can be deployed into an existing web application. This requires additional configuration steps to register product servlets and add WebORB configuration and binary files. As soon as WebORB is deployed, application classes are automatically available to Flex, Flash and AJAX clients.
     
    Minimal deployment  (enables POJO remoting)
    Management console deployment
    Spring Framework integration deployment

Follow the steps below to deploy the product into an existing web application:

Minimal deployment
(only POJO remoting, no console, examples, data management, spring support, etc)

  1. Copy weborb-config.xml from:
      [WEBORB_INSTALL]\webapp\WEB-INF\classes
    to
      [YOUR APP PATH]\WEB-INF\classes

     
  2. Copy weborb.jar and jdom-1.1.jar from:
      [WEBORB_INSTALL]
    to
      [YOUR APP PATH]\WEB-INF\lib
     
  3. Modify web.xml from WEB-INF of your web application to include the following:

    <servlet>
      <servlet-name>weborb</servlet-name>
      <servlet-class>weborb.ORBServlet</servlet-class>
      <load-on-startup> 1 </load-on-startup>
    </servlet>

    <servlet>
      <servlet-name>download</servlet-name>
      <servlet-class>weborb.DownloadServlet</servlet-class>
      <load-on-startup> 1 </load-on-startup>
    </servlet>

    <servlet-mapping>
      <servlet-name>download</servlet-name>
      <url-pattern>/codegen.wo</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
      <servlet-name>weborb</servlet-name>
      <url-pattern>*.wo</url-pattern>
    </servlet-mapping>
  4. Create \flex directory under WEB-INF in your web application.
    Copy all files from:
      [WEBORB_INSTALL]\webapp\WEB-INF\flex

    to
      [YOUR APP PATH]\WEB-INF\flex

WebORB Management Console deployment

  1. Follow the steps from the "Minimal deployment" section.
     
  2. Copy weborbconsole.html from:
     [WEBORB_INSTALL]\webapp
    to
      [DOC ROOT OF YOUR APPLICATION]
     
  3. Copy all files from the console folder from:
     [WEBORB_INSTALL]\webapp\console
    to
      [DOC ROOT OF YOUR APPLICATION]\console
     
  4. Copy all files from the weborbassets folder from:
     [WEBORB_INSTALL]\webapp\weborbassets
    to
      [DOC ROOT OF YOUR APPLICATION]\weborbassets
     
  5. Once deployed, the console is available at the following path:

    http://localhost:[port]/[app-context-path]/weborbconsole.html

Spring Framework Integration

  1. Follow the steps from the "Minimal deployment" section.
     
  2. Deploy Spring deployment file to the /WEB-INF directory of your web application. For the simplicity of instructions, assume the file name is applicationContext.xml
     
  3. Modify web.xml from WEB-INF of your web application to include the following:
    <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <listener>
      <listener-class>
        org.springframework.web.context.ContextLoaderListener
      </listener-class>
    </listener>
  4. Copy the following jar files
     [WEBORB_INSTALL]\webapp\WEB-INF\lib\spring-beans.jar
     [WEBORB_INSTALL]\webapp\WEB-INF\lib\spring-context.jar
     [WEBORB_INSTALL]\webapp\WEB-INF\lib\spring-core.jar
     [WEBORB_INSTALL]\webapp\WEB-INF\lib\spring-web.jar
    to
      [YOUR APP PATH]\WEB-INF\lib\
     
  5. Once deployed, you can see the Spring beans in Management Console's service browser (select the Management tab)