Subject Re: [Firebird-Java] Process name in monitoring tables with Jaybird?
Author Thomas Steinmaurer
Hi Roman,

>>>> Vlad told me in firebird-support, that even Jaybird could expose the
>>>> remote process name. His original post.
>>> The process name does not help you a lot - it is always java.exe or
>>> javaw.exe :) But the PID should be exposed.
>> Right, although there could be a way to additionally print out the Java
>> class name with the main[] method? Or even make the necessary parameter
>> available at connection level to fill it with a user-definable value?
>
> Yes, but would it fit the DPB? The Java classes tend to be long...

Don't know about the DPB, but the process name field in the monitoring
table is declared as VARCHAR(253).

> We could take the last n characters of the main class name,
> or if
> specified, some system property which you can pass via -D parameter.

How about (without having too much in-depth Java knowledge):

* If a particular -D parameter is present, use this one

* If this particular -D parameter is NOT present:

- Use the classname with the entire package information, if it fits
into DPB / VARCHAR(253).
- If it doesn't fit into that, make a substring of the class name from
right to left to.
- A third option would be the class name without any package
information. Probably, a bit useless, depending on the class name one
uses for the main[] method.

> What do you think? If that is ok, please add the feature request to the
> tracker.

Will do, if we agree on a solution. ;-)



--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com