All Downloads are FREE. Search and download functionalities are using the official Maven repository.

conf.eventswitch-config.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - JASMINe
 - Copyright (C) 2007-2009 Bull S.A.S.
 - Contact: [email protected]
 -
 - This library is free software; you can redistribute it and/or
 - modify it under the terms of the GNU Lesser General Public
 - License as published by the Free Software Foundation; either
 - version 2.1 of the License, or any later version.
 -
 - This library is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 - Lesser General Public License for more details.
 -
 - You should have received a copy of the GNU Lesser General Public
 - License along with this library; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 - USA
 -
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 - $Id: eventswitch-config.xml 5542 2009-10-14 15:33:36Z jlegrand $
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-->
<!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN"
                                "http://mule.mulesource.org/dtds/mule-configuration.dtd">
<mule-configuration id="JASMINe_Event_Switch" version="1.0">
 <mule-environment-properties synchronous="false" />

 <agents>
   <agent name="JmxAgent" className="org.mule.management.agents.JmxAgent"/>
 </agents>
  
 <connector name="JMSConnector" className="org.mule.providers.jms.JmsConnector">
    <properties>
        <property name="connectionFactoryJndiName" value="JTCF"/>
        <property name="jndiProviderUrl" value="rmi://localhost:1099"/>
        <property name="jndiInitialFactory" value="org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory"/>
        <property name="specification" value="1.1"/>
        <property name="jndiDestinations" value="true"/>
        <property name="username" value="anonymous"/>
        <property name="password" value="anonymous"/>
    </properties>

    <!--<connection-strategy className="org.mule.providers.SimpleRetryConnectionStrategy">
        <properties>
            <property name="retryCount" value="3"/>
            <property name="frequency" value="2000"/>
        </properties>
    </connection-strategy>-->

 </connector>
 
 <connector name="FileConnector" className="org.mule.providers.file.FileConnector">
   <properties>
     <property name="writeToDirectory" value="__INSTALL_PATH__/csv" />
     <property name="outputPattern" value="jasmine-monitoring" />
     <property name="outputAppend" value="true" />
   </properties>
 </connector>
 

 <transformers>
  <transformer name="JasmineEventToString"
   className="org.ow2.jasmine.monitoring.eventswitch.transformers.JasmineEventToString" />
  <transformer name="JasmineEventToCSV"
   className="org.ow2.jasmine.monitoring.eventswitch.transformers.JasmineEventToCSV" />
  <transformer name="JasmineEventNotificationToString"
   className="org.ow2.jasmine.monitoring.eventswitch.transformers.JasmineEventNotificationToString" />
  <transformer name="JasmineEventNotificationToCSV"
   className="org.ow2.jasmine.monitoring.eventswitch.transformers.JasmineEventNotificationToCSV" />
   
   <!-- This transformer takes a JMSTextMessage and convert it in a JasmineEventEB -->
  <transformer name="JMSTextMessageToJasmineEvent"
   className="org.ow2.jasmine.monitoring.eventswitch.transformers.JMSTextMessageToJasmineEvent" > 
     <properties>
       <property name="sourceName" value="eventSwitchIn"/>
       <property name="domainName" value="sampleDomain"/>
       <property name="serverName" value="sampleServer"/>
       <property name="sname" value="vm://JasmineEventDispatcher"/>
     </properties>
   </transformer>
 </transformers>
 
 <model name="EventSwitch">

  <!--
   MBeanCmd dispatcher get MBeandCmd messages (local or remote) and routes them to I/O or a database
  -->
  <mule-descriptor name="MBeanCmd_dispatcher"
   implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.MBeanCmdDispatcher">

   <inbound-router>

    <!-- This endpoint receives MBeanCmd messages from an embedded MBeanCmd -->
    <endpoint address="vm://MBeanCmd_dispatcher" />
    
    <!-- This endpoint receives MBeanCmd messages from a remote MBeanCmd. You can configure the TCP port-->
    <endpoint address="tcp://localhost:18564/MBeanCmd" />
    
   </inbound-router>

   <outbound-router>
    <router className="org.mule.routing.outbound.MulticastingRouter">

     <!-- This endpoint displays MBeanCmd messages on the console -->
     <!--<endpoint address="stream://System.out" transformers="JasmineEventToCSV" />-->
     
     <!-- This endpoint write MBeanCmd messages on a file in the CSV format -->
     <!-- log
     <endpoint address="file://__INSTALL_PATH__/csv" connector="FileConnector" transformers="JasmineEventToCSV" />
     log -->

     <!-- This endpoint dispatches MBeanCmd messages to a stateless session bean -->
     <!-- database
     <endpoint address="vm://JasmineEventEJB3Wrapper" />
     database -->
     
     <!-- This endpoint dispatches MBeanCmd messages to a JMS topic -->
     <!-- eos
     <endpoint address="jms://jasmine" connector="JMSConnector"/>
     eos -->

     <!-- This endpoint dispatches MBeanCmd messages to a stateless session bean -->
     <!-- drools
     <endpoint address="vm://DroolsUMOComponent" />
     drools -->
     
     <!-- This endpoint dispatches MBeanCmd messages to a WildCAT context -->
     <!--<endpoint address="vm://WildCATUMOComponent" />-->

     <filter
      expectedType="org.ow2.jasmine.event.messages.JasmineEvent"
      className="org.mule.routing.filters.PayloadTypeFilter" />
    </router>
   </outbound-router>

  </mule-descriptor>

  <!--
  
  -->
  <mule-descriptor name="JasmineEvent_dispatcher"
   implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.JasmineEventDispatcher">

   <inbound-router>

    <!-- This endpoint receives MBeanCmd messages from an embedded MBeanCmd -->
    <endpoint address="vm://JasmineEventDispatcher" />
    
    <!-- This endpoint receives MBeanCmd messages from a remote MBeanCmd. You can configure the TCP port-->
    <endpoint address="tcp://localhost:18565/JasmineEventDispatcher" />
    
   </inbound-router>

   <outbound-router>
    <router className="org.mule.routing.outbound.MulticastingRouter">

     <!-- This endpoint displays MBeanCmd messages on the console -->
     <!--<endpoint address="stream://System.out" transformers="JasmineEventToCSV" />-->

     <!-- This endpoint dispatches MBeanCmd messages to a stateless session bean -->
     <!-- database
     <endpoint address="vm://JasmineEventEJB3Wrapper" />
     database -->
     
     <!-- This endpoint dispatches MBeanCmd messages to a JMS topic -->
     <!-- eos
     <endpoint address="jms://jasmine" connector="JMSConnector"/>
     eos -->

     <!-- This endpoint dispatches MBeanCmd messages to a stateless session bean -->
     <!-- drools
     <endpoint address="vm://DroolsUMOComponent" />
     drools -->
     
     <!-- This endpoint dispatches MBeanCmd messages to a WildCAT context -->
     <!--<endpoint address="vm://WildCATUMOComponent" />-->

     <filter
      expectedType="org.ow2.jasmine.event.messages.JasmineEvent"
      className="org.mule.routing.filters.PayloadTypeFilter" />
    </router>
   </outbound-router>

  </mule-descriptor>
  
  <!--
   Description of the embedded MBeanCmd instance(s)
  -->
  <mule-descriptor name="MBeanCmd_wrapper"
   implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.MBeanCmdWrapper">

   <!-- Set MBeanCmd arguments here -->
   <!-- cf documentation on MBeanCmd : http://wiki.jasmine.objectweb.org/xwiki/bin/view/Documentation/MBeanCmd -->
   <properties>
    <text-property name="configuration">
     <!--
      Each new MBeanCmd command has to be on separated lines, as a new command is set on each new line.

      In this embedded version of MBeanCmd, we can use a Resource Adapter which provides a pool of JMX connections
      to reach the server to monitor with MBeanCmd. If the RA corresponding to the target isn't deployed, a non
      managed JMX connection is opened.
      To build and deploy the specific RA, refer to the JMXConnectionRA. Just know that the JNDI name of the RA has to
      be specific, so MBeanCmd will automatically find it and use it. The entire way to set it is described in the
      JMXConnectionRA subproject.
     -->

     

     <!-- Other examples :
      stat -p 10 -target service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas -name "*:j2eeType=JVM,*" -a allThreadsCount -jasmine "vm://MBeanCmd_dispatcher"
      stat -p 10 -name "joramClient:type=queue,*" -jasmine "vm://MBeanCmd_dispatcher"
      poll -p 10 -ds "*:j2eeType=JDBCDataSource,*" -jasmine "vm://MBeanCmd_dispatcher"
      poll -p 5 -cpusun -target service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas -jasmine "vm://MBeanCmd_dispatcher"
      monologjmx -target service:jmx:rmi:///jndi/rmi://localhost:1099/jrmpconnector_jonas -jasmine "vm://MBeanCmd_dispatcher"

     -->
    </text-property>
   </properties>

  </mule-descriptor>

  <!--
   Description of the EJB3 which persists MBeanCmd messages in a database
  -->
  <mule-descriptor name="JasmineEventEJB3Wrapper"
   implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.JasmineEventEJB3Wrapper">
   <inbound-router>
    <endpoint address="vm://JasmineEventEJB3Wrapper" />
   </inbound-router>
   <properties>
    <map name="configuration">
     <property name="Wrapper.LOOKUP_BEAN"
      value="org.ow2.jasmine.monitoring.eventswitch.beans.impl.JasmineEventSLBImpl_org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventSLBRemote@Remote" />
    </map>
   </properties>
  </mule-descriptor>

  <!--
    Description of the EJB3 which inserts events in the Drools working memory
  -->
  <mule-descriptor name="DroolsUMOComponent"
    implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.DroolsUMOComponent">
    <inbound-router>
      <endpoint address="vm://DroolsUMOComponent" />
    </inbound-router>
    <properties>
      <map name="configuration">
        <property name="Wrapper.LOOKUP_BEAN"
          value="org.ow2.jasmine.monitoring.eventswitch.beans.impl.JasmineEventSFBImpl_org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventSFBRemote@Remote" />
      </map>
    </properties>
  </mule-descriptor>
  
  <!--
    Description of the EJB3 which inserts events in the WildCAT context
  -->
  <!--<mule-descriptor name="WildCATUMOComponent"
   implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.WildCATUMOComponent">
   <inbound-router>
    <endpoint address="vm://WildCATUMOComponent" />
   </inbound-router>
   <properties>
    <map name="configuration">
     <property name="Wrapper.LOOKUP_BEAN"
      value="org.ow2.jasmine.monitoring.eventswitch.beans.impl.JasmineEventWildCAT_org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventWildCATRemote@Remote" />
    </map>
   </properties>
  </mule-descriptor>-->
  
  <!--
   JasmineEventNotificationMailWrapper provides a wrapper that sends notification as a mail
  -->
  <mule-descriptor name="JasmineEventNotificationMailWrapper" implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.MailSenderWrapper">
    <inbound-router>
      <endpoint address="vm://JasmineEventNotificationMailWrapper" />
    </inbound-router>
    <properties>
      <map name="configuration">
        <property name="Wrapper.LOOKUP_BEAN" value="JASMINeMailSession" />
      </map>
    </properties>
  </mule-descriptor>
  
  <!--
   JMSNotification_dispatcher describes how to send a received JMS messages on differents outgoing endpoints
  -->
  <mule-descriptor name="JMSNotification_dispatcher" implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.JasmineEventNotificationDispatcher">
    <inbound-router>
        <endpoint address="jms://topic:jasmineNotification" connector="JMSConnector"/>
    </inbound-router>
    <outbound-router>
        <router className="org.mule.routing.outbound.MulticastingRouter">
           <endpoint address="vm://JasmineEventNotificationEJB3Wrapper" />
            <filter
             expectedType="org.ow2.jasmine.event.beans.JasmineEventNotification"
             className="org.mule.routing.filters.PayloadTypeFilter" />
        </router>
    </outbound-router>
  </mule-descriptor>
  
  
  <!--
   Description of the EJB3 which persists a notification in a database
  -->
  <mule-descriptor name="JasmineEventNotificationEJB3Wrapper" implementation="org.ow2.jasmine.monitoring.eventswitch.endpoints.JasmineEventNotificationEJB3Wrapper">
    <inbound-router>
      <endpoint address="vm://JasmineEventNotificationEJB3Wrapper" />
    </inbound-router>
    <properties>
      <map name="configuration">
        <property name="Wrapper.LOOKUP_BEAN" value="db-ejb/notification" />
      </map>
    </properties>
  </mule-descriptor>

 </model>

</mule-configuration>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy