4 Replies Latest reply on Jul 26, 2010 6:42 AM by andreasriedel

    How to create my own gateway classes

    andreasriedel

      Hello.

       

      Take a look in the jbossesb-1.2.0.xsd, there exists a amount of predefined Providers:

      - jms-provider-type
      - jms-jca-provider
      - fs-provider
      - ftp-provider
      - sql-provider
      - hibernate-provider
      - jbr-provider
      - http-provider

       

      By defining the listener in the jboss-esb.xml no class is given, so I guess there can only be reference a fix set of Gateway Classes:

        SqlTableGatewayListener.java
        FileGatewayListener.java
        HibernateGatewayListener.java
        HttpGatewayListener.java
        JBossRemotingGatewayListener.java
        JmsGatewayListener.java

       

      So the question is:

      - is it possible to define my own provider.

      - how can I create my own Gateway Class or extend an existing.

      - is there an guide or tutorial explain what's to do.

       

      TIA

      Andreas

        • 1. Re: How to create my own gateway classes
          edx

          You can do your own implementation of org.jboss.soa.esb.listeners.ScheduledEventMessageComposer.

          Then you should define the Schedule Provider and then the instance of Scheduled Listener containing the definition of your class as EventProcessor.

          regs.

          Edward

          • 2. Re: How to create my own gateway classes
            andreasriedel

            It's not that hard to do the implementation.

            I'm more interesset in how to use it. It's to define and I'm looking for some documention how to do so.

            • 3. Re: How to create my own gateway classes
              edx

              The simple example might be as follows:

               

              In jboss-esb.xml in section <providers> define:

               

                <schedule-provider name="MySchedProvider">
                 <simple-schedule frequency="30" frequencyUnits="seconds" scheduleid="MySimpleSchedule"/>
                </schedule-provider>

               

              Then in section <services><service><listeners> define:

               

               

              <scheduled-listener

                   event-processor="MyMessageComposerImplementationClass"

                   is-gateway="true" name="MyScheduledListener" scheduleidref="MySimpleSchedule">

                   <property name="param" value="value"/>

                  </scheduled-listener>

               

              properties <param,value> have the same meaning as ConfigTree for Action classes.

               

              In the above example the method composeMessage() of MyMessageComposerImplementationClass is invoked in every 30 seconds.

               

              regards,

              Edward

               


              • 4. Re: How to create my own gateway classes
                andreasriedel

                Ok, I understand. I havn't seen this.

                 

                 

                Thanks.

                 

                Andreas