Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-07 Thread Konstantin Kolinko
чт, 6 дек. 2018 г. в 16:42, Mark Thomas :
>
> On 05/12/2018 20:40, Rémy Maucherat wrote:
> > On Wed, Dec 5, 2018 at 9:17 PM Mark Thomas  wrote:
> >
> >> On 05/12/2018 20:03, Rémy Maucherat wrote:
> >>> On Wed, Dec 5, 2018 at 5:37 PM  wrote:
> >>>
>  Author: remm
>  Date: Wed Dec  5 16:37:42 2018
>  New Revision: 1848225
> 
>  URL: http://svn.apache.org/viewvc?rev=1848225=rev
>  Log:
>  Add i18n for the loader package.
> 
>  I have at least 350 more strings to add.
> >>>
> >>> I don't know what to do with:
> >>> - the bootstrap.jar strings: nothing ?
> >>
> >> Refactor StringManager to JULI? It is somewhat logging related so that
> >> doesn't seem completely crazy.
> >>
> >
> > Ok, why not.
>
> Apart from the fact it would mean touching almost every class in Tomcat?
>
> Seriously, the more I think about it the more I like it. Move the res
> package from o.a.tomcat.util.res o.a.juli.res and deprecate the old one
> along with the copy in tribes. And then remove the old ones in 10.x

JULI and JDBC pool can be used standalone, without Tomcat. It does not
make much sense to localize those.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-07 Thread Rémy Maucherat
On Fri, Dec 7, 2018 at 6:53 PM Mark Thomas  wrote:

> On 06/12/2018 14:08, Rémy Maucherat wrote:
> > On Thu, Dec 6, 2018 at 2:42 PM Mark Thomas  wrote:
> >
> >>> Ok, why not.
> >>
> >> Apart from the fact it would mean touching almost every class in Tomcat?
> >>
> >> Seriously, the more I think about it the more I like it. Move the res
> >> package from o.a.tomcat.util.res o.a.juli.res and deprecate the old one
> >> along with the copy in tribes. And then remove the old ones in 10.x
> >>
> >
> > There's another problem with that startup package where the bundles of
> the
> > actual bootstrap are shared with the rest (ContextConfig, etc). Also, is
> it
> > really good to start shipping plenty of resources in a "small" bootstrap
> ?
> > Open questions.
>
> Indeed. I don't think we are under any pressure to find an answer in a
> hurry. We can keep discussing until we have a solution that everyone is
> happy with.
>
> Should we move the bootstrap classes to a separate package?
>
> That won't address the issues of how to package the resource files for
> that package.
>
> Size shouldn't be too much of an issue with the scope limited to just
> bootstrap. But if they are all in a single JAR disabling a language by
> deleting the JAR won't work for the bootstrap resources. I don't think
> per language bootstrap resource JARs are the solution.
>

As a refinement, the bootstrap resources could go in a subpackage of
startup, that avoids any API change issue. For packaging, I would put them
in bootstrap.jar, there's no real way to do otherwise. Anyway, it's not
really important, there's nothing very interesting in those strings, so
maybe it's only a rhetorical issue and nothing will be done.

I still have about 200 strings to go for the core Tomcat, excluding DBCP
and others.

Rémy


Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-07 Thread Mark Thomas
On 06/12/2018 14:08, Rémy Maucherat wrote:
> On Thu, Dec 6, 2018 at 2:42 PM Mark Thomas  wrote:
> 
>>> Ok, why not.
>>
>> Apart from the fact it would mean touching almost every class in Tomcat?
>>
>> Seriously, the more I think about it the more I like it. Move the res
>> package from o.a.tomcat.util.res o.a.juli.res and deprecate the old one
>> along with the copy in tribes. And then remove the old ones in 10.x
>>
> 
> There's another problem with that startup package where the bundles of the
> actual bootstrap are shared with the rest (ContextConfig, etc). Also, is it
> really good to start shipping plenty of resources in a "small" bootstrap ?
> Open questions.

Indeed. I don't think we are under any pressure to find an answer in a
hurry. We can keep discussing until we have a solution that everyone is
happy with.

Should we move the bootstrap classes to a separate package?

That won't address the issues of how to package the resource files for
that package.

Size shouldn't be too much of an issue with the scope limited to just
bootstrap. But if they are all in a single JAR disabling a language by
deleting the JAR won't work for the bootstrap resources. I don't think
per language bootstrap resource JARs are the solution.


> - the "upstream" strings: dbcp, pool, bcel, fileupload

 We could 'fix' them. It would mean the code diverging further from the
 original which will make syncing harder. Roughly how many Strings are we
 talking about here?

>>>
>>> About 200.
>>
>> Hmm. DBCP2 already has simple l10n support along the lines of:
>>
>> private static final ResourceBundle messages = ResourceBundle.getBundle(
>> Utils.class.getPackage().getName() + ".LocalStrings");
>>
>> That could be extended. Every ASF committer has commit access to Commons
>> so I guess it could just be fixed at source. I'll volunteer to merge the
>> changes back into Tomcat.
>>
>> Pool2 doesn't use a ResourceBundle but I don't see why it couldn't. Same
>> for FileUpload.
>>
>> BCEL code is so far removed from Commons BCEL I'd probably just fix it
>> locally.
>>
> 
> Ok. OTOH about DBCP it's surprising there's something because in other
> places you find this kind of code which means nobody cares at all:
> stringBuilder.append(NUPROP_WARNTEXT.get(propertyName)).append(" You have
> set value of \"")
> .append(propertyValue).append("\" for
> \"").append(propertyName)
> .append("\" property, which is being ignored.");
> 
> For sure fixing this will be done last ;)

Yep.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-06 Thread Rémy Maucherat
On Thu, Dec 6, 2018 at 2:42 PM Mark Thomas  wrote:

> > Ok, why not.
>
> Apart from the fact it would mean touching almost every class in Tomcat?
>
> Seriously, the more I think about it the more I like it. Move the res
> package from o.a.tomcat.util.res o.a.juli.res and deprecate the old one
> along with the copy in tribes. And then remove the old ones in 10.x
>

There's another problem with that startup package where the bundles of the
actual bootstrap are shared with the rest (ContextConfig, etc). Also, is it
really good to start shipping plenty of resources in a "small" bootstrap ?
Open questions.

>
> >>> - the "upstream" strings: dbcp, pool, bcel, fileupload
> >>
> >> We could 'fix' them. It would mean the code diverging further from the
> >> original which will make syncing harder. Roughly how many Strings are we
> >> talking about here?
> >>
> >
> > About 200.
>
> Hmm. DBCP2 already has simple l10n support along the lines of:
>
> private static final ResourceBundle messages = ResourceBundle.getBundle(
> Utils.class.getPackage().getName() + ".LocalStrings");
>
> That could be extended. Every ASF committer has commit access to Commons
> so I guess it could just be fixed at source. I'll volunteer to merge the
> changes back into Tomcat.
>
> Pool2 doesn't use a ResourceBundle but I don't see why it couldn't. Same
> for FileUpload.
>
> BCEL code is so far removed from Commons BCEL I'd probably just fix it
> locally.
>

Ok. OTOH about DBCP it's surprising there's something because in other
places you find this kind of code which means nobody cares at all:
stringBuilder.append(NUPROP_WARNTEXT.get(propertyName)).append(" You have
set value of \"")
.append(propertyValue).append("\" for
\"").append(propertyName)
.append("\" property, which is being ignored.");

For sure fixing this will be done last ;)

Rémy


Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-06 Thread Mark Thomas
On 05/12/2018 20:40, Rémy Maucherat wrote:
> On Wed, Dec 5, 2018 at 9:17 PM Mark Thomas  wrote:
> 
>> On 05/12/2018 20:03, Rémy Maucherat wrote:
>>> On Wed, Dec 5, 2018 at 5:37 PM  wrote:
>>>
 Author: remm
 Date: Wed Dec  5 16:37:42 2018
 New Revision: 1848225

 URL: http://svn.apache.org/viewvc?rev=1848225=rev
 Log:
 Add i18n for the loader package.

 I have at least 350 more strings to add.
>>>
>>> I don't know what to do with:
>>> - the bootstrap.jar strings: nothing ?
>>
>> Refactor StringManager to JULI? It is somewhat logging related so that
>> doesn't seem completely crazy.
>>
> 
> Ok, why not.

Apart from the fact it would mean touching almost every class in Tomcat?

Seriously, the more I think about it the more I like it. Move the res
package from o.a.tomcat.util.res o.a.juli.res and deprecate the old one
along with the copy in tribes. And then remove the old ones in 10.x

>>> - the "upstream" strings: dbcp, pool, bcel, fileupload
>>
>> We could 'fix' them. It would mean the code diverging further from the
>> original which will make syncing harder. Roughly how many Strings are we
>> talking about here?
>>
> 
> About 200.

Hmm. DBCP2 already has simple l10n support along the lines of:

private static final ResourceBundle messages = ResourceBundle.getBundle(
Utils.class.getPackage().getName() + ".LocalStrings");

That could be extended. Every ASF committer has commit access to Commons
so I guess it could just be fixed at source. I'll volunteer to merge the
changes back into Tomcat.

Pool2 doesn't use a ResourceBundle but I don't see why it couldn't. Same
for FileUpload.

BCEL code is so far removed from Commons BCEL I'd probably just fix it
locally.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-05 Thread Rémy Maucherat
On Wed, Dec 5, 2018 at 9:17 PM Mark Thomas  wrote:

> On 05/12/2018 20:03, Rémy Maucherat wrote:
> > On Wed, Dec 5, 2018 at 5:37 PM  wrote:
> >
> >> Author: remm
> >> Date: Wed Dec  5 16:37:42 2018
> >> New Revision: 1848225
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1848225=rev
> >> Log:
> >> Add i18n for the loader package.
> >>
> >> I have at least 350 more strings to add.
> >
> > I don't know what to do with:
> > - the bootstrap.jar strings: nothing ?
>
> Refactor StringManager to JULI? It is somewhat logging related so that
> doesn't seem completely crazy.
>

Ok, why not.

>
> > - the "upstream" strings: dbcp, pool, bcel, fileupload
>
> We could 'fix' them. It would mean the code diverging further from the
> original which will make syncing harder. Roughly how many Strings are we
> talking about here?
>

About 200.

Rémy


Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-05 Thread Mark Thomas
On 05/12/2018 20:03, Rémy Maucherat wrote:
> On Wed, Dec 5, 2018 at 5:37 PM  wrote:
> 
>> Author: remm
>> Date: Wed Dec  5 16:37:42 2018
>> New Revision: 1848225
>>
>> URL: http://svn.apache.org/viewvc?rev=1848225=rev
>> Log:
>> Add i18n for the loader package.
>>
>> I have at least 350 more strings to add.
> 
> I don't know what to do with:
> - the bootstrap.jar strings: nothing ?

Refactor StringManager to JULI? It is somewhat logging related so that
doesn't seem completely crazy.

> - the "upstream" strings: dbcp, pool, bcel, fileupload

We could 'fix' them. It would mean the code diverging further from the
original which will make syncing harder. Roughly how many Strings are we
talking about here?

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1848225 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoaderBase.java WebappLoader.java

2018-12-05 Thread Rémy Maucherat
On Wed, Dec 5, 2018 at 5:37 PM  wrote:

> Author: remm
> Date: Wed Dec  5 16:37:42 2018
> New Revision: 1848225
>
> URL: http://svn.apache.org/viewvc?rev=1848225=rev
> Log:
> Add i18n for the loader package.
>
> I have at least 350 more strings to add.

I don't know what to do with:
- the bootstrap.jar strings: nothing ?
- the "upstream" strings: dbcp, pool, bcel, fileupload

Rémy