Announcement Announcement Module
Collapse
No announcement yet.
How to Stop/Start file:inbound-channel-adapter via jmx Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Stop/Start file:inbound-channel-adapter via jmx

    Hi There,

    Just wondering if the following scenario is possible in SI:

    1. Poll input folder for files
    2. Validate File - If Validation fails stop 'file:inbound-channel-adapter'; move file to say an 'error' folder
    3. Once we receive a new correct formatted file, START 'file:inbound-channel-adapter' via JMX

    If the above scenario is possible what is the best way to do this?

    Thanks.

  • #2
    Hello

    1. To stop PollingConsumer bean for 'file:inbound-channel-adapter' you can use this one: http://static.springsource.org/sprin...l#control-bus:
    2. 'START 'file:inbound-channel-adapter' via JMX' can be achieved via ObjectNameof that PollingConsumer:
    Code:
    org.springframework.integration.endpoint:type=PollingConsumer,name=idOfTheFileInboundChannelAdapter
    MBean operation are inside the org.springframework.context.Lifecycle.
    However you should add <int-jmx:mbean-export> into config: http://static.springsource.org/sprin...apter.html#jmx

    Hope that helps,
    Artem

    Comment


    • #3
      Thanks Artem!

      Just wondering about the code snippet above, are you referring the code as in jconsole context?

      Assuming we also need to start the application with jmx properties for the JMX part to work?

      Code:
      -Dcom.sun.management.jmxremote
          -Dcom.sun.management.jmxremote.port=1111
          -Dcom.sun.management.jmxremote.ssl=false
          -Dcom.sun.management.jmxremote.authenticate=false
      Is it possible to enable jmx authentication = true and validate user/password against LDAP? This is to secure JMX operations like start/stop etc. [so that only those who know the user/pwd can be allowed to carry out operations etc]

      Comment


      • #4
        Is it possible to enable jmx authentication = true
        H-m-m...
        Yes it is. But I don't see enough info on the Google about it and it isn't a task of Spring Integration. And also I haven't done secure JMX access before...
        But it can be achievable.
        Try start from here: http://forum.springsource.org/showthread.php?73677

        And Spring Security will help you

        Good luck!

        Comment

        Working...
        X