[jira] [Updated] (OFBIZ-11203) get Delegator instance without calling `main`

2019-09-22 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin updated OFBIZ-11203:
---
Description: 
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 ?

  was:
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 ?


> 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
> 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)


[jira] [Updated] (OFBIZ-11203) get Delegator instance without calling `main`

2019-09-22 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin updated OFBIZ-11203:
---
Component/s: framework

> 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
> 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
>  
> ```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)


[jira] [Updated] (OFBIZ-11203) get Delegator instance without calling `main`

2019-09-18 Thread Jira


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

Samuel Trégouët updated OFBIZ-11203:

Attachment: start-setconfig.patch

> 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
>Priority: Major
> 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
>  
> ```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)


[jira] [Updated] (OFBIZ-11203) get Delegator instance without calling `main`

2019-09-18 Thread Jira


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

Samuel Trégouët updated OFBIZ-11203:

Description: 
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 ?

  was:
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 ?


> 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
>Priority: Major
> 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
>  
> ```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)