Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11203

get Delegator instance without calling `main`

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • None
    • framework
    • None

    Description

      I'd like to run a groovy script to make some database queries without running a full ofbiz server. Something like the following

      Delegator d = getDelegator("default")
      println("will make call on database")
      def result = EntityQuery.use(d).from("Product").queryList()
      println(result)
      

      But to do so I need to call `ComponentContainer.init` which retrieve `Config` from `Start` singleton. So to make my use case work I only need a public `setConfig` method on `Start` class, is this ok for you ?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mthl Mathieu Lirzin (Inactive)
            stregouet Samuel Trégouët
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment