You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Karan Malhi <ka...@gmail.com> on 2008/07/16 05:05:47 UTC

extracting openejb properties into a separate class

Will be trying to extract  openejb properties into a separate class named
OpenEjbProperties. Since there are a lot of properties being used in the
code base, David Blevins suggested that we extract only those properties
which would be relevant to the user.

This would have a couple of benefits:-
1. Properties would be stored in one central location. Future properties
could also be added to this class
2. Properties could be documented heavily and then a link could be generated
for the wiki. This will server the purpose of documentation also

David performed a regex search and found the following properties (These are
also available here
https://issues.apache.org/jira/secure/attachment/12384644/openejb-options-report.txt
):-
If you feel any property was missed or some property should not be added,
then lets comment on this thread. I will try and keep the list
updated (based on the comments)

Targets
    String '"openejb[^:/ -]'
Found usages  (56 usages)
    Unclassified usage  (56 usages)
        openejb-core  (56 usages)
            org.apache.openejb  (4 usages)
                OpenEJB.java  (4 usages)
                    (90, 39) if
(initProps.getProperty("openejb.nobanner") == null) {
                    (99, 25) logger.info("openejb.home = " +
SystemInstance.get().getHome().getDirectory().getAbsolutePath());
                    (100, 25) logger.info("openejb.base = " +
SystemInstance.get().getBase().getDirectory().getAbsolutePath());
                    (116, 47) className =
props.getProperty("openejb.assembler",
"org.apache.openejb.assembler.classic.Assembler");
            org.apache.openejb.assembler.classic  (5 usages)
                Assembler.java  (1 usage)
                    (101, 56) public static final String
CONFIGURATOR_PROPERTY = "openejb.configurator";
                JndiBuilder.java  (3 usages)
                    (56, 59) private static final String
JNDINAME_STRATEGY_CLASS = "openejb.jndiname.strategy.class";
                    (57, 60) private static final String
JNDINAME_FAILONCOLLISION = "openejb.jndiname.failoncollision";
                    (174, 55) private static final String
JNDINAME_FORMAT = "openejb.jndiname.format";
                JndiEncBuilder.java  (1 usage)
                    (127, 32) if
(System.getProperty("openejb.naming","ivm").equals("xbean")) {
            org.apache.openejb.assembler.classic.cmd  (1 usage)
                Info2Properties.java  (1 usage)
                    (201, 32) if (key.startsWith("openejb.")) {
            org.apache.openejb.cli  (2 usages)
                Bootstrap.java  (2 usages)
                    (32, 62) private final static String
OPENEJB_HOME_PROPERTY_NAME = "openejb.home";
                    (33, 62) private final static String
OPENEJB_BASE_PROPERTY_NAME = "openejb.base";
            org.apache.openejb.client  (2 usages)
                LocalInitialContextFactory.java  (2 usages)
                    (37, 62) private static final String
OPENEJB_EMBEDDED_REMOTABLE = "openejb.embedded.remotable";
                    (62, 42)
SystemInstance.get().setProperty("openejb.embedded", "true");
            org.apache.openejb.config  (28 usages)
                ConfigUtils.java  (2 usages)
                    (45, 72) return
searchForConfiguration(SystemInstance.get().getProperty("openejb.configuration"));
                    (145, 49) File config = new File(confDir, "openejb.xml");
                ConfigurationFactory.java  (5 usages)
                    (90, 50) static final String
CONFIGURATION_PROPERTY = "openejb.configuration";
                    (91, 46) static final String CONF_FILE_PROPERTY =
"openejb.conf.file";
                    (92, 66) private static final String
DEBUGGABLE_VM_HACKERY_PROPERTY = "openejb.debuggable-vm-hackery";
                    (94, 62) protected static final String
VALIDATION_SKIP_PROPERTY = "openejb.validation.skip";
                    (107, 52) private static final String
CLASSPATH_AS_EAR = "openejb.deployments.classpath.ear";
                DeploymentsResolver.java  (6 usages)
                    (41, 58) static final String
DEPLOYMENTS_CLASSPATH_PROPERTY = "openejb.deployments.classpath";
                    (43, 53) private static final String
CLASSPATH_INCLUDE = "openejb.deployments.classpath.include";
                    (44, 53) private static final String
CLASSPATH_EXCLUDE = "openejb.deployments.classpath.exclude";
                    (45, 64) private static final String
CLASSPATH_REQUIRE_DESCRIPTOR =
"openejb.deployments.classpath.require.descriptor";
                    (46, 64) private static final String
CLASSPATH_FILTER_DESCRIPTORS =
"openejb.deployments.classpath.filter.descriptors";
                    (47, 63) private static final String
CLASSPATH_FILTER_SYSTEMAPPS =
"openejb.deployments.classpath.filter.systemapps";
                InitEjbDeployments.java  (1 usage)
                    (39, 56) private static final String
DEPLOYMENT_ID_FORMAT = "openejb.deploymentId.format";
                OpenEJBDeploymentFactory.java  (1 usage)
                    (29, 45) public static final String URI_SCHEME = "openejb";
                OutputGeneratedDescriptors.java  (1 usage)
                    (38, 54) private static final String
OUTPUT_DESCRIPTORS = "openejb.descriptors.output";
                RemoteServer.java  (5 usages)
                    (29, 61) private static final boolean DEBUG =
System.getProperty("openejb.server.debug","false").equalsIgnoreCase("TRUE");
                    (92, 72) lib = new File(new File(new File(home,
"webapps"), "openejb"), "lib");
                    (166, 90) "-Dopenejb.servicemanager.enabled=" +
Boolean.getBoolean("openejb.servicemanager.enabled"),
                    (186, 90) "-Dopenejb.servicemanager.enabled=" +
Boolean.getBoolean("openejb.servicemanager.enabled"),
                    (223, 49) String openejbHome =
System.getProperty("openejb.home");
                ReportValidationResults.java  (1 usage)
                    (35, 52) private static final String
VALIDATION_LEVEL = "openejb.validation.output.level";
                ServiceUtils.java  (3 usages)
                    (47, 27) * 1. System property
"openejb.provider.default" </br>
                    (56, 36) if
(system.getProperty("openejb.embedded") != null){
                    (61, 49) defaultProviderURL =
System.getProperty("openejb.provider.default", defaultValue);
                VmDeploymentFactory.java  (1 usage)
                    (29, 45) public static final String URI_SCHEME = "openejb";
                VmDeploymentManager.java  (2 usages)
                    (82, 49) String openejbHome =
System.getProperty("openejb.home", "target/openejb-3.0.0-SNAPSHOT");
                    (91, 48) String openejbUri =
System.getProperty("openejb.server.uri");
            org.apache.openejb.config.sys  (1 usage)
                Openejb.java  (1 usage)
                    (55, 24) @XmlRootElement(name = "openejb")
            org.apache.openejb.core.cmp  (2 usages)
                CmpUtil.java  (2 usages)
                    (23, 28) cmpImplClass = "openejb." + cmpImplClass;
                    (25, 28) cmpImplClass = "openejb";
            org.apache.openejb.core.ivm  (1 usage)
                BaseEjbProxyHandler.java  (1 usage)
                    (66, 53) private static final String
OPENEJB_LOCALCOPY = "openejb.localcopy";
            org.apache.openejb.core.ivm.naming  (1 usage)
                InitContextFactory.java  (1 usage)
                    (40, 45) String realmName = (String)
env.get("openejb.authentication.realmName");
            org.apache.openejb.core.webservices  (3 usages)
                ProviderWrapper.java  (3 usages)
                    (75, 32) System.setProperty("openejb." +
JAXWSPROVIDER_PROPERTY, oldProperty);
                    (344, 34) // 0.
System.getProperty("openejb.javax.xml.ws.spi.Provider")
                    (346, 51) String providerClass =
System.getProperty("openejb." + JAXWSPROVIDER_PROPERTY);
            org.apache.openejb.util  (6 usages)
                JuliLogStreamFactory.java  (1 usage)
                    (54, 46) String prop =
System.getProperty("openejb.logger.external", "false");
                Log4jLog.java  (1 usage)
                    (127, 46) String prop =
System.getProperty("openejb.logger.external", "false");
                Log4jLogStreamFactory.java  (1 usage)
                    (51, 46) String prop =
System.getProperty("openejb.logger.external", "false");
                Logger.java  (1 usage)
                    (29, 49) String factoryName =
System.getProperty("openejb.log.factory");
                MakeTxLookup.java  (1 usage)
                    (33, 54) String[] path = {"classes", "org",
"apache", "openejb", "hibernate", "TransactionManagerLookup.class"};
                OpenEjbVersion.java  (1 usage)
                    (52, 28) System.setProperty("openejb.version", version);



-- 
Karan Singh Malhi

Re: extracting openejb properties into a separate class

Posted by David Blevins <da...@visi.com>.
On Mar 9, 2009, at 11:19 AM, Karan Malhi wrote:

> Interesting...
>
> I was thinking that an option could also have a source , for  
> example, to
> know which property is in effect right now, we would need to know  
> whether it
> was set as a system property or openejb.xml or something else  
> etc.. . To be
> able to store that info next to the option would be nice. Something  
> like
> system --> xyzproperty=false
> openejb.xml-->abcproperty=true
>
> I am assuming we providing feature similar to  
> OutputGeneratedDescriptors
> i.e. dumping properties into a file in a temp directory.

We might be able to hook up something like that.

At the very least it would be nice to log where we searched for a  
given property so that people know which properties could be supplied  
in an openejb-jar.xml for example.

So I got the initial code in there.  Many things are looking cleaner  
already.  Still have to hook up the logging, but that shouldn't be too  
tough.  Since the code is in the loader package, it can't use the  
util.Logger interface directly, I just need to write a little adapter  
that we can plug into the Options instance.  I'll post some examples  
of the log output when I get that hooked in.


-David


> On Sun, Mar 8, 2009 at 8:11 PM, David Blevins  
> <da...@visi.com>wrote:
>
>>
>> On Mar 8, 2009, at 5:34 PM, David Blevins wrote:
>>
>> Technically speaking the java.util.Properties class will do this  
>> already
>>> (which I only discovered a few months ago), but you have to pass  
>>> the parent
>>> Properties instance in the constructor of the child properties  
>>> object which
>>> we aren't doing just yet.  We could definitely do this for the  
>>> properties in
>>> the system instance that default to the system properties.
>>>
>>
>> On second thought it doesn't look like such a good idea to rely on  
>> the
>> java.util.Properties object inheritance.  The Properties specific  
>> methods do
>> the parent delegation nicely, but all java.util.Map methods (size,  
>> get, set,
>> keySet, entrySet, values) do not reflect the parent's data.  Seems  
>> very
>> error prone.
>>
>> Here's a little test case:
>>
>>   public void testPropertiesInheritance() {
>>       Properties system = new Properties();
>>       system.setProperty("color", "red");
>>       system.setProperty("shape", "round");
>>       system.setProperty("texture", "matte");
>>
>>       Properties systemInstance = new Properties(system);
>>       systemInstance.setProperty("color", "orange");
>>       systemInstance.setProperty("weight", "15");
>>       systemInstance.setProperty("height", "2");
>>
>>       // The good parts
>>       assertEquals("SystemInstance.getProperty(\"shape\")", "round",
>> systemInstance.getProperty("shape"));
>>       assertEquals("SystemInstance.getProperty(\"texture\")",  
>> "matte",
>> systemInstance.getProperty("texture"));
>>       assertEquals("SystemInstance.getProperty(\"color\")", "orange",
>> systemInstance.getProperty("color"));
>>       assertEquals("SystemInstance.getProperty(\"weight\")", "15",
>> systemInstance.getProperty("weight"));
>>       assertEquals("SystemInstance.getProperty(\"height\")", "2",
>> systemInstance.getProperty("height"));
>>
>>       ArrayList<?> names =
>> Collections.list(systemInstance.propertyNames());
>>       assertEquals("Names.size()", 5, names.size());
>>
>>       // update "system" and check "systemInstance"
>>       system.setProperty("shape", "square");
>>       assertEquals("SystemInstance.getProperty(\"shape\")", "square",
>> systemInstance.getProperty("shape"));
>>
>>       // The bad, all java.util.Map methods do not reflect this
>> inheritance
>>       assertEquals("SystemInstance.size()", 3,  
>> systemInstance.size());
>>       assertEquals("SystemInstance.get(\"shape\")", null,
>> systemInstance.get("shape"));
>>       assertEquals("SystemInstance.get(\"texture\")", null,
>> systemInstance.get("texture"));
>>       assertEquals("SystemInstance.get(\"color\")", "orange",
>> systemInstance.get("color"));
>>       assertEquals("SystemInstance.get(\"weight\")", "15",
>> systemInstance.get("weight"));
>>       assertEquals("SystemInstance.get(\"height\")", "2",
>> systemInstance.get("height"));
>>   }
>>
>>
>> -David
>>
>>
>
>
> -- 
> Karan Singh Malhi


Re: extracting openejb properties into a separate class

Posted by Karan Malhi <ka...@gmail.com>.
Interesting...

I was thinking that an option could also have a source , for example, to
know which property is in effect right now, we would need to know whether it
was set as a system property or openejb.xml or something else etc.. . To be
able to store that info next to the option would be nice. Something like
system --> xyzproperty=false
openejb.xml-->abcproperty=true

I am assuming we providing feature similar to OutputGeneratedDescriptors
i.e. dumping properties into a file in a temp directory.

On Sun, Mar 8, 2009 at 8:11 PM, David Blevins <da...@visi.com>wrote:

>
> On Mar 8, 2009, at 5:34 PM, David Blevins wrote:
>
>  Technically speaking the java.util.Properties class will do this already
>> (which I only discovered a few months ago), but you have to pass the parent
>> Properties instance in the constructor of the child properties object which
>> we aren't doing just yet.  We could definitely do this for the properties in
>> the system instance that default to the system properties.
>>
>
> On second thought it doesn't look like such a good idea to rely on the
> java.util.Properties object inheritance.  The Properties specific methods do
> the parent delegation nicely, but all java.util.Map methods (size, get, set,
> keySet, entrySet, values) do not reflect the parent's data.  Seems very
> error prone.
>
> Here's a little test case:
>
>    public void testPropertiesInheritance() {
>        Properties system = new Properties();
>        system.setProperty("color", "red");
>        system.setProperty("shape", "round");
>        system.setProperty("texture", "matte");
>
>        Properties systemInstance = new Properties(system);
>        systemInstance.setProperty("color", "orange");
>        systemInstance.setProperty("weight", "15");
>        systemInstance.setProperty("height", "2");
>
>        // The good parts
>        assertEquals("SystemInstance.getProperty(\"shape\")", "round",
> systemInstance.getProperty("shape"));
>        assertEquals("SystemInstance.getProperty(\"texture\")", "matte",
> systemInstance.getProperty("texture"));
>        assertEquals("SystemInstance.getProperty(\"color\")", "orange",
> systemInstance.getProperty("color"));
>        assertEquals("SystemInstance.getProperty(\"weight\")", "15",
> systemInstance.getProperty("weight"));
>        assertEquals("SystemInstance.getProperty(\"height\")", "2",
> systemInstance.getProperty("height"));
>
>        ArrayList<?> names =
> Collections.list(systemInstance.propertyNames());
>        assertEquals("Names.size()", 5, names.size());
>
>        // update "system" and check "systemInstance"
>        system.setProperty("shape", "square");
>        assertEquals("SystemInstance.getProperty(\"shape\")", "square",
> systemInstance.getProperty("shape"));
>
>        // The bad, all java.util.Map methods do not reflect this
> inheritance
>        assertEquals("SystemInstance.size()", 3, systemInstance.size());
>        assertEquals("SystemInstance.get(\"shape\")", null,
> systemInstance.get("shape"));
>        assertEquals("SystemInstance.get(\"texture\")", null,
> systemInstance.get("texture"));
>        assertEquals("SystemInstance.get(\"color\")", "orange",
> systemInstance.get("color"));
>        assertEquals("SystemInstance.get(\"weight\")", "15",
> systemInstance.get("weight"));
>        assertEquals("SystemInstance.get(\"height\")", "2",
> systemInstance.get("height"));
>    }
>
>
> -David
>
>


-- 
Karan Singh Malhi

Re: extracting openejb properties into a separate class

Posted by David Blevins <da...@visi.com>.
On Mar 8, 2009, at 5:34 PM, David Blevins wrote:

> Technically speaking the java.util.Properties class will do this  
> already (which I only discovered a few months ago), but you have to  
> pass the parent Properties instance in the constructor of the child  
> properties object which we aren't doing just yet.  We could  
> definitely do this for the properties in the system instance that  
> default to the system properties.

On second thought it doesn't look like such a good idea to rely on the  
java.util.Properties object inheritance.  The Properties specific  
methods do the parent delegation nicely, but all java.util.Map methods  
(size, get, set, keySet, entrySet, values) do not reflect the parent's  
data.  Seems very error prone.

Here's a little test case:

     public void testPropertiesInheritance() {
         Properties system = new Properties();
         system.setProperty("color", "red");
         system.setProperty("shape", "round");
         system.setProperty("texture", "matte");

         Properties systemInstance = new Properties(system);
         systemInstance.setProperty("color", "orange");
         systemInstance.setProperty("weight", "15");
         systemInstance.setProperty("height", "2");

         // The good parts
         assertEquals("SystemInstance.getProperty(\"shape\")",  
"round", systemInstance.getProperty("shape"));
         assertEquals("SystemInstance.getProperty(\"texture\")",  
"matte", systemInstance.getProperty("texture"));
         assertEquals("SystemInstance.getProperty(\"color\")",  
"orange", systemInstance.getProperty("color"));
         assertEquals("SystemInstance.getProperty(\"weight\")", "15",  
systemInstance.getProperty("weight"));
         assertEquals("SystemInstance.getProperty(\"height\")", "2",  
systemInstance.getProperty("height"));

         ArrayList<?> names =  
Collections.list(systemInstance.propertyNames());
         assertEquals("Names.size()", 5, names.size());

         // update "system" and check "systemInstance"
         system.setProperty("shape", "square");
         assertEquals("SystemInstance.getProperty(\"shape\")",  
"square", systemInstance.getProperty("shape"));

         // The bad, all java.util.Map methods do not reflect this  
inheritance
         assertEquals("SystemInstance.size()", 3,  
systemInstance.size());
         assertEquals("SystemInstance.get(\"shape\")", null,  
systemInstance.get("shape"));
         assertEquals("SystemInstance.get(\"texture\")", null,  
systemInstance.get("texture"));
         assertEquals("SystemInstance.get(\"color\")", "orange",  
systemInstance.get("color"));
         assertEquals("SystemInstance.get(\"weight\")", "15",  
systemInstance.get("weight"));
         assertEquals("SystemInstance.get(\"height\")", "2",  
systemInstance.get("height"));
     }


-David


Re: extracting openejb properties into a separate class

Posted by David Blevins <da...@visi.com>.
On Mar 8, 2009, at 7:28 AM, Karan Malhi wrote:

> Thats cool. Why would we need a parent Options instance?

Not critical, but we have a few chunks of code that look like:

           String strategyClassName =  
SystemInstance.get().getProperty(JNDINAME_STRATEGY_CLASS,  
TemplatedStrategy.class.getName());
         strategyClassName =  
ejbJar.properties.getProperty(JNDINAME_STRATEGY_CLASS,  
strategyClassName);

Basically, if the property is defined in the openejb-jar.xml we use  
that, else if it is defined in the system instance we use that, else  
we use the default.

We don't control properties, but we do control the Options object, so  
thought it would be cool to have the ability to throw one Options into  
another and have this sort of "wide-scope to narrow-scope" searching  
built in.

Technically speaking the java.util.Properties class will do this  
already (which I only discovered a few months ago), but you have to  
pass the parent Properties instance in the constructor of the child  
properties object which we aren't doing just yet.  We could definitely  
do this for the properties in the system instance that default to the  
system properties.  There's an even older thread on that which I  
should resurrect actually.

-David




Re: extracting openejb properties into a separate class

Posted by Karan Malhi <ka...@gmail.com>.
Thats cool. Why would we need a parent Options instance?

On Sat, Mar 7, 2009 at 7:48 PM, David Blevins <da...@visi.com>wrote:

> I had an idea here.  Was just doing some work on OPENEJB-1006 and as part
> of it added some more functionality to the util.Options class.
>
> That's all static methods now, but if we made it an instance that wraps a
> properties instance and optionally delegates to a parent options instance we
> could do some cool things with it.  If everything used it we'd have one
> place where we could log info on what properties are getting used and what
> their values are.
>
> Going to see if I can hack something up.
>
> -David
>
>
> On Jul 29, 2008, at 9:10 AM, Karan Malhi wrote:
>
>  Hi Jean,
>>
>> This is great. This kind of documentation is exactly the reason why we are
>> trying to extract properties into a separate file. The best option would
>> be
>> to create a page on the openejb wiki and post your input about these
>> properties on that wiki page.
>>
>> On Tue, Jul 29, 2008 at 11:34 AM, Jean-Louis MONTEIRO <
>> jean-louis.monteiro@atosorigin.com> wrote:
>>
>>
>>> Hi David and all,
>>>
>>> I have done such a regexp search cause I want to know each property to
>>> determine impacts.
>>> I'm trying to create a document with some inputs one each property I can.
>>>
>>> Is there a way to share with the community ?
>>>
>>> Regards,
>>>
>>> _________________
>>> Jean-Louis MONTEIRO
>>>
>>> Atos Worldline
>>> Architecture and Methodology
>>> jean-louis.monteiro@atosorigin.com
>>> Tel: +33 (0).2.54.44.75.95
>>> 19 rue de la valléé maillard
>>> BP 1311
>>> 41013 Blois Cedex
>>> ---
>>> Atos Worldline is an Atos Origin company: www.atosorigin.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> KMalhi wrote:
>>>
>>>>
>>>> Will be trying to extract  openejb properties into a separate class
>>>> named
>>>> OpenEjbProperties. Since there are a lot of properties being used in the
>>>> code base, David Blevins suggested that we extract only those properties
>>>> which would be relevant to the user.
>>>>
>>>> This would have a couple of benefits:-
>>>> 1. Properties would be stored in one central location. Future properties
>>>> could also be added to this class
>>>> 2. Properties could be documented heavily and then a link could be
>>>> generated
>>>> for the wiki. This will server the purpose of documentation also
>>>>
>>>> David performed a regex search and found the following properties (These
>>>> are
>>>> also available here
>>>>
>>>>
>>> https://issues.apache.org/jira/secure/attachment/12384644/openejb-options-report.txt
>>>
>>>> ):-
>>>> If you feel any property was missed or some property should not be
>>>> added,
>>>> then lets comment on this thread. I will try and keep the list
>>>> updated (based on the comments)
>>>>
>>>> Targets
>>>>   String '"openejb[^:/ -]'
>>>> Found usages  (56 usages)
>>>>   Unclassified usage  (56 usages)
>>>>       openejb-core  (56 usages)
>>>>           org.apache.openejb  (4 usages)
>>>>               OpenEJB.java  (4 usages)
>>>>                   (90, 39) if
>>>> (initProps.getProperty("openejb.nobanner") == null) {
>>>>                   (99, 25) logger.info("openejb.home = " +
>>>> SystemInstance.get().getHome().getDirectory().getAbsolutePath());
>>>>                   (100, 25) logger.info("openejb.base = " +
>>>> SystemInstance.get().getBase().getDirectory().getAbsolutePath());
>>>>                   (116, 47) className =
>>>> props.getProperty("openejb.assembler",
>>>> "org.apache.openejb.assembler.classic.Assembler");
>>>>           org.apache.openejb.assembler.classic  (5 usages)
>>>>               Assembler.java  (1 usage)
>>>>                   (101, 56) public static final String
>>>> CONFIGURATOR_PROPERTY = "openejb.configurator";
>>>>               JndiBuilder.java  (3 usages)
>>>>                   (56, 59) private static final String
>>>> JNDINAME_STRATEGY_CLASS = "openejb.jndiname.strategy.class";
>>>>                   (57, 60) private static final String
>>>> JNDINAME_FAILONCOLLISION = "openejb.jndiname.failoncollision";
>>>>                   (174, 55) private static final String
>>>> JNDINAME_FORMAT = "openejb.jndiname.format";
>>>>               JndiEncBuilder.java  (1 usage)
>>>>                   (127, 32) if
>>>> (System.getProperty("openejb.naming","ivm").equals("xbean")) {
>>>>           org.apache.openejb.assembler.classic.cmd  (1 usage)
>>>>               Info2Properties.java  (1 usage)
>>>>                   (201, 32) if (key.startsWith("openejb.")) {
>>>>           org.apache.openejb.cli  (2 usages)
>>>>               Bootstrap.java  (2 usages)
>>>>                   (32, 62) private final static String
>>>> OPENEJB_HOME_PROPERTY_NAME = "openejb.home";
>>>>                   (33, 62) private final static String
>>>> OPENEJB_BASE_PROPERTY_NAME = "openejb.base";
>>>>           org.apache.openejb.client  (2 usages)
>>>>               LocalInitialContextFactory.java  (2 usages)
>>>>                   (37, 62) private static final String
>>>> OPENEJB_EMBEDDED_REMOTABLE = "openejb.embedded.remotable";
>>>>                   (62, 42)
>>>> SystemInstance.get().setProperty("openejb.embedded", "true");
>>>>           org.apache.openejb.config  (28 usages)
>>>>               ConfigUtils.java  (2 usages)
>>>>                   (45, 72) return
>>>>
>>>> searchForConfiguration(SystemInstance.get().getProperty("openejb.configuration"));
>>>
>>>>                   (145, 49) File config = new File(confDir,
>>>> "openejb.xml");
>>>>               ConfigurationFactory.java  (5 usages)
>>>>                   (90, 50) static final String
>>>> CONFIGURATION_PROPERTY = "openejb.configuration";
>>>>                   (91, 46) static final String CONF_FILE_PROPERTY =
>>>> "openejb.conf.file";
>>>>                   (92, 66) private static final String
>>>> DEBUGGABLE_VM_HACKERY_PROPERTY = "openejb.debuggable-vm-hackery";
>>>>                   (94, 62) protected static final String
>>>> VALIDATION_SKIP_PROPERTY = "openejb.validation.skip";
>>>>                   (107, 52) private static final String
>>>> CLASSPATH_AS_EAR = "openejb.deployments.classpath.ear";
>>>>               DeploymentsResolver.java  (6 usages)
>>>>                   (41, 58) static final String
>>>> DEPLOYMENTS_CLASSPATH_PROPERTY = "openejb.deployments.classpath";
>>>>                   (43, 53) private static final String
>>>> CLASSPATH_INCLUDE = "openejb.deployments.classpath.include";
>>>>                   (44, 53) private static final String
>>>> CLASSPATH_EXCLUDE = "openejb.deployments.classpath.exclude";
>>>>                   (45, 64) private static final String
>>>> CLASSPATH_REQUIRE_DESCRIPTOR =
>>>> "openejb.deployments.classpath.require.descriptor";
>>>>                   (46, 64) private static final String
>>>> CLASSPATH_FILTER_DESCRIPTORS =
>>>> "openejb.deployments.classpath.filter.descriptors";
>>>>                   (47, 63) private static final String
>>>> CLASSPATH_FILTER_SYSTEMAPPS =
>>>> "openejb.deployments.classpath.filter.systemapps";
>>>>               InitEjbDeployments.java  (1 usage)
>>>>                   (39, 56) private static final String
>>>> DEPLOYMENT_ID_FORMAT = "openejb.deploymentId.format";
>>>>               OpenEJBDeploymentFactory.java  (1 usage)
>>>>                   (29, 45) public static final String URI_SCHEME =
>>>> "openejb";
>>>>               OutputGeneratedDescriptors.java  (1 usage)
>>>>                   (38, 54) private static final String
>>>> OUTPUT_DESCRIPTORS = "openejb.descriptors.output";
>>>>               RemoteServer.java  (5 usages)
>>>>                   (29, 61) private static final boolean DEBUG =
>>>>
>>>> System.getProperty("openejb.server.debug","false").equalsIgnoreCase("TRUE");
>>>
>>>>                   (92, 72) lib = new File(new File(new File(home,
>>>> "webapps"), "openejb"), "lib");
>>>>                   (166, 90) "-Dopenejb.servicemanager.enabled=" +
>>>> Boolean.getBoolean("openejb.servicemanager.enabled"),
>>>>                   (186, 90) "-Dopenejb.servicemanager.enabled=" +
>>>> Boolean.getBoolean("openejb.servicemanager.enabled"),
>>>>                   (223, 49) String openejbHome =
>>>> System.getProperty("openejb.home");
>>>>               ReportValidationResults.java  (1 usage)
>>>>                   (35, 52) private static final String
>>>> VALIDATION_LEVEL = "openejb.validation.output.level";
>>>>               ServiceUtils.java  (3 usages)
>>>>                   (47, 27) * 1. System property
>>>> "openejb.provider.default" </br>
>>>>                   (56, 36) if
>>>> (system.getProperty("openejb.embedded") != null){
>>>>                   (61, 49) defaultProviderURL =
>>>> System.getProperty("openejb.provider.default", defaultValue);
>>>>               VmDeploymentFactory.java  (1 usage)
>>>>                   (29, 45) public static final String URI_SCHEME =
>>>> "openejb";
>>>>               VmDeploymentManager.java  (2 usages)
>>>>                   (82, 49) String openejbHome =
>>>> System.getProperty("openejb.home", "target/openejb-3.0.0-SNAPSHOT");
>>>>                   (91, 48) String openejbUri =
>>>> System.getProperty("openejb.server.uri");
>>>>           org.apache.openejb.config.sys  (1 usage)
>>>>               Openejb.java  (1 usage)
>>>>                   (55, 24) @XmlRootElement(name = "openejb")
>>>>           org.apache.openejb.core.cmp  (2 usages)
>>>>               CmpUtil.java  (2 usages)
>>>>                   (23, 28) cmpImplClass = "openejb." + cmpImplClass;
>>>>                   (25, 28) cmpImplClass = "openejb";
>>>>           org.apache.openejb.core.ivm  (1 usage)
>>>>               BaseEjbProxyHandler.java  (1 usage)
>>>>                   (66, 53) private static final String
>>>> OPENEJB_LOCALCOPY = "openejb.localcopy";
>>>>           org.apache.openejb.core.ivm.naming  (1 usage)
>>>>               InitContextFactory.java  (1 usage)
>>>>                   (40, 45) String realmName = (String)
>>>> env.get("openejb.authentication.realmName");
>>>>           org.apache.openejb.core.webservices  (3 usages)
>>>>               ProviderWrapper.java  (3 usages)
>>>>                   (75, 32) System.setProperty("openejb." +
>>>> JAXWSPROVIDER_PROPERTY, oldProperty);
>>>>                   (344, 34) // 0.
>>>> System.getProperty("openejb.javax.xml.ws.spi.Provider")
>>>>                   (346, 51) String providerClass =
>>>> System.getProperty("openejb." + JAXWSPROVIDER_PROPERTY);
>>>>           org.apache.openejb.util  (6 usages)
>>>>               JuliLogStreamFactory.java  (1 usage)
>>>>                   (54, 46) String prop =
>>>> System.getProperty("openejb.logger.external", "false");
>>>>               Log4jLog.java  (1 usage)
>>>>                   (127, 46) String prop =
>>>> System.getProperty("openejb.logger.external", "false");
>>>>               Log4jLogStreamFactory.java  (1 usage)
>>>>                   (51, 46) String prop =
>>>> System.getProperty("openejb.logger.external", "false");
>>>>               Logger.java  (1 usage)
>>>>                   (29, 49) String factoryName =
>>>> System.getProperty("openejb.log.factory");
>>>>               MakeTxLookup.java  (1 usage)
>>>>                   (33, 54) String[] path = {"classes", "org",
>>>> "apache", "openejb", "hibernate", "TransactionManagerLookup.class"};
>>>>               OpenEjbVersion.java  (1 usage)
>>>>                   (52, 28) System.setProperty("openejb.version",
>>>> version);
>>>>
>>>>
>>>>
>>>> --
>>>> Karan Singh Malhi
>>>>
>>>>
>>>>
>>> --
>>> View this message in context:
>>>
>>> http://www.nabble.com/extracting-openejb-properties-into-a-separate-class-tp18479301p18714591.html
>>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>> --
>> Karan Singh Malhi
>>
>
>


-- 
Karan Singh Malhi

Re: extracting openejb properties into a separate class

Posted by David Blevins <da...@visi.com>.
I had an idea here.  Was just doing some work on OPENEJB-1006 and as  
part of it added some more functionality to the util.Options class.

That's all static methods now, but if we made it an instance that  
wraps a properties instance and optionally delegates to a parent  
options instance we could do some cool things with it.  If everything  
used it we'd have one place where we could log info on what properties  
are getting used and what their values are.

Going to see if I can hack something up.

-David

On Jul 29, 2008, at 9:10 AM, Karan Malhi wrote:

> Hi Jean,
>
> This is great. This kind of documentation is exactly the reason why  
> we are
> trying to extract properties into a separate file. The best option  
> would be
> to create a page on the openejb wiki and post your input about these
> properties on that wiki page.
>
> On Tue, Jul 29, 2008 at 11:34 AM, Jean-Louis MONTEIRO <
> jean-louis.monteiro@atosorigin.com> wrote:
>
>>
>> Hi David and all,
>>
>> I have done such a regexp search cause I want to know each property  
>> to
>> determine impacts.
>> I'm trying to create a document with some inputs one each property  
>> I can.
>>
>> Is there a way to share with the community ?
>>
>> Regards,
>>
>> _________________
>> Jean-Louis MONTEIRO
>>
>> Atos Worldline
>> Architecture and Methodology
>> jean-louis.monteiro@atosorigin.com
>> Tel: +33 (0).2.54.44.75.95
>> 19 rue de la valléé maillard
>> BP 1311
>> 41013 Blois Cedex
>> ---
>> Atos Worldline is an Atos Origin company: www.atosorigin.com
>>
>>
>>
>>
>>
>>
>>
>> KMalhi wrote:
>>>
>>> Will be trying to extract  openejb properties into a separate  
>>> class named
>>> OpenEjbProperties. Since there are a lot of properties being used  
>>> in the
>>> code base, David Blevins suggested that we extract only those  
>>> properties
>>> which would be relevant to the user.
>>>
>>> This would have a couple of benefits:-
>>> 1. Properties would be stored in one central location. Future  
>>> properties
>>> could also be added to this class
>>> 2. Properties could be documented heavily and then a link could be
>>> generated
>>> for the wiki. This will server the purpose of documentation also
>>>
>>> David performed a regex search and found the following properties  
>>> (These
>>> are
>>> also available here
>>>
>> https://issues.apache.org/jira/secure/attachment/12384644/openejb-options-report.txt
>>> ):-
>>> If you feel any property was missed or some property should not be  
>>> added,
>>> then lets comment on this thread. I will try and keep the list
>>> updated (based on the comments)
>>>
>>> Targets
>>>    String '"openejb[^:/ -]'
>>> Found usages  (56 usages)
>>>    Unclassified usage  (56 usages)
>>>        openejb-core  (56 usages)
>>>            org.apache.openejb  (4 usages)
>>>                OpenEJB.java  (4 usages)
>>>                    (90, 39) if
>>> (initProps.getProperty("openejb.nobanner") == null) {
>>>                    (99, 25) logger.info("openejb.home = " +
>>> SystemInstance.get().getHome().getDirectory().getAbsolutePath());
>>>                    (100, 25) logger.info("openejb.base = " +
>>> SystemInstance.get().getBase().getDirectory().getAbsolutePath());
>>>                    (116, 47) className =
>>> props.getProperty("openejb.assembler",
>>> "org.apache.openejb.assembler.classic.Assembler");
>>>            org.apache.openejb.assembler.classic  (5 usages)
>>>                Assembler.java  (1 usage)
>>>                    (101, 56) public static final String
>>> CONFIGURATOR_PROPERTY = "openejb.configurator";
>>>                JndiBuilder.java  (3 usages)
>>>                    (56, 59) private static final String
>>> JNDINAME_STRATEGY_CLASS = "openejb.jndiname.strategy.class";
>>>                    (57, 60) private static final String
>>> JNDINAME_FAILONCOLLISION = "openejb.jndiname.failoncollision";
>>>                    (174, 55) private static final String
>>> JNDINAME_FORMAT = "openejb.jndiname.format";
>>>                JndiEncBuilder.java  (1 usage)
>>>                    (127, 32) if
>>> (System.getProperty("openejb.naming","ivm").equals("xbean")) {
>>>            org.apache.openejb.assembler.classic.cmd  (1 usage)
>>>                Info2Properties.java  (1 usage)
>>>                    (201, 32) if (key.startsWith("openejb.")) {
>>>            org.apache.openejb.cli  (2 usages)
>>>                Bootstrap.java  (2 usages)
>>>                    (32, 62) private final static String
>>> OPENEJB_HOME_PROPERTY_NAME = "openejb.home";
>>>                    (33, 62) private final static String
>>> OPENEJB_BASE_PROPERTY_NAME = "openejb.base";
>>>            org.apache.openejb.client  (2 usages)
>>>                LocalInitialContextFactory.java  (2 usages)
>>>                    (37, 62) private static final String
>>> OPENEJB_EMBEDDED_REMOTABLE = "openejb.embedded.remotable";
>>>                    (62, 42)
>>> SystemInstance.get().setProperty("openejb.embedded", "true");
>>>            org.apache.openejb.config  (28 usages)
>>>                ConfigUtils.java  (2 usages)
>>>                    (45, 72) return
>>>
>> searchForConfiguration 
>> (SystemInstance.get().getProperty("openejb.configuration"));
>>>                    (145, 49) File config = new File(confDir,
>>> "openejb.xml");
>>>                ConfigurationFactory.java  (5 usages)
>>>                    (90, 50) static final String
>>> CONFIGURATION_PROPERTY = "openejb.configuration";
>>>                    (91, 46) static final String CONF_FILE_PROPERTY =
>>> "openejb.conf.file";
>>>                    (92, 66) private static final String
>>> DEBUGGABLE_VM_HACKERY_PROPERTY = "openejb.debuggable-vm-hackery";
>>>                    (94, 62) protected static final String
>>> VALIDATION_SKIP_PROPERTY = "openejb.validation.skip";
>>>                    (107, 52) private static final String
>>> CLASSPATH_AS_EAR = "openejb.deployments.classpath.ear";
>>>                DeploymentsResolver.java  (6 usages)
>>>                    (41, 58) static final String
>>> DEPLOYMENTS_CLASSPATH_PROPERTY = "openejb.deployments.classpath";
>>>                    (43, 53) private static final String
>>> CLASSPATH_INCLUDE = "openejb.deployments.classpath.include";
>>>                    (44, 53) private static final String
>>> CLASSPATH_EXCLUDE = "openejb.deployments.classpath.exclude";
>>>                    (45, 64) private static final String
>>> CLASSPATH_REQUIRE_DESCRIPTOR =
>>> "openejb.deployments.classpath.require.descriptor";
>>>                    (46, 64) private static final String
>>> CLASSPATH_FILTER_DESCRIPTORS =
>>> "openejb.deployments.classpath.filter.descriptors";
>>>                    (47, 63) private static final String
>>> CLASSPATH_FILTER_SYSTEMAPPS =
>>> "openejb.deployments.classpath.filter.systemapps";
>>>                InitEjbDeployments.java  (1 usage)
>>>                    (39, 56) private static final String
>>> DEPLOYMENT_ID_FORMAT = "openejb.deploymentId.format";
>>>                OpenEJBDeploymentFactory.java  (1 usage)
>>>                    (29, 45) public static final String URI_SCHEME =
>>> "openejb";
>>>                OutputGeneratedDescriptors.java  (1 usage)
>>>                    (38, 54) private static final String
>>> OUTPUT_DESCRIPTORS = "openejb.descriptors.output";
>>>                RemoteServer.java  (5 usages)
>>>                    (29, 61) private static final boolean DEBUG =
>>>
>> System 
>> .getProperty 
>> ("openejb.server.debug","false").equalsIgnoreCase("TRUE");
>>>                    (92, 72) lib = new File(new File(new File(home,
>>> "webapps"), "openejb"), "lib");
>>>                    (166, 90) "-Dopenejb.servicemanager.enabled=" +
>>> Boolean.getBoolean("openejb.servicemanager.enabled"),
>>>                    (186, 90) "-Dopenejb.servicemanager.enabled=" +
>>> Boolean.getBoolean("openejb.servicemanager.enabled"),
>>>                    (223, 49) String openejbHome =
>>> System.getProperty("openejb.home");
>>>                ReportValidationResults.java  (1 usage)
>>>                    (35, 52) private static final String
>>> VALIDATION_LEVEL = "openejb.validation.output.level";
>>>                ServiceUtils.java  (3 usages)
>>>                    (47, 27) * 1. System property
>>> "openejb.provider.default" </br>
>>>                    (56, 36) if
>>> (system.getProperty("openejb.embedded") != null){
>>>                    (61, 49) defaultProviderURL =
>>> System.getProperty("openejb.provider.default", defaultValue);
>>>                VmDeploymentFactory.java  (1 usage)
>>>                    (29, 45) public static final String URI_SCHEME =
>>> "openejb";
>>>                VmDeploymentManager.java  (2 usages)
>>>                    (82, 49) String openejbHome =
>>> System.getProperty("openejb.home", "target/openejb-3.0.0-SNAPSHOT");
>>>                    (91, 48) String openejbUri =
>>> System.getProperty("openejb.server.uri");
>>>            org.apache.openejb.config.sys  (1 usage)
>>>                Openejb.java  (1 usage)
>>>                    (55, 24) @XmlRootElement(name = "openejb")
>>>            org.apache.openejb.core.cmp  (2 usages)
>>>                CmpUtil.java  (2 usages)
>>>                    (23, 28) cmpImplClass = "openejb." +  
>>> cmpImplClass;
>>>                    (25, 28) cmpImplClass = "openejb";
>>>            org.apache.openejb.core.ivm  (1 usage)
>>>                BaseEjbProxyHandler.java  (1 usage)
>>>                    (66, 53) private static final String
>>> OPENEJB_LOCALCOPY = "openejb.localcopy";
>>>            org.apache.openejb.core.ivm.naming  (1 usage)
>>>                InitContextFactory.java  (1 usage)
>>>                    (40, 45) String realmName = (String)
>>> env.get("openejb.authentication.realmName");
>>>            org.apache.openejb.core.webservices  (3 usages)
>>>                ProviderWrapper.java  (3 usages)
>>>                    (75, 32) System.setProperty("openejb." +
>>> JAXWSPROVIDER_PROPERTY, oldProperty);
>>>                    (344, 34) // 0.
>>> System.getProperty("openejb.javax.xml.ws.spi.Provider")
>>>                    (346, 51) String providerClass =
>>> System.getProperty("openejb." + JAXWSPROVIDER_PROPERTY);
>>>            org.apache.openejb.util  (6 usages)
>>>                JuliLogStreamFactory.java  (1 usage)
>>>                    (54, 46) String prop =
>>> System.getProperty("openejb.logger.external", "false");
>>>                Log4jLog.java  (1 usage)
>>>                    (127, 46) String prop =
>>> System.getProperty("openejb.logger.external", "false");
>>>                Log4jLogStreamFactory.java  (1 usage)
>>>                    (51, 46) String prop =
>>> System.getProperty("openejb.logger.external", "false");
>>>                Logger.java  (1 usage)
>>>                    (29, 49) String factoryName =
>>> System.getProperty("openejb.log.factory");
>>>                MakeTxLookup.java  (1 usage)
>>>                    (33, 54) String[] path = {"classes", "org",
>>> "apache", "openejb", "hibernate", "TransactionManagerLookup.class"};
>>>                OpenEjbVersion.java  (1 usage)
>>>                    (52, 28) System.setProperty("openejb.version",
>>> version);
>>>
>>>
>>>
>>> --
>>> Karan Singh Malhi
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/extracting-openejb-properties-into-a-separate-class-tp18479301p18714591.html
>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>
>>
>
>
> -- 
> Karan Singh Malhi


Re: extracting openejb properties into a separate class

Posted by Karan Malhi <ka...@gmail.com>.
Hi Jean,

This is great. This kind of documentation is exactly the reason why we are
trying to extract properties into a separate file. The best option would be
to create a page on the openejb wiki and post your input about these
properties on that wiki page.

On Tue, Jul 29, 2008 at 11:34 AM, Jean-Louis MONTEIRO <
jean-louis.monteiro@atosorigin.com> wrote:

>
> Hi David and all,
>
> I have done such a regexp search cause I want to know each property to
> determine impacts.
> I'm trying to create a document with some inputs one each property I can.
>
> Is there a way to share with the community ?
>
> Regards,
>
> _________________
> Jean-Louis MONTEIRO
>
> Atos Worldline
> Architecture and Methodology
> jean-louis.monteiro@atosorigin.com
> Tel: +33 (0).2.54.44.75.95
> 19 rue de la valléé maillard
> BP 1311
> 41013 Blois Cedex
> ---
> Atos Worldline is an Atos Origin company: www.atosorigin.com
>
>
>
>
>
>
>
> KMalhi wrote:
> >
> > Will be trying to extract  openejb properties into a separate class named
> > OpenEjbProperties. Since there are a lot of properties being used in the
> > code base, David Blevins suggested that we extract only those properties
> > which would be relevant to the user.
> >
> > This would have a couple of benefits:-
> > 1. Properties would be stored in one central location. Future properties
> > could also be added to this class
> > 2. Properties could be documented heavily and then a link could be
> > generated
> > for the wiki. This will server the purpose of documentation also
> >
> > David performed a regex search and found the following properties (These
> > are
> > also available here
> >
> https://issues.apache.org/jira/secure/attachment/12384644/openejb-options-report.txt
> > ):-
> > If you feel any property was missed or some property should not be added,
> > then lets comment on this thread. I will try and keep the list
> > updated (based on the comments)
> >
> > Targets
> >     String '"openejb[^:/ -]'
> > Found usages  (56 usages)
> >     Unclassified usage  (56 usages)
> >         openejb-core  (56 usages)
> >             org.apache.openejb  (4 usages)
> >                 OpenEJB.java  (4 usages)
> >                     (90, 39) if
> > (initProps.getProperty("openejb.nobanner") == null) {
> >                     (99, 25) logger.info("openejb.home = " +
> > SystemInstance.get().getHome().getDirectory().getAbsolutePath());
> >                     (100, 25) logger.info("openejb.base = " +
> > SystemInstance.get().getBase().getDirectory().getAbsolutePath());
> >                     (116, 47) className =
> > props.getProperty("openejb.assembler",
> > "org.apache.openejb.assembler.classic.Assembler");
> >             org.apache.openejb.assembler.classic  (5 usages)
> >                 Assembler.java  (1 usage)
> >                     (101, 56) public static final String
> > CONFIGURATOR_PROPERTY = "openejb.configurator";
> >                 JndiBuilder.java  (3 usages)
> >                     (56, 59) private static final String
> > JNDINAME_STRATEGY_CLASS = "openejb.jndiname.strategy.class";
> >                     (57, 60) private static final String
> > JNDINAME_FAILONCOLLISION = "openejb.jndiname.failoncollision";
> >                     (174, 55) private static final String
> > JNDINAME_FORMAT = "openejb.jndiname.format";
> >                 JndiEncBuilder.java  (1 usage)
> >                     (127, 32) if
> > (System.getProperty("openejb.naming","ivm").equals("xbean")) {
> >             org.apache.openejb.assembler.classic.cmd  (1 usage)
> >                 Info2Properties.java  (1 usage)
> >                     (201, 32) if (key.startsWith("openejb.")) {
> >             org.apache.openejb.cli  (2 usages)
> >                 Bootstrap.java  (2 usages)
> >                     (32, 62) private final static String
> > OPENEJB_HOME_PROPERTY_NAME = "openejb.home";
> >                     (33, 62) private final static String
> > OPENEJB_BASE_PROPERTY_NAME = "openejb.base";
> >             org.apache.openejb.client  (2 usages)
> >                 LocalInitialContextFactory.java  (2 usages)
> >                     (37, 62) private static final String
> > OPENEJB_EMBEDDED_REMOTABLE = "openejb.embedded.remotable";
> >                     (62, 42)
> > SystemInstance.get().setProperty("openejb.embedded", "true");
> >             org.apache.openejb.config  (28 usages)
> >                 ConfigUtils.java  (2 usages)
> >                     (45, 72) return
> >
> searchForConfiguration(SystemInstance.get().getProperty("openejb.configuration"));
> >                     (145, 49) File config = new File(confDir,
> > "openejb.xml");
> >                 ConfigurationFactory.java  (5 usages)
> >                     (90, 50) static final String
> > CONFIGURATION_PROPERTY = "openejb.configuration";
> >                     (91, 46) static final String CONF_FILE_PROPERTY =
> > "openejb.conf.file";
> >                     (92, 66) private static final String
> > DEBUGGABLE_VM_HACKERY_PROPERTY = "openejb.debuggable-vm-hackery";
> >                     (94, 62) protected static final String
> > VALIDATION_SKIP_PROPERTY = "openejb.validation.skip";
> >                     (107, 52) private static final String
> > CLASSPATH_AS_EAR = "openejb.deployments.classpath.ear";
> >                 DeploymentsResolver.java  (6 usages)
> >                     (41, 58) static final String
> > DEPLOYMENTS_CLASSPATH_PROPERTY = "openejb.deployments.classpath";
> >                     (43, 53) private static final String
> > CLASSPATH_INCLUDE = "openejb.deployments.classpath.include";
> >                     (44, 53) private static final String
> > CLASSPATH_EXCLUDE = "openejb.deployments.classpath.exclude";
> >                     (45, 64) private static final String
> > CLASSPATH_REQUIRE_DESCRIPTOR =
> > "openejb.deployments.classpath.require.descriptor";
> >                     (46, 64) private static final String
> > CLASSPATH_FILTER_DESCRIPTORS =
> > "openejb.deployments.classpath.filter.descriptors";
> >                     (47, 63) private static final String
> > CLASSPATH_FILTER_SYSTEMAPPS =
> > "openejb.deployments.classpath.filter.systemapps";
> >                 InitEjbDeployments.java  (1 usage)
> >                     (39, 56) private static final String
> > DEPLOYMENT_ID_FORMAT = "openejb.deploymentId.format";
> >                 OpenEJBDeploymentFactory.java  (1 usage)
> >                     (29, 45) public static final String URI_SCHEME =
> > "openejb";
> >                 OutputGeneratedDescriptors.java  (1 usage)
> >                     (38, 54) private static final String
> > OUTPUT_DESCRIPTORS = "openejb.descriptors.output";
> >                 RemoteServer.java  (5 usages)
> >                     (29, 61) private static final boolean DEBUG =
> >
> System.getProperty("openejb.server.debug","false").equalsIgnoreCase("TRUE");
> >                     (92, 72) lib = new File(new File(new File(home,
> > "webapps"), "openejb"), "lib");
> >                     (166, 90) "-Dopenejb.servicemanager.enabled=" +
> > Boolean.getBoolean("openejb.servicemanager.enabled"),
> >                     (186, 90) "-Dopenejb.servicemanager.enabled=" +
> > Boolean.getBoolean("openejb.servicemanager.enabled"),
> >                     (223, 49) String openejbHome =
> > System.getProperty("openejb.home");
> >                 ReportValidationResults.java  (1 usage)
> >                     (35, 52) private static final String
> > VALIDATION_LEVEL = "openejb.validation.output.level";
> >                 ServiceUtils.java  (3 usages)
> >                     (47, 27) * 1. System property
> > "openejb.provider.default" </br>
> >                     (56, 36) if
> > (system.getProperty("openejb.embedded") != null){
> >                     (61, 49) defaultProviderURL =
> > System.getProperty("openejb.provider.default", defaultValue);
> >                 VmDeploymentFactory.java  (1 usage)
> >                     (29, 45) public static final String URI_SCHEME =
> > "openejb";
> >                 VmDeploymentManager.java  (2 usages)
> >                     (82, 49) String openejbHome =
> > System.getProperty("openejb.home", "target/openejb-3.0.0-SNAPSHOT");
> >                     (91, 48) String openejbUri =
> > System.getProperty("openejb.server.uri");
> >             org.apache.openejb.config.sys  (1 usage)
> >                 Openejb.java  (1 usage)
> >                     (55, 24) @XmlRootElement(name = "openejb")
> >             org.apache.openejb.core.cmp  (2 usages)
> >                 CmpUtil.java  (2 usages)
> >                     (23, 28) cmpImplClass = "openejb." + cmpImplClass;
> >                     (25, 28) cmpImplClass = "openejb";
> >             org.apache.openejb.core.ivm  (1 usage)
> >                 BaseEjbProxyHandler.java  (1 usage)
> >                     (66, 53) private static final String
> > OPENEJB_LOCALCOPY = "openejb.localcopy";
> >             org.apache.openejb.core.ivm.naming  (1 usage)
> >                 InitContextFactory.java  (1 usage)
> >                     (40, 45) String realmName = (String)
> > env.get("openejb.authentication.realmName");
> >             org.apache.openejb.core.webservices  (3 usages)
> >                 ProviderWrapper.java  (3 usages)
> >                     (75, 32) System.setProperty("openejb." +
> > JAXWSPROVIDER_PROPERTY, oldProperty);
> >                     (344, 34) // 0.
> > System.getProperty("openejb.javax.xml.ws.spi.Provider")
> >                     (346, 51) String providerClass =
> > System.getProperty("openejb." + JAXWSPROVIDER_PROPERTY);
> >             org.apache.openejb.util  (6 usages)
> >                 JuliLogStreamFactory.java  (1 usage)
> >                     (54, 46) String prop =
> > System.getProperty("openejb.logger.external", "false");
> >                 Log4jLog.java  (1 usage)
> >                     (127, 46) String prop =
> > System.getProperty("openejb.logger.external", "false");
> >                 Log4jLogStreamFactory.java  (1 usage)
> >                     (51, 46) String prop =
> > System.getProperty("openejb.logger.external", "false");
> >                 Logger.java  (1 usage)
> >                     (29, 49) String factoryName =
> > System.getProperty("openejb.log.factory");
> >                 MakeTxLookup.java  (1 usage)
> >                     (33, 54) String[] path = {"classes", "org",
> > "apache", "openejb", "hibernate", "TransactionManagerLookup.class"};
> >                 OpenEjbVersion.java  (1 usage)
> >                     (52, 28) System.setProperty("openejb.version",
> > version);
> >
> >
> >
> > --
> > Karan Singh Malhi
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/extracting-openejb-properties-into-a-separate-class-tp18479301p18714591.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>
>


-- 
Karan Singh Malhi

Re: extracting openejb properties into a separate class

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi David and all,

I have done such a regexp search cause I want to know each property to
determine impacts.
I'm trying to create a document with some inputs one each property I can.

Is there a way to share with the community ?

Regards,

_________________
Jean-Louis MONTEIRO

Atos Worldline
Architecture and Methodology
jean-louis.monteiro@atosorigin.com
Tel: +33 (0).2.54.44.75.95
19 rue de la valléé maillard
BP 1311
41013 Blois Cedex
---
Atos Worldline is an Atos Origin company: www.atosorigin.com







KMalhi wrote:
> 
> Will be trying to extract  openejb properties into a separate class named
> OpenEjbProperties. Since there are a lot of properties being used in the
> code base, David Blevins suggested that we extract only those properties
> which would be relevant to the user.
> 
> This would have a couple of benefits:-
> 1. Properties would be stored in one central location. Future properties
> could also be added to this class
> 2. Properties could be documented heavily and then a link could be
> generated
> for the wiki. This will server the purpose of documentation also
> 
> David performed a regex search and found the following properties (These
> are
> also available here
> https://issues.apache.org/jira/secure/attachment/12384644/openejb-options-report.txt
> ):-
> If you feel any property was missed or some property should not be added,
> then lets comment on this thread. I will try and keep the list
> updated (based on the comments)
> 
> Targets
>     String '"openejb[^:/ -]'
> Found usages  (56 usages)
>     Unclassified usage  (56 usages)
>         openejb-core  (56 usages)
>             org.apache.openejb  (4 usages)
>                 OpenEJB.java  (4 usages)
>                     (90, 39) if
> (initProps.getProperty("openejb.nobanner") == null) {
>                     (99, 25) logger.info("openejb.home = " +
> SystemInstance.get().getHome().getDirectory().getAbsolutePath());
>                     (100, 25) logger.info("openejb.base = " +
> SystemInstance.get().getBase().getDirectory().getAbsolutePath());
>                     (116, 47) className =
> props.getProperty("openejb.assembler",
> "org.apache.openejb.assembler.classic.Assembler");
>             org.apache.openejb.assembler.classic  (5 usages)
>                 Assembler.java  (1 usage)
>                     (101, 56) public static final String
> CONFIGURATOR_PROPERTY = "openejb.configurator";
>                 JndiBuilder.java  (3 usages)
>                     (56, 59) private static final String
> JNDINAME_STRATEGY_CLASS = "openejb.jndiname.strategy.class";
>                     (57, 60) private static final String
> JNDINAME_FAILONCOLLISION = "openejb.jndiname.failoncollision";
>                     (174, 55) private static final String
> JNDINAME_FORMAT = "openejb.jndiname.format";
>                 JndiEncBuilder.java  (1 usage)
>                     (127, 32) if
> (System.getProperty("openejb.naming","ivm").equals("xbean")) {
>             org.apache.openejb.assembler.classic.cmd  (1 usage)
>                 Info2Properties.java  (1 usage)
>                     (201, 32) if (key.startsWith("openejb.")) {
>             org.apache.openejb.cli  (2 usages)
>                 Bootstrap.java  (2 usages)
>                     (32, 62) private final static String
> OPENEJB_HOME_PROPERTY_NAME = "openejb.home";
>                     (33, 62) private final static String
> OPENEJB_BASE_PROPERTY_NAME = "openejb.base";
>             org.apache.openejb.client  (2 usages)
>                 LocalInitialContextFactory.java  (2 usages)
>                     (37, 62) private static final String
> OPENEJB_EMBEDDED_REMOTABLE = "openejb.embedded.remotable";
>                     (62, 42)
> SystemInstance.get().setProperty("openejb.embedded", "true");
>             org.apache.openejb.config  (28 usages)
>                 ConfigUtils.java  (2 usages)
>                     (45, 72) return
> searchForConfiguration(SystemInstance.get().getProperty("openejb.configuration"));
>                     (145, 49) File config = new File(confDir,
> "openejb.xml");
>                 ConfigurationFactory.java  (5 usages)
>                     (90, 50) static final String
> CONFIGURATION_PROPERTY = "openejb.configuration";
>                     (91, 46) static final String CONF_FILE_PROPERTY =
> "openejb.conf.file";
>                     (92, 66) private static final String
> DEBUGGABLE_VM_HACKERY_PROPERTY = "openejb.debuggable-vm-hackery";
>                     (94, 62) protected static final String
> VALIDATION_SKIP_PROPERTY = "openejb.validation.skip";
>                     (107, 52) private static final String
> CLASSPATH_AS_EAR = "openejb.deployments.classpath.ear";
>                 DeploymentsResolver.java  (6 usages)
>                     (41, 58) static final String
> DEPLOYMENTS_CLASSPATH_PROPERTY = "openejb.deployments.classpath";
>                     (43, 53) private static final String
> CLASSPATH_INCLUDE = "openejb.deployments.classpath.include";
>                     (44, 53) private static final String
> CLASSPATH_EXCLUDE = "openejb.deployments.classpath.exclude";
>                     (45, 64) private static final String
> CLASSPATH_REQUIRE_DESCRIPTOR =
> "openejb.deployments.classpath.require.descriptor";
>                     (46, 64) private static final String
> CLASSPATH_FILTER_DESCRIPTORS =
> "openejb.deployments.classpath.filter.descriptors";
>                     (47, 63) private static final String
> CLASSPATH_FILTER_SYSTEMAPPS =
> "openejb.deployments.classpath.filter.systemapps";
>                 InitEjbDeployments.java  (1 usage)
>                     (39, 56) private static final String
> DEPLOYMENT_ID_FORMAT = "openejb.deploymentId.format";
>                 OpenEJBDeploymentFactory.java  (1 usage)
>                     (29, 45) public static final String URI_SCHEME =
> "openejb";
>                 OutputGeneratedDescriptors.java  (1 usage)
>                     (38, 54) private static final String
> OUTPUT_DESCRIPTORS = "openejb.descriptors.output";
>                 RemoteServer.java  (5 usages)
>                     (29, 61) private static final boolean DEBUG =
> System.getProperty("openejb.server.debug","false").equalsIgnoreCase("TRUE");
>                     (92, 72) lib = new File(new File(new File(home,
> "webapps"), "openejb"), "lib");
>                     (166, 90) "-Dopenejb.servicemanager.enabled=" +
> Boolean.getBoolean("openejb.servicemanager.enabled"),
>                     (186, 90) "-Dopenejb.servicemanager.enabled=" +
> Boolean.getBoolean("openejb.servicemanager.enabled"),
>                     (223, 49) String openejbHome =
> System.getProperty("openejb.home");
>                 ReportValidationResults.java  (1 usage)
>                     (35, 52) private static final String
> VALIDATION_LEVEL = "openejb.validation.output.level";
>                 ServiceUtils.java  (3 usages)
>                     (47, 27) * 1. System property
> "openejb.provider.default" </br>
>                     (56, 36) if
> (system.getProperty("openejb.embedded") != null){
>                     (61, 49) defaultProviderURL =
> System.getProperty("openejb.provider.default", defaultValue);
>                 VmDeploymentFactory.java  (1 usage)
>                     (29, 45) public static final String URI_SCHEME =
> "openejb";
>                 VmDeploymentManager.java  (2 usages)
>                     (82, 49) String openejbHome =
> System.getProperty("openejb.home", "target/openejb-3.0.0-SNAPSHOT");
>                     (91, 48) String openejbUri =
> System.getProperty("openejb.server.uri");
>             org.apache.openejb.config.sys  (1 usage)
>                 Openejb.java  (1 usage)
>                     (55, 24) @XmlRootElement(name = "openejb")
>             org.apache.openejb.core.cmp  (2 usages)
>                 CmpUtil.java  (2 usages)
>                     (23, 28) cmpImplClass = "openejb." + cmpImplClass;
>                     (25, 28) cmpImplClass = "openejb";
>             org.apache.openejb.core.ivm  (1 usage)
>                 BaseEjbProxyHandler.java  (1 usage)
>                     (66, 53) private static final String
> OPENEJB_LOCALCOPY = "openejb.localcopy";
>             org.apache.openejb.core.ivm.naming  (1 usage)
>                 InitContextFactory.java  (1 usage)
>                     (40, 45) String realmName = (String)
> env.get("openejb.authentication.realmName");
>             org.apache.openejb.core.webservices  (3 usages)
>                 ProviderWrapper.java  (3 usages)
>                     (75, 32) System.setProperty("openejb." +
> JAXWSPROVIDER_PROPERTY, oldProperty);
>                     (344, 34) // 0.
> System.getProperty("openejb.javax.xml.ws.spi.Provider")
>                     (346, 51) String providerClass =
> System.getProperty("openejb." + JAXWSPROVIDER_PROPERTY);
>             org.apache.openejb.util  (6 usages)
>                 JuliLogStreamFactory.java  (1 usage)
>                     (54, 46) String prop =
> System.getProperty("openejb.logger.external", "false");
>                 Log4jLog.java  (1 usage)
>                     (127, 46) String prop =
> System.getProperty("openejb.logger.external", "false");
>                 Log4jLogStreamFactory.java  (1 usage)
>                     (51, 46) String prop =
> System.getProperty("openejb.logger.external", "false");
>                 Logger.java  (1 usage)
>                     (29, 49) String factoryName =
> System.getProperty("openejb.log.factory");
>                 MakeTxLookup.java  (1 usage)
>                     (33, 54) String[] path = {"classes", "org",
> "apache", "openejb", "hibernate", "TransactionManagerLookup.class"};
>                 OpenEjbVersion.java  (1 usage)
>                     (52, 28) System.setProperty("openejb.version",
> version);
> 
> 
> 
> -- 
> Karan Singh Malhi
> 
> 

-- 
View this message in context: http://www.nabble.com/extracting-openejb-properties-into-a-separate-class-tp18479301p18714591.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.


Re: extracting openejb properties into a separate class

Posted by David Blevins <da...@visi.com>.
On Jul 15, 2008, at 8:05 PM, Karan Malhi wrote:

> Will be trying to extract  openejb properties into a separate class  
> named
> OpenEjbProperties. Since there are a lot of properties being used in  
> the
> code base, David Blevins suggested that we extract only those  
> properties
> which would be relevant to the user.
>

Here are the ones users might care about from openejb-core:

openejb.authentication.realmName
openejb.base
openejb.configuration
openejb.deploymentId.format
openejb.deployments.classpath
openejb.deployments.classpath.ear
openejb.deployments.classpath.exclude
openejb.deployments.classpath.filter.descriptors
openejb.deployments.classpath.filter.systemapps
openejb.deployments.classpath.include
openejb.deployments.classpath.require.descriptor
openejb.deployments.classpath.ear
openejb.descriptors.output
openejb.embedded.remotable
openejb.home
openejb.jndiname.failoncollision
openejb.jndiname.format
openejb.jndiname.strategy.class
openejb.localcopy
openejb.log.factory
openejb.nobanner
openejb.provider.default
openejb.validation.output.level
openejb.validation.skip
openejb.version

-David