Results 1 to 4 of 4

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

  1. #1
    Join Date
    Jan 2010
    Posts
    26

    Default 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. #2
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    632

    Default

    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

  3. #3
    Join Date
    Jan 2010
    Posts
    26

    Default

    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]

  4. #4
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    632

    Default

    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!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •