ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Trégouët (Jira) <j...@apache.org>
Subject [jira] [Created] (OFBIZ-11203) get Delegator instance without calling `main`
Date Wed, 18 Sep 2019 09:06:00 GMT
Samuel Trégouët created OFBIZ-11203:
---------------------------------------

             Summary: get Delegator instance without calling `main`
                 Key: OFBIZ-11203
                 URL: https://issues.apache.org/jira/browse/OFBIZ-11203
             Project: OFBiz
          Issue Type: Improvement
            Reporter: Samuel Trégouët


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

 

```groovy

{{}}
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 ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message