Skip to main content

[webtier] naming conventions for LogStrings

3 replies [Last post]
Anonymous

Hello,

workings on my changes to Valve-declarations in sun-web.xml I of course
want to react to error situations with appropriate log messages.

Now having looked at LogStrings.properties I wonder what the conventions
are.

First of all: This file seems to be in a little mess, if I might say so ;-)

Most messages contain numbers and these seem to be grouped (WEB0300...,
WEB0400...) but quite a lot are not unique (WEB0137, WEB0141 and some
more). There is even one messages that does not have any number at all
(webcontainer.missingmetro).

More relevant for my implementation: Within groups numbers are only
incremented with every message. Is that correct?

Also: All current valve related messages are in the number block
PEWebContainer. Should I add my messages there?

And finally I am curious what the numbers are good for any way. Is there
anywhere, where more information is available to these numbers than the
actual message text?

--
Wolfram

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

Hi Wolfram,

I agree the PWC error numbers are kind of useless. They had been
introduced by the webserver team, at the time when the web container
codebase was shared by both webserver and appserver products.

I didn't think the concept was well thought out, though, because it was
hard to maintain the numbering in a consistent way, there was no provision
against range overflow, and no protection against duplicate error number
assignments (as you found out yourself).

I think we should retire the PWC error numbers over time, and
definitely not add any new ones.

I'm glad to see that you are making progress!

Thanks,

Jan

On 01/18/09 09:47, Wolfram Rittmeyer wrote:
> Hello,
>
> workings on my changes to Valve-declarations in sun-web.xml I of
> course want to react to error situations with appropriate log messages.
>
> Now having looked at LogStrings.properties I wonder what the
> conventions are.
>
> First of all: This file seems to be in a little mess, if I might say
> so ;-)
>
> Most messages contain numbers and these seem to be grouped
> (WEB0300..., WEB0400...) but quite a lot are not unique (WEB0137,
> WEB0141 and some more). There is even one messages that does not have
> any number at all (webcontainer.missingmetro).
>
> More relevant for my implementation: Within groups numbers are only
> incremented with every message. Is that correct?
>
> Also: All current valve related messages are in the number block
> PEWebContainer. Should I add my messages there?
>
> And finally I am curious what the numbers are good for any way. Is
> there anywhere, where more information is available to these numbers
> than the actual message text?
>
>
> --
> Wolfram
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Wolfram Rittmeyer

Jan Luehe wrote:
> Hi Wolfram,
>
(...)
>
> I think we should retire the PWC error numbers over time, and
> definitely not add any new ones.
>
So I will not add any numbers to my messages.

> I'm glad to see that you are making progress!

I think I am nearly done. Of course it needs some testing before
submitting a patch ;-)

Roughly speaking I have created a descriptor and a node (deployment) and
added methods to add Valves to SunWebApp to reflect the changes in the
sun-web.xml file. Then I used these information in WebModule to actually
add the Valves specified in the deployment descriptor. Some minor
changes in other files (e.g. the dtd) were also necessary of course.

I did not write any AMX-related classes. I guess they are not necessary
for this kind of task. Is this correct?

Another question:
There is a method writeDescriptor(...) in WebBundleRuntimeNode. I added
my changes there as well. But when is this method called?

--
Wolfram Rittmeyer

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Jan Luehe

Hi Wolfram,

On 01/26/09 23:02, Wolfram Rittmeyer wrote:
> Jan Luehe wrote:
>> Hi Wolfram,
>>
> (...)
>>
>> I think we should retire the PWC error numbers over time, and
>> definitely not add any new ones.
>>
> So I will not add any numbers to my messages.

Correct.
>
>> I'm glad to see that you are making progress!
>
> I think I am nearly done. Of course it needs some testing before
> submitting a patch ;-)

Sounds great!
>
> Roughly speaking I have created a descriptor and a node (deployment)
> and added methods to add Valves to SunWebApp to reflect the changes in
> the sun-web.xml file. Then I used these information in WebModule to
> actually add the Valves specified in the deployment descriptor. Some
> minor changes in other files (e.g. the dtd) were also necessary of
> course.

Yes, the approach you have taken looks very promising!

>
> I did not write any AMX-related classes. I guess they are not
> necessary for this kind of task. Is this correct?
Yes, that's correct.

>
> Another question:
> There is a method writeDescriptor(...) in WebBundleRuntimeNode. I
> added my changes there as well. But when is this method called?

I don't know off the top of my head. This seems to be related to
deployment. Will check,
but if Hong or Tim already know the answer, that would be even better.
Hong and Tim, Wolfram is adding support for elements and nested

elements
to sun-web.xml, see
https://glassfish.dev.java.net/issues/show_bug.cgi?id=4006 for details.
This RFE actually talks about the enhancements to domain.xml, but
Wolfram agreed to first make
corresponding changes to sun-web.xml.

Thanks!

Jan

>
> --
> Wolfram Rittmeyer
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net