You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ritz123 <ri...@gmail.com> on 2008/01/16 21:01:06 UTC

Getting delegator from command line run

Hi,

I am writing a data import utility which can be run as a service from
Service Engine (in which case you get GenericDelegator from the
DispatchContext) as well as can be run from the command line.

Problem now is, if the utility is run from the command line, in order to be
able to initialize "default" delegator, one will have to set the classpath
correctly in order for GenericDelegator.getGenericDelegator("default") to
find entityengine.xml and other related config files as well as libs. This
in other words means I am trying to use entity engine from "outside" of
Ofbiz - not literally but indirectly.

I looked at Start.java and references from there - which initializes
classpath and loads containers which includes loading all the framework,
application, hotdeploy directories etc.

Question is, if one wants to instantiate default delegator from java
application, what are the min classpath and other house keeping tasks that
needs to be done before it can be used and if there is any "entity engine
loader class" which does the required house keeping based on just
"ofbiz.home" location somewhere that can be used?

Thanks
-- 
View this message in context: http://www.nabble.com/Getting-delegator-from-command-line-run-tp14891395p14891395.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Getting delegator/entity engine working from command line run

Posted by Jacques Le Roux <ja...@les7arts.com>.
I know this was done by Atlassian for Jira, which uses OFBiz entity engine. There are other projects, I believe there is at least 
another one in Germany but I can't remember the name.
You might want to check 
http://docs.ofbiz.org/display/OFBIZ/Apache+OFBiz+User+List#ApacheOFBizUserList-ProductsandProjectsbasedonApacheOFBiz. BTW I don't 
thnink the German project I think about is in this list.

Jacques

From: "Ritz123" <ri...@gmail.com>
>
> Hi,
>
> I havent heard anything on this post... Does anyone out there have any
> experience using Entity Engine API  in standalone mode meaning without going
> through the startup process of ofbiz?
>
> Thanks
>
>
> Ritz123 wrote:
>>
>> Hi,
>>
>> I am writing a data import utility which can be run as a service from
>> Service Engine (in which case you get GenericDelegator from the
>> DispatchContext) as well as can be run from the command line.
>>
>> Problem now is, if the utility is run from the command line, in order to
>> be able to initialize "default" delegator, one will have to set the
>> classpath correctly in order for
>> GenericDelegator.getGenericDelegator("default") to find entityengine.xml
>> and other related config files as well as libs. This in other words means
>> I am trying to use entity engine from "outside" of Ofbiz - not literally
>> but indirectly.
>>
>> I looked at Start.java and references from there - which initializes
>> classpath and loads containers which includes loading all the framework,
>> application, hotdeploy directories etc.
>>
>> Question is, if one wants to instantiate default delegator from java
>> application, what are the min classpath and other house keeping tasks that
>> needs to be done before it can be used and if there is any "entity engine
>> loader class" which does the required house keeping based on just
>> "ofbiz.home" location somewhere that can be used?
>>
>> Thanks
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Getting-delegator-entity-engine-working-from-command-line-run-tp14891395p15006445.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
> 


Re: Getting delegator/entity engine working from command line run

Posted by Ritz123 <ri...@gmail.com>.
Hi,

I havent heard anything on this post... Does anyone out there have any
experience using Entity Engine API  in standalone mode meaning without going
through the startup process of ofbiz?

Thanks


Ritz123 wrote:
> 
> Hi,
> 
> I am writing a data import utility which can be run as a service from
> Service Engine (in which case you get GenericDelegator from the
> DispatchContext) as well as can be run from the command line.
> 
> Problem now is, if the utility is run from the command line, in order to
> be able to initialize "default" delegator, one will have to set the
> classpath correctly in order for
> GenericDelegator.getGenericDelegator("default") to find entityengine.xml
> and other related config files as well as libs. This in other words means
> I am trying to use entity engine from "outside" of Ofbiz - not literally
> but indirectly.
> 
> I looked at Start.java and references from there - which initializes
> classpath and loads containers which includes loading all the framework,
> application, hotdeploy directories etc.
> 
> Question is, if one wants to instantiate default delegator from java
> application, what are the min classpath and other house keeping tasks that
> needs to be done before it can be used and if there is any "entity engine
> loader class" which does the required house keeping based on just
> "ofbiz.home" location somewhere that can be used?
> 
> Thanks
> 

-- 
View this message in context: http://www.nabble.com/Getting-delegator-entity-engine-working-from-command-line-run-tp14891395p15006445.html
Sent from the OFBiz - User mailing list archive at Nabble.com.