3 Replies Latest reply on Jun 1, 2006 7:14 AM by CathyM

    FDS2 config on WAS 6

    sharedvision
      I have uncommented the WebSphere specific elements in web.xml and flex-enterprise-services.xml.
      I have created a new Work Manager with a jndi of wm/MessagingWorkManager.

      I am getting an exception during application launch...

      [5/18/06 12:58:41:069 PDT] 0000000a ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet MessageBrokerServlet: flex.messaging.endpoints.rtmp.RTMPException: WebSphere RTMP Server failed to find WorkManager at java:comp/env/wm/MessagingWorkManager.
      at flex.messaging.endpoints.rtmp.WebSphereNIORTMPServer.<init>(WebSphereNIORTMPServer.java:6 9)
        • 1. Re: FDS2 config on WAS 6
          CathyM Level 1
          Please double-check that you've followed all steps in the instructions -
          http://labs.adobe.com/wiki/index.php/Flex:Install_Instructions#Additional_configuration_fo r_WebSphere_6

          To verify that you've set up the WorkManager and the mapping between the WorkManager resource-ref and resource correctly,

          (a) From the WebSphere admin, choose Resources | Asynchronous Beans | Work managers. By default, the DefaultWorkManager is available at the wm/default jndi-name. If you like, you can add a separate WorkManager for your application.

          (b) From the WebSphere admin console, choose 'Enterprise Applications|flex_war (or whichever Flex war you've deployed), then 'Additional Properties|Mapping resource refs to resources; you should see the Reference Binding=wm/MessagingWorkManager and JNDI Name=wm/default or whatever you used in (a). If you don't see 'Mapping resource refs to resources', you don't have the resource defined in web.xml
          • 2. Re: FDS2 config on WAS 6
            sharedvision Level 1
            I'm still unable to get the flex data samples working in WebSphere V6...

            Here is the relevant element from web.xml...

            <resource-ref>
            <description>Flex Messaging WorkManager</description>
            <res-ref-name>wm/MessagingWorkManager</res-ref-name>
            <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>

            Here is the relevant element from flex-enterprise-services.xml...

            <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
            <endpoint uri="rtmp://{server.name}:2037" class="flex.messaging.endpoints.RTMPEndpoint"/>
            <properties>
            <idle-timeout-minutes>20</idle-timeout-minutes>
            <!-- for deployment on WebSphere, must be mapped to a WorkManager available in the web application's jndi context. -->
            <websphere-workmanager-jndi-name>java:comp/env/wm/default</websphere-workmanager-jndi-nam e>
            <!-- -->
            </properties>
            </channel-definition>

            I am happy to use the default workmanager. I guess I don't see where the mapping occurs between what is in the web.xml and the flex-enterprise-services.xml files.

            When I go to the admin console, I do not see a link for the war file under Enterprise Applications, I see the Enterprise Application I published the war file to. I've looked for the link Cathy referred to, to validate the mapping ("Additional Properties|Mapping resource refs to resources"), but it doesn't exist in my environment. I am publishing the samples in Rational Application Developer V6.0.1.1 with WAS 6.0.2.5.
            • 3. Re: FDS2 config on WAS 6
              CathyM Level 1
              quote:

              Originally posted by: sharedvision
              I'm still unable to get the flex data samples working in WebSphere V6...

              Here is the relevant element from web.xml...

              <resource-ref>
              <description>Flex Messaging WorkManager</description>
              <res-ref-name>wm/MessagingWorkManager</res-ref-name>
              <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
              <res-auth>Container</res-auth>
              <res-sharing-scope>Shareable</res-sharing-scope>
              </resource-ref>

              ...

              When I go to the admin console, I do not see a link for the war file under Enterprise Applications, I see the Enterprise Application I published the war file to. I've looked for the link Cathy referred to, to validate the mapping ("Additional Properties|Mapping resource refs to resources"), but it doesn't exist in my environment. I am publishing the samples in Rational Application Developer V6.0.1.1 with WAS 6.0.2.5.


              If you don't see the 'Mapping resource refs to resources' link, then the application server does not recognize that you have resources defined in web.xml. Be sure that you update web.xml before deploying your web application. If you've already deployed, my suggestion would be to undeploy, restart the server, deploy the new war file with the updated web.xml, and then start the application. If during deployment, you are not asked to resolve the resource-ref then you haven't deployed the updated version of the war file.

              quote:

              Originally posted by: sharedvision
              Here is the relevant element from flex-enterprise-services.xml...

              <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
              <endpoint uri="rtmp://{server.name}:2037" class="flex.messaging.endpoints.RTMPEndpoint"/>
              <properties>
              <idle-timeout-minutes>20</idle-timeout-minutes>
              <!-- for deployment on WebSphere, must be mapped to a WorkManager available in the web application's jndi context. -->
              <websphere-workmanager-jndi-name>java:comp/env/wm/default</websphere-workmanager-jndi-nam e>
              <!-- -->
              </properties>
              </channel-definition>

              I am happy to use the default workmanager. I guess I don't see where the mapping occurs between what is in the web.xml and the flex-enterprise-services.xml files.


              All resource-refs defined in the web.xml file have a link to the res-ref-name, which is used internally by the web application. By defining resource-refs in web.xml, you're telling the application server to make the resource available through JNDI to the web application via the res-ref-name, in this case, java:comp/env/wm/MessagingWorkManager. This explains the link between web.xml and the flex-enterprise-services.xml files.

              However, until you link the resource-ref with an actual resource on the application server, the resource-ref doesn't link to anything. Each application server has a different way of defining the actually resources, depending on type, and linking those resources with the resource ref. In my first e-mail, I've explained in (a) on how to define the resource and (b) how to link the resource with the resource-ref.

              If you're still not sure on linking between the resource-ref and the actuall application server resource, my suggestion would be to read your application server documentation on this issue. It's a standard J2EE way of doing things and we're not doing anything different.