7 Replies Latest reply: Jun 10, 2012 8:56 AM by Davide D'Alto RSS

    Byteman Fluent API

    Davide D'Alto Newbie

      Hi,

      I wanted to try Byteman and so I started a very simple prototype for the fluent API (https://issues.jboss.org/browse/ARQ-355):

      https://github.com/DavideD/arquillian-extension-byteman/tree/BM-ARQ-355

       

      It's still at a very early stage. Rules are registered at class level and at the moment it is possible to do something like this:

       

      {code}

      Descriptors.create(BytemanRuleDescriptor.class)

                     .rule("Throw exception on success")

                     .classMatch("StatelessManagerBean")

                     .methodMatch("forcedMethodLevelFailure")

                     .ifCondition("TRUE")

                     .doAction("debug(\"intercepted\""))

                     .doAction("throw new java.lang.RuntimeException(\"BYTEMAN\")")

      {code}

       

      I don't understand how to filter for the target container. How can I obtain the target container?

       

      Feedback is appreciated.

       

      Cheers,

      Davide