How to control the hot-deploy components loading order?
Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno
Re: How to control the hot-deploy components loading order?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 05:31 PM, Bruno Busco wrote: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Have a look at ./framework/component-load.xml Cheers, René Scheibe - -- René Scheibe * rene.sche...@tngtech.com TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Sitz: Unterföhring * Amtsgericht München * HRB 135082 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1eqwkACgkQUXs9EHvIuCpI3gCggsMFUilQwG6H766SbaEuBCcD W/YAnibFk3gDPGtQKkinQyqISWNFPh/b =HMYO -END PGP SIGNATURE-
Re: How to control the hot-deploy components loading order?
I am guessing that when the component was created is driving this, since hot-deploy looks for files by date and time. putting a component-load.xml in hot-deploy may solve you problem. otherwise create your own root folder and use ant script to hook it up in ofbiz config files. my 2 cents = BJ Freeman Strategic Power Office with Supplier Automation http://www.businessesnetwork.com/automation/viewforum.php?f=52 Specialtymarket.com http://www.specialtymarket.com/ Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man Bruno Busco sent the following on 2/18/2011 8:31 AM: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno
Re: How to control the hot-deploy components loading order?
on second thought it should not matter since you loading data after you loaded the components. so the logic would be in the component. = BJ Freeman Strategic Power Office with Supplier Automation http://www.businessesnetwork.com/automation/viewforum.php?f=52 Specialtymarket.com http://www.specialtymarket.com/ Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man BJ Freeman sent the following on 2/18/2011 9:41 AM: I am guessing that when the component was created is driving this, since hot-deploy looks for files by date and time. putting a component-load.xml in hot-deploy may solve you problem. otherwise create your own root folder and use ant script to hook it up in ofbiz config files. my 2 cents = BJ Freeman Strategic Power Office with Supplier Automation http://www.businessesnetwork.com/automation/viewforum.php?f=52 Specialtymarket.com http://www.specialtymarket.com/ Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man Bruno Busco sent the following on 2/18/2011 8:31 AM: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno
Re: How to control the hot-deploy components loading order?
Can Bruno just put a component-load.xml in the /ofbiz/hot-deploy/* directory and the framework will just figure it out? That would give it the same parent - child relationship as specialpurpose -ecommerce has using the following two files. - /ofbiz/framework/base/config/component-load.xml - /ofbiz/specialpurpose/component-load.xml On 2/18/2011 10:23 AM, René Scheibe wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 05:31 PM, Bruno Busco wrote: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Have a look at ./framework/component-load.xml Cheers, René Scheibe - -- René Scheibe * rene.sche...@tngtech.com TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Sitz: Unterföhring * Amtsgericht München * HRB 135082 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1eqwkACgkQUXs9EHvIuCpI3gCggsMFUilQwG6H766SbaEuBCcD W/YAnibFk3gDPGtQKkinQyqISWNFPh/b =HMYO -END PGP SIGNATURE- -- Stephen P Rufle sru...@salmonllc.com O:480-626-8022 Yahoo IM: stephen_rufle AOL IM: stephen1rufle
Re: How to control the hot-deploy components loading order?
There is an unimplemented depends-on tag in ofbiz-component.xsd that I've been meaning to add support for which would solve this problem. It's not a trivial implementation though because at the moment components are loaded as they are located while this feature would require them all to be located first and then reordered and loaded. Regards Scott HotWax Media http://www.hotwaxmedia.com On 19/02/2011, at 5:31 AM, Bruno Busco wrote: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno smime.p7s Description: S/MIME cryptographic signature
Re: How to control the hot-deploy components loading order?
Many thanks everyone for your hints. Adding the component-load.xml worked. I think we could add the following text to the readme.txt file in the hot-deploy directory: == The hot-deploy Auto-Loading feature loads all components in the order they are found (i.e. alphabetic or creation date). If you need a specific loading order of these components than you should disable the Auto-Loading feature by creating a component-load.xml file in the hot-deploy directory and use the load-component tag to load your component in the order you want (just use the component-load.xml file in the application folder as a template). == WDYT? -Bruno 2011/2/19 Scott Gray scott.g...@hotwaxmedia.com There is an unimplemented depends-on tag in ofbiz-component.xsd that I've been meaning to add support for which would solve this problem. It's not a trivial implementation though because at the moment components are loaded as they are located while this feature would require them all to be located first and then reordered and loaded. Regards Scott HotWax Media http://www.hotwaxmedia.com On 19/02/2011, at 5:31 AM, Bruno Busco wrote: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno
Re: How to control the hot-deploy components loading order?
I only wonder, isn't it easier to create a subdirectory on the level of applications and follow its pattern? On Sat, 2011-02-19 at 07:46 +0100, Bruno Busco wrote: Many thanks everyone for your hints. Adding the component-load.xml worked. I think we could add the following text to the readme.txt file in the hot-deploy directory: == The hot-deploy Auto-Loading feature loads all components in the order they are found (i.e. alphabetic or creation date). If you need a specific loading order of these components than you should disable the Auto-Loading feature by creating a component-load.xml file in the hot-deploy directory and use the load-component tag to load your component in the order you want (just use the component-load.xml file in the application folder as a template). == WDYT? -Bruno 2011/2/19 Scott Gray scott.g...@hotwaxmedia.com There is an unimplemented depends-on tag in ofbiz-component.xsd that I've been meaning to add support for which would solve this problem. It's not a trivial implementation though because at the moment components are loaded as they are located while this feature would require them all to be located first and then reordered and loaded. Regards Scott HotWax Media http://www.hotwaxmedia.com On 19/02/2011, at 5:31 AM, Bruno Busco wrote: Hi, is in the framework any tool to set the order in which the hot-deploy components are loaded? I have created two components in the hot-deploy folder. The first component loads some extseed in the database and the second component loads some other extseed that depends on the first one. Unfortunately the order on which they are loaded when I use the ant run-install-extseed command is the alphabetic order and the second one is loaded before the first resulting in a foreign-key error. How can I fix this? Thank you, Bruno -- Ofbiz on twitter: http://twitter.com/apache_ofbiz Myself on twitter: http://twitter.com/hansbak Antwebsystems.com: Quality services for competitive rates.