4 Replies Latest reply on Sep 6, 2013 5:58 AM by Alexey Loubyansky

    jboss-cli output irritating

    Frank Langelage Master

      I'm using the following cli script to add mail config to WildFly server:

      if (outcome != success) of /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp:read-resource

          /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp:add(host="smtp.1und1.de",port="25")

      end-if

      if (outcome != success) of /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-imap:read-resource

          /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-imap:add(host="imap.1und1.de",port="143")

      end-if

      if (outcome != success) of /subsystem=mail/mail-session="java:/Mail":read-resource

          /subsystem=mail/mail-session="java:/Mail":add(jndi-name=java:/Mail,from="name@domain.de",debug=false)

          /subsystem=mail/mail-session="java:/Mail"/server=smtp:add(outbound-socket-binding-ref=mail-smtp,ssl=false,username="...",password="...")

          /subsystem=mail/mail-session="java:/Mail"/server=imap:add(outbound-socket-binding-ref=mail-imap,ssl=false,username="...",password="...")

      end-if

       

      The output for the first execution when entries are added is like this:

      #1 /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp:add(host="smtp.1und1.de",port="25")

      #1 /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-imap:add(host="imap.1und1.de",port="143")

      #1 /subsystem=mail/mail-session=java:/Mail:/Mail":add(jndi-name=java:/Mail,from="name@domain.de",debug=false)

      #2 /subsystem=mail/mail-session=java:/Mail/server=smtp:/Mail"/server=smtp:add(outbound-socket-binding-ref=mail-smtp,ssl=false,username="...",password="...")

      #3 /subsystem=mail/mail-session=java:/Mail/server=imap:/Mail"/server=imap:add(outbound-socket-binding-ref=mail-imap,ssl=false,username="...",password="...")

       

      Executing the same script again gives the same output:

      #1 /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp:add(host="smtp.1und1.de",port="25")

      #1 /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-imap:add(host="imap.1und1.de",port="143")

      #1 /subsystem=mail/mail-session=java:/Mail:/Mail":add(jndi-name=java:/Mail,from="name@domain.de",debug=false)

      #2 /subsystem=mail/mail-session=java:/Mail/server=smtp:/Mail"/server=smtp:add(outbound-socket-binding-ref=mail-smtp,ssl=false,username="...",password="...")

      #3 /subsystem=mail/mail-session=java:/Mail/server=imap:/Mail"/server=imap:add(outbound-socket-binding-ref=mail-imap,ssl=false,username="...",password="...")

      Although this time nothing is added to the configuration. Everything is there already and outcome == success and the add commands are not executed.

       

      Why?

      Any option available to change this?

      If not, worth a feature request?