Tivoli Composite Application Manager for SOA, Version 7.1.1

Enabling data collection manually

You might have used a custom plan file to deploy your WebSphere® CE application. If so, then you need to perform some additional manual steps to enable these WebSphere CE applications for the data collector:

  1. If you have not already run the KD4configDC command to enable other WebSphere CE applications that use the default plan file, you must run the KD4configDC command (using the procedure described in the previous section) once to place the necessary JAR files into their correct locations. Specify an empty file as the value for the -file parameter. This results in the message KD4CF0038E being displayed, indicating that there are no applications to be enabled. You can ignore this message.

    If you have already run the KD4configDC command for at least one WebSphere CE application that uses the default plan file, then this step is already completed and you do not need to run the utility again.

  2. Edit the custom deployment plan file. Within each <web-app> or <openejb-jar> element, add the following <dependency> and <hidden-classes> elements:
    <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    <uri>KD4/kd4dcagent/6.0/jar</uri>
    </dependency>
    <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    <uri>KD4/ibm-jaxrpc-client/6.0.2/jar</uri>
    </dependency>
    <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    <filter>com.ibm.wsdl</filter>
    </hidden-classes>
    <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    <filter>javax.wsdl.factory.WSDLFactory</filter>
    </hidden-classes>

    The following example shows how to add <dependency> and <hidden-classes> elements within a <web-app> element:

    <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
        xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
        xmlns:security="http://geronimo.apache.org/xml/ns/security-1.0"
            configId="com/ibm/j2g/webservices.war">
         <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    	    <uri>KD4/kd4dcagent/6.0/jar</uri>
     </dependency>
     <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0"> 
    	    <uri>KD4/ibm-jaxrpc-client/6.0.2/jar</uri>
     </dependency>
     <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
    	    <filter>com.ibm.wsdl</filter>
     </hidden-classes>
     <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
         <filter>javax.wsdl.factory.WSDLFactory</filter>
     </hidden-classes>
    
    <context-root>/webservices</context-root>
    <context-priority-classloader>false</context-priority-classloader>
    </web-app>

    The following example shows how to add <dependency> and <hidden-classes> elements within an <openejb-jar> element:

    <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar"
           configId="com/ibm/dw/bookshop" parentId="BookShopDB">
         <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
             <uri>KD4/kd4dcagent/6.0/jar</uri>
         </dependency>
         <dependency xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
             <uri>KD4/ibm-jaxrpc-client/6.0.2/jar</uri>
         </dependency>
         <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
            <filter>com.ibm.wsdl</filter>
         </hidden-classes>
         <hidden-classes xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
            <filter>javax.wsdl.factory.WSDLFactory</filter>
         </hidden-classes>
    
       <enterprise-beans>
           <entity>
              <ejb-name>CategoryBean</ejb-name>
              <jndi-name>CategoryBean</jndi-name>
           	   <table-name>categories</table-name>
            	   <cmp-field-mapping>
                   <cmp-field-name>catId</cmp-field-name>
                   <table-column>catId</table-column>
                 </cmp-field-mapping>
      	    	   <cmp-field-mapping>
    			        <cmp-field-name>name</cmp-field-name>
                   <table-column>name</table-column>
                 </cmp-field-mapping>
      	   	   <resource-ref>
            	      <ref-name>jdbc/basic/BookShopDatabase</ref-name>
            	      <application>null</application>
            	      <module>BooksShopDB</module>
            	      <name>BookShopDBPool</name>
    	            </resource-ref>
           </entity>
       </enterprise-beans>
    </openejb-jar>
  3. Add the IBM Tivoli Composite Application Manager for SOA server side handler to all of the handler chains in the webservices.xml files within the application (if the application does not contain webservices.xml, skip this step).

    Modify the webservices.xml files by adding the following lines:

    <handler>
        <handler-name>KD4ServerHandler</handler-name>
        <handler-class>
          com.ibm.management.soa.agent.wasce.ITMWASCEServerHandler
        </handler-class>
    </handler>

    The following example shows how to add the server side handler to the webservices.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <webservices xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1">
        <webservice-description>
            <webservice-description-name>SearchPhones</webservice-description-name>
            <wsdl-file>WEB-INF/wsdl/search-phones-service.wsdl</wsdl-file>
            <jaxrpc-mapping-file>
              WEB-INF/search-phones-server-mapping.xml
            </jaxrpc-mapping-file>
            <port-component>
                <port-component-name>SearchPhonesService</port-component-name>
                <wsdl-port>SearchPhonesService</wsdl-port>
                <service-endpoint-interface>
                  com.ibm.j2g.webservices.server.SearchPhonesPortType
                <service-endpoint-interface>
                <service-impl-bean>
                    <servlet-link>SearchPhonesServer</servlet-link>
                </service-impl-bean>
                <handler>
                		<handler-name>KD4ServerHandler</handler-name>
                		<handler-class>
                        com.ibm.management.soa.agent.wasce.ITMWASCEServerHandler
                   	</handler-class>
     	          </handler>      </port-component>
       </webservice-description>
    </webservices>

    If there are multiple <port-component> elements, you must add one <handler> element within each <port-component> element.

  4. If the application contains a web.xml file and the web.xml file includes a <service-ref> element, you must add the IBM Tivoli Composite Application Manager for SOA client handler to the handler chain in the web.xml file. If there is no web.xml file or an existing web.xml file does not include a <service-ref> element, skip this step.

    Modify the web.xml file by adding the following lines:

    <handler>
        <handler-name>ClientHandler</handler-name>
        <handler-class>
          com.ibm.management.soa.agent.wasce.ITMWASCEClientHandler
        </handler-class>
    </handler>

    The following example shows how to add the client handler to the handler chain in the web.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <servlet>
        <servlet-name>SearchPhonesServer</servlet-name>
        <servlet-class>
          com.ibm.j2g.webservices.server.SearchPhonesServer
        </servlet-class>
      </servlet>
      <servlet-mapping>
         <servlet-name>SearchPhonesServer</servlet-name>
         <url-pattern>/server</url-pattern>
      </servlet-mapping>
      <service-ref>
         <service-ref-name>service/SearchPhones</service-ref-name>
            <service-interface>
               com.ibm.j2g.webservices.client.SearchPhonesService
            </service-interface>
         <wsdl-file>WEB-INF/wsdl/search-phones-service.wsdl</wsdl-file>
         <jaxrpc-mapping-file>
            WEB-INF/search-phones-client-mapping.xml
         </jaxrpc-mapping-file>
         <handler>
            <handler-name>KD4ClientHandler</handler-name>
            <handler-class>
               com.ibm.management.soa.agent.wasce.ITMWASCEClientHandler
            </handler-class>
         </handler>
       </service-ref>
    </web-app>           
  5. If the application contains the ejb-jar.xml file and the ejb-jar.xml file includes the <service-ref> element, you must add the IBM Tivoli Composite Application Manager for SOA client handler to the handler chain in ejb-jar.xml file. If there is no ejb-jar.xml file in the application, or if an existing ejb-jar.xml file does not include the <service-ref> element, skip this step.

    The following example shows how to add the client handler to the handler chain in the ejb-jar.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
    	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
         http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
       <enterprise-beans>
         <session>
           <ejb-name>BookShopEJB</ejb-name>
          	<local-home>com.ibm.dw.bookshop.ejb.BookShopLocalHome</local-home>
         	<local>com.ibm.dw.bookshop.ejb.BookShopLocal</local>
         	<ejb-class>com.ibm.dw.bookshop.ejb.BookShopBean</ejb-class>
         	<session-type>Stateless</session-type>
         	<transaction-type>Container</transaction-type>
         	<service-ref>
         	  <service-ref-name>service/Service</service-ref-name>
         	  <service-interface>javax.xml.rpc.Service</service-interface>
    	        <wsdl-file>META-INF/wsdl/CurrencyExchangeService.wsdl</wsdl-file>
              <jaxrpc-mapping-file>
                 META-INF/client-jaxrpc-mapping.xml
              </jaxrpc-mapping-file>
              <service-qname xmlns:ns=
                "http://www.xmethods.net/sd/CurrencyExchangeService.wsdl">
                ns:CurrencyExchangeService
              </service-qname>
              <handler>
        	       <handler-name>KD4ClientHandler</handler-name>
        	       <handler-class>
                  com.ibm.management.soa.agent.wasce.ITMWASCEClientHandler
                </handler-class>
              </handler>
            </service-ref>
          </session>
        </enterprise-beans>
     </ejb-jar>
  6. Redeploy the application into the application server.



Feedback

[ Top of Page | Previous Page | Next Page | Contents | Index ]