jmx-dev Bug with jmxmp
Fabrice Bacchella
fabrice.bacchella at orange.fr
Fri Oct 31 13:46:45 UTC 2014
Yes, it works well, but as the thread is called Thread-1, I needed to add :
if (t.getName().startsWith("Thread-")) continue;
Hop I will not be bitten by corner case.
Le 31 oct. 2014 à 14:15, Fabrice Bacchella <fabrice.bacchella at orange.fr> a écrit :
> That's what exactly what I want to do, start one with a agent. I will try your solution.
>
> But beside being not daemon, it's also anonymous : Thread-n. That's not very helpfull.
>
> Le 31 oct. 2014 à 14:07, Daniel Fuchs <daniel.fuchs at oracle.com> a écrit :
>
>> Hi Fabrice,
>>
>> If I remember well this is by design. It the same with all
>> JMX connector servers. If an application starts a connector
>> server then it must close it explicitly before exiting.
>>
>> Sometime this is problematic - especially if you want to
>> start a connector in a java agent (premain).
>> A long time ago I wrote an article on that:
>> https://blogs.oracle.com/jmxetc/entry/more_on_premain_and_jmx
>>
>> best regards,
>>
>> -- daniel
>>
>>
>> On 31/10/14 12:48, Fabrice Bacchella wrote:
>>> I found a bug with the current implementation of jmxmp. The javax.management.remote.generic.GenericConnectorServer create an anonymous, non-daemon thread.
>>>
>>> So it can prevent a jvm to stop.
>>>
>>> I found the code at :
>>> http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.opendmk/jmxremote_optional/1.0_01-ea/javax/management/remote/generic/GenericConnectorServer.java#GenericConnectorServer
>>>
>>> Look at the private class Receiver, it as no custom constructor, and it usage is :
>>> 289 // start to receive clients
>>> 290 receiver = new Receiver();
>>> 291 receiver.start();
>>> 292}
>>>
>>> Is there any bug trafic or official repository for that ?
>>>
>>> https://opendmk.java.net is almost dead.
>>>
>>
More information about the jmx-dev
mailing list