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 2007/08/22 20:27:14 UTC

Re: svn commit: r568707 - in /openejb/trunk/openejb3/container/openejb-core/src/main: java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java resources/org/apache/openejb/config/Messages.properties

I really liked the way the properties were added to the
Messages.properties file i.e. with th e actual code commented out
above the property and also mentioning the log level and the class
name. Becomes so much easier to read the messages in the properties
file and relate them back to the actual line in code which the message
is for.

On 8/22/07, dblevins@apache.org <db...@apache.org> wrote:
> Author: dblevins
> Date: Wed Aug 22 10:22:39 2007
> New Revision: 568707
>
> URL: http://svn.apache.org/viewvc?rev=568707&view=rev
> Log:
> Adding i18n messages to EnvEntriesPropertiesDeployer
>
> Modified:
>     openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
>     openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties
>
> Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java?rev=568707&r1=568706&r2=568707&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java (original)
> +++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java Wed Aug 22 10:22:39 2007
> @@ -111,7 +111,7 @@
>
>              return new HashMap(envEntriesProps);
>          } catch (IOException e) {
> -            log.error("envprops.notLoaded", e, propsUrl.toExternalForm());
> +            log.error("envprops.notLoaded", e, module.getModuleId(), propsUrl.toExternalForm());
>              return Collections.EMPTY_MAP;
>          }
>      }
>
> Modified: openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties?rev=568707&r1=568706&r2=568707&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties (original)
> +++ openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/config/Messages.properties Wed Aug 22 10:22:39 2007
> @@ -43,4 +43,14 @@
>  cmd.deploy.destExists = Application already deployed at '{1}'
>
>  # throw new DeploymentTerminatedException(messages.format("cmd.deploy.cantCopy", file.getAbsolutePath(), destFile.getAbsolutePath()));
> -cmd.deploy.cantCopy = Unable to copy application to '{1}'.  Check that the directory is writable and that there is enough disk space.
> \ No newline at end of file
> +cmd.deploy.cantCopy = Unable to copy application to '{1}'.  Check that the directory is writable and that there is enough disk space.
> +
> +# EnvEntriesPropertiesDeployer
> +# debug("envprops.override", componentName, entry.getName(), entry.getEnvEntryValue(), newEntry.getEnvEntryValue());
> +envprops.override = Overriding env-entry(name '{1}', old-value='{2}', new-value='{3}'), Bean='{0}'
> +
> +# debug("envprops.add", componentName, newEntry.getName(), newEntry.getEnvEntryValue());
> +envprops.add = Adding env-entry(name='{1}', value='{2}', type='java.lang.String'), Bean='{0}'
> +
> +# error("envprops.notLoaded", e, module.getModuleId(), propsUrl.toExternalForm());
> +envprops.notLoaded = Could not load META-INF/env-entries.properties for module '{0}'.
> \ No newline at end of file
>
>
>


-- 
Karan Singh Malhi

Re: svn commit: r568707 - in /openejb/trunk/openejb3/container/openejb-core/src/main: java/org/apache/openejb/config/EnvEntriesPropertiesDeployer.java resources/org/apache/openejb/config/Messages.properties

Posted by David Blevins <da...@visi.com>.
On Aug 22, 2007, at 11:27 AM, Karan Malhi wrote:

> I really liked the way the properties were added to the
> Messages.properties file i.e. with th e actual code commented out
> above the property and also mentioning the log level and the class
> name. Becomes so much easier to read the messages in the properties
> file and relate them back to the actual line in code which the message
> is for.

No doubt.  I *really* wish I had been doing this all along.  At least  
have a good convention now :)

-David


>
> On 8/22/07, dblevins@apache.org <db...@apache.org> wrote:
>> Author: dblevins
[...]
>> +# EnvEntriesPropertiesDeployer
>> +# debug("envprops.override", componentName, entry.getName(),  
>> entry.getEnvEntryValue(), newEntry.getEnvEntryValue());
>> +envprops.override = Overriding env-entry(name '{1}', old- 
>> value='{2}', new-value='{3}'), Bean='{0}'
>> +
>> +# debug("envprops.add", componentName, newEntry.getName(),  
>> newEntry.getEnvEntryValue());
>> +envprops.add = Adding env-entry(name='{1}', value='{2}',  
>> type='java.lang.String'), Bean='{0}'
>> +
>> +# error("envprops.notLoaded", e, module.getModuleId(),  
>> propsUrl.toExternalForm());
>> +envprops.notLoaded = Could not load META-INF/env- 
>> entries.properties for module '{0}'.
>> \ No newline at end of file
>>
>>
>>
>
>
> -- 
> Karan Singh Malhi
>