Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2033

Add a recursive-depth=X param to read-resource, read-children-resources; allow recursive reads when include-runtime=true

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.CR1
    • None
    • Domain Management
    • None

      [2:08pm] bstansberry: emuckenhuber: WDYT about a recursive-depth=X param to :read-resource, :read-children-resources?
      [2:08pm] emuckenhuber: bstansberry: i think that would make sense
      [2:08pm] bstansberry: smarlow: stumbled on the non-intuitive nature of making include-runtime-true,recursive=true illegal
      [2:09pm] smarlow: lucky me
      [2:09pm] bstansberry: i doubt you are the 1st or last
      [2:09pm] bstansberry: in your particular use case, reading more than 1 level makes sense
      [2:10pm] bstansberry: emuckenhuber: so, what semantics?
      [2:10pm] bstansberry: i.e. how do recursive and recursive-depth relate?
      [2:11pm] emuckenhuber: i added something like that to the Resource readModel
      [2:11pm] bstansberry: yep
      [2:11pm] emuckenhuber: i have -1 as recursive, not sure if that makes much sense though?
      [2:11pm] pferraro left the chat room. (Ping timeout: 240 seconds)
      [2:12pm] bstansberry: it's ok in Resource
      [2:12pm] bstansberry: in the mgmt API "undefined" can work for that
      [2:13pm] emuckenhuber: ah, ok yeah
      [2:14pm] bstansberry: emuckenhuber: so "recursive-depth" would be extra info that's irrelevant if ! "recursive" => true ?
      [2:15pm] bstansberry: and perhaps if "include-runtime" => true you have to set "recursive-depth" or the op fails validation?
      [2:16pm] emuckenhuber: so include-runtime wouldn't be allowed with only recursive=true ?
      [2:16pm] bstansberry: well, we allow it now, but here is what you get:
      [2:16pm] bstansberry: read-resource(include-runtime=true,recursive=true) only returns result = "result" => {"hibernate-persistence-unit" => {"2lc.jar_TEST_PU" => {"cache" => {"2lc.jar#TEST_PU.Employee" => {}}}}}
      [2:17pm] bstansberry: we ignore "include-runtime"
      [2:18pm] emuckenhuber: yes, perhaps we should fail in that case then
      [2:18pm] emuckenhuber: i guess we don't want to allow recursive=true,include-runtime=true ?
      [2:19pm] bstansberry: I guess we could
      [2:19pm] bstansberry: the risk is people suck out huge amounts of data by mistake
      [2:20pm] bstansberry: so the extra param reduces the chances of it being a mistake
      [2:20pm] emuckenhuber: yes, i think so as well
      [2:22pm] emuckenhuber: for standalone it shouldn't be an issue - but having the domain op behave differently would also suck
      [2:23pm] bstansberry: yeah
      [2:23pm] bstansberry: IIRC we already have a separate rule re: proxies
      [2:26pm] emuckenhuber: true, then it shouldn
      [2:26pm] emuckenhuber: 't be an issue after all?
      [2:27pm] bstansberry: well, standalone could be an issue
      [2:27pm] bstansberry: we are starting to expose a lot of metrics
      [2:28pm] bstansberry: it is tempting though to just allow it
      [2:28pm] bstansberry: explaining complex semantics, blech
      [2:29pm] bstansberry: I'm going to say let's just allow it unless someone starts arguing in the next minute
      [2:30pm] emuckenhuber: hehe, ok

              emuckenhuber_jira Emanuel Muckenhuber (Inactive)
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: