You analysis looks correct to me. I say commit it and David can
review the commit when he wakes up.
-dain
On Mar 13, 2008, at 11:19 AM, Karan Malhi wrote:
Tried to flush the ejb-jar xml and openejb xml files by setting the
system
property openejb.descriptors.output to true as follows:
openejb start -Dopenejb.descriptors.output=true
However, this system property is not stored in the SystemInstance
because of
a possible bug in org.apache.openejb.cli.MainImpl .
I have fixed it on my local machine, but since this is to do with
system
properties, I do not want to commit anything until somebody
validates this
assertion of mine.
In MainImpl, we do the following:-
1. We set the system property openejb.base using System.setProperty
2. We read all system properties and store them in SystemInstance
3. We read all properties from conf/system.properties and store them
using
System.getProperties().putAll() -- These properties are not stored in
SystemInstance
4. We now read the properties from the command line (passed using
-DpropName=propValue) and store them using
System.setProperty(propName,propValue)
-- These properties are also not stored in SystemInstance
This basically means that any commandline properties and any
properties
specified in conf/system.properties never reach SystemInstance,
correct?
So, when i try to set the system property while starting openejb, the
property always evaluates to false in
org.apache.openejb.config.OutputGeneratedDescriptors.deploy().
The fix to this would be simply moving code in step 2 above to after
step 4.
But I am not sure if there is a reason behind not putting some
properties in
SystemInstance.
I cannot find another reason of the xml not being flushed, if there is
something else I need to do instead of the fix above, please let me
know.
Thanks
--
Karan Singh Malhi