[ 
https://issues.apache.org/jira/browse/OFBIZ-11203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mathieu Lirzin closed OFBIZ-11203.
----------------------------------
    Fix Version/s: Upcoming Branch
       Resolution: Fixed

Committed revision 1867343.

Thanks for you contribution.

> get Delegator instance without calling `main`
> ---------------------------------------------
>
>                 Key: OFBIZ-11203
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11203
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Samuel Trégouët
>            Assignee: Mathieu Lirzin
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: start-setconfig.patch
>
>
> I'd like to run a groovy script to make some database queries without running 
> a full ofbiz server. Something like the following
> {code:groovy}
> Delegator d = getDelegator("default")
> println("will make call on database")
> def result = EntityQuery.use(d).from("Product").queryList()
> println(result)
> {code}
> 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)

Reply via email to