1 Reply Latest reply on Dec 21, 2012 12:18 AM by Tom Cunningham

    Read custom properties at Service level

    dsnippert Newbie

      Hi,

       

      I am new to JBoss ESB. I have implemented some POCs with the JBoss ESB opensource version. I noticed that you can set custom properties at Service level. Can I access these from Custom Action code(via ConfigTree or...)? I achieved to retrieve properties that have been set on Action level in jboss-esb.xml via the ConfigTree.

       

      Here is a sample of a jboss-esb.xml:

      <jbossesb parameterReloadSecs="5"

      xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd">

      <providers>

        <bus-provider name="BusProvider">

         <bus busid="inputChannel"/>

        </bus-provider>

        <jms-provider connection-factory="ConnectionFactory" name="JMSProvider">

         <jms-bus busid="jmsChannel"/>

        </jms-provider>

      </providers>

      <services>

        <service category="com.test.examples" description="CallCustomAction"

         invmScope="GLOBAL" invmTransacted="false" name="CallCustomActionService">

         <property name="CustomPropertyService" value="testvalue"/>

         <listeners>

          <jms-listener busidref="jmsChannel" is-gateway="true" name="listeninbox">

           <jms-message-filter dest-name="queue/com.test.inbox" dest-type="QUEUE"/>

          </jms-listener>

         </listeners>

         <actions mep="OneWay">

          <action class="com.test.testcustomaction" name="CallCustomAction" process="process">

           <property name="customProperty" value="testvalue"/>

          </action>

         </actions>

        </service>

      </services>

      </jbossesb>

       

      regards,

       

      Dennis

        • 1. Re: Read custom properties at Service level
          Tom Cunningham Master

          Properties nested inside the service element don't seem to map to the configtree - if you put your property within your listener though, it will map into the ConfigTree.       Access the ConfigTree's parent to find your property.

           

          If nested service properties are a real need, definitely file a JIRA and we can take a look at it.

          1 of 1 people found this helpful