1 Reply Latest reply on Feb 22, 2003 4:11 PM by davidjencks

    Configurable JCA Adapter

    diestel

      Hi,

      I am trying to create an adapter which is configurable through JMX. In our case we would like to change the server and port of a telnet connection adapter (over which some protocol will be implemented). We already tried several approaches, but didn't succeed. Currently we just have added some properties to the RARDeployer mbean in the jboss-service.xml, these properties are then correctly configured on the ManagedConnectionFactory, but unfortunately we can't change them through the JBoss JMX console. How can we expose such configuration setting of an adapter ? Are we on the right track with the current approach or are there more elegant solutions ? Also how do you usually persist the properties configured through JMX ?

      The Following is an excerpt of our jboss-service.xml



      jboss.jca:service=RARDeployer
      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <depends optional-attribute-name="OldRarDeployment">
      jboss.jca:service=RARDeployment,name=ASAM System Adapter


      <!--

      <config-property>
      <config-property-name>FileSystemRootDir</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>/tmp/db/fs_store</config-property-value>
      </config-property>

      -->
      AsamSystem


      <config-property>
      <config-property-name>Testje</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>x</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>EchoServer</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>bt01hc</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>EchoPort</config-property-name>
      <config-property-type>int</config-property-type>
      <config-property-value>7</config-property-value>
      </config-property>




      <depends optional-attribute-name="ManagedConnectionPool">

      0
      50
      5000
      15
      ByContainer


        • 1. Re: Configurable JCA Adapter
          davidjencks

          Best is to use jb 4 where the mcf properties are directly exposed as jmx attributes. However, I don't think even I would recommend using jb4 for production at this point.

          you probably can't set properties through the jmx console in earlier versions since you have to supply an xml Element and there is no property editor for that. You could write a jsp to specifically call the DS mbean or write a property editor. Then you probably have to call stop and start on the DS mbean to get the properties copied.


          Right now mbean persistence is at a rather experimental stage and only implemented at all in jb4.