Oh wow ... you never stop learning.

I have to remember this ... it fixes compile errors if you just put this in the 
beginning of the line ... Amazing ... and it improves the execution time of 
that line of code dramatically ... we should put "//" in front of every line of 
PLC4X __

Chris

Am 27.08.19, 15:36 schrieb "Julian Feinauer" <j.feina...@pragmaticminds.de>:

    Yep.
    Here is one general purpose Java switch: "//" __
    
    J
    
    Am 27.08.19, 15:32 schrieb "Christofer Dutz" <christofer.d...@c-ware.de>:
    
        Hi Julian,
        
        Ok ... I think with "disable" you are referring to "comment out the 
MBean stuff" in the TiggeredScraperImpl class?
        Cause other than that, I can't really see a "switch" to flick.
        
        Chris
        
        Am 27.08.19, 12:41 schrieb "Julian Feinauer" 
<j.feina...@pragmaticminds.de>:
        
            Hi,
            
            I'd rather disable MBean support (I'm unsure if someone uses it 
currently) then to rename these classes.
            They are part of the exernal API and e.g. used by us (and probably 
others) which makes the change incompatible which I would avoid for upcoming 
release 0.5.
            
            Julian
            
            Am 27.08.19, 12:30 schrieb "Till Voß" <till.v...@codecentric.de>:
            
                Hi Julian,
                
                no its not working:
                
                >
                > *javax.management.NotCompliantMBeanException: MBean class
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean
                > does not implement DynamicMBean, and neither follows the 
Standard MBean
                > conventions (javax.management.NotCompliantMBeanException: 
Class
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean is
                > not a JMX compliant Standard MBean) nor the MXBean conventions
                > (javax.management.NotCompliantMBeanException:
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean:
                > Class
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean is
                > not a JMX compliant MXBean)*
                > * at
                > 
java.management/com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:177)*
                > * at
                > 
java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:313)*
                > * at
                > 
java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)*
                > * at
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean.<init>(TriggeredScraperImplMBean.java:163)*
                > * at
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean.<init>(TriggeredScraperImplMBean.java:134)*
                > * at
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImplMBean.<init>(TriggeredScraperImplMBean.java:96)*
                > * at org.apache.plc4x.logstash.Plc4x.start(Plc4x.java:116)*
                > * at
                > 
org.apache.plc4x.logstash.Plc4xInputTest.testPlc4xInput(Plc4xInputTest.java:51)*
                > * at
                > 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
                > Method)*
                > * at
                > 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)*
                > * at
                > 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)*
                > * at 
java.base/java.lang.reflect.Method.invoke(Method.java:567)**....*
                
                
                If we name the class "TriggeredScraperImplMBean", the interface 
has to be
                renamed to "TriggeredScraperImplMBeanMBean".
                class *X* -> interface *X*MBean
                
                
                
                
                Am Di., 27. Aug. 2019 um 11:39 Uhr schrieb Julian Feinauer <
                j.feina...@pragmaticminds.de>:
                
                > Hi Till,
                >
                > I know the MBean Naming convention but I don’t understand why 
cant just
                > change the MBean class to have the Name as the Class + MBean 
added on, so
                > TriggeredScraperImplMBean?
                > As this should work based on the spec, not?
                >
                > J
                >
                > Am 27.08.19, 11:30 schrieb "Till Voß" 
<till.v...@codecentric.de>:
                >
                >     Hey,
                >
                >     i just checked it and it doesn't work with the class name
                >     "TriggeredScraperImplMBean". The exception only 
disappears, if the
                > class is
                >     named "TriggeredScraper".
                >
                >     After a short research i found the following convention: 
"By
                > convention, an
                >     MBean interface takes the name of the Java class that 
implements it,
                > with
                >     the suffix MBean added"
                >     (see 
https://docs.oracle.com/javase/tutorial/jmx/mbeans/standard.html
                > ).
                >
                >     Till
                >
                >
                >
                >
                >
                >     Am Di., 27. Aug. 2019 um 11:01 Uhr schrieb Julian 
Feinauer <
                >     j.feina...@pragmaticminds.de>:
                >
                >     > This would be my preferred solution as Tim just renamed 
the Scraper
                > to
                >     > their current Name.
                >     >
                >     > Julian
                >     >
                >     > Am 27.08.19, 10:01 schrieb "Till Voß" 
<till.v...@codecentric.de>:
                >     >
                >     >     Hi Julian,
                >     >
                >     >     yes, that also works.
                >     >
                >     >     Regards,
                >     >     Till
                >     >
                >     >     Am Di., 27. Aug. 2019 um 09:34 Uhr schrieb Julian 
Feinauer <
                >     >     j.feina...@pragmaticminds.de>:
                >     >
                >     >     > Hi Till,
                >     >     >
                >     >     > good pointer.
                >     >     > This was in issue with two parallel branches 
(mine and Tims).
                >     >     >
                >     >     > I would rather Opt for Renaming the MBean to
                >     > TriggeredScraperImplMBean.
                >     >     >
                >     >     > This should also work, or?
                >     >     >
                >     >     > Julian
                >     >     >
                >     >     > Am 27.08.19, 09:24 schrieb "Till Voß" <
                > till.v...@codecentric.de>:
                >     >     >
                >     >     >     Hi all,
                >     >     >
                >     >     >
                >     >     >
                >     >     >     currently i am developing a plc4x logstash 
plugin and i
                > have an
                >     > issue
                >     >     > with
                >     >     >     the TriggeredScraper.
                >     >     >
                >     >     >     The TriggeredScraperImpl implements the 
interface
                >     >     > "TriggeredScraperMBean".
                >     >     >     The File "TriggeredScraperImpl.java" contains 
line 163
                >     >     >     "mBeanServer.registerMBean(this, new 
ObjectName(MX_DOMAIN,
                >     > "scraper",
                >     >     >     "scraper"));", which leads to the following 
exception:
                >     >     >
                >     >     >
                >     >     >
                >     >     >     >
                >     >     >     > *09:05:26.915 [main] DEBUG
                >     >     >     >
                >     > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl -
                >     >     >     > Unable to register Scraper as MBean*
                >     >     >     > 
*javax.management.NotCompliantMBeanException: MBean class
                >     >     >     >
                >     > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl
                >     >     > does
                >     >     >     > not implement DynamicMBean, and neither 
follows the
                > Standard
                >     > MBean
                >     >     >     > conventions
                > (javax.management.NotCompliantMBeanException: Class
                >     >     >     >
                >     > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl
                >     >     > is not
                >     >     >     > a JMX compliant Standard MBean) nor the 
MXBean
                > conventions
                >     >     >     > 
(javax.management.NotCompliantMBeanException:
                >     >     >     >
                >     > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl:
                >     >     > Class
                >     >     >     >
                >     > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl
                >     >     > is not
                >     >     >     > a JMX compliant MXBean)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.management/com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:177)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:313)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl.<init>(TriggeredScraperImpl.java:163)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl.<init>(TriggeredScraperImpl.java:134)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl.<init>(TriggeredScraperImpl.java:96)*
                >     >     >     > *              at
                >     >     > 
org.apache.plc4x.logstash.Plc4x.start(Plc4x.java:116)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
org.apache.plc4x.logstash.Plc4xInputTest.testPlc4xInput(Plc4xInputTest.java:51)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
                >     >     >     > Method)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)*
                >     >     >     > *              at
                >     >     >     >
                >     >     >
                >     >
                > 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)**
                >     >     >     > ....*
                >     >     >
                >     >     >
                >     >     >
                >     >     >     This means the Standard MBean naming 
convention is
                > violated. My
                >     >     > proposed
                >     >     >     fix is to refactor the class name from
                > "TriggeredScraperImpl" to
                >     >     >     "TriggeredScraper" to fulfil the naming 
conventions. What
                > do you
                >     > think?
                >     >     >
                >     >     >
                >     >     >
                >     >     >     Best regards
                >     >     >
                >     >     >     Till
                >     >     >
                >     >     >
                >     >     >
                >     >     >
                >     >     >
                >     >     >     --
                >     >     >     Till Voß
                >     >     >
                >     >     >     codecentric AG | Kreuznacher Straße 30 | 
60486 Frankfurt
                > am Main
                >     > |
                >     >     >     Deutschland
                >     >     >     mobil: +49 151 643 305 40 | fax: +49 69 714 
02 682
                >     >     >
                >     >     >     Sitz der Gesellschaft: Solingen | HRB 25917 | 
Amtsgericht
                >     > Wuppertal
                >     >     >     Vorstand: Michael Hochgürtel . Rainer Vehns . 
Ulrich Kühn
                >     >     >     Aufsichtsrat: Patric Fedlmeier (Vorsitzender) 
. Klaus
                > Jäger .
                >     > Jürgen
                >     >     > Schütz
                >     >     >
                >     >     >
                >     >     >
                >     >
                >     >     --
                >     >     Till Voß
                >     >
                >     >     codecentric AG | Kreuznacher Straße 30 | 60486 
Frankfurt am Main
                > |
                >     >     Deutschland
                >     >     mobil: +49 151 643 305 40 | fax: +49 69 714 02 682
                >     >
                >     >     Sitz der Gesellschaft: Solingen | HRB 25917 | 
Amtsgericht
                > Wuppertal
                >     >     Vorstand: Michael Hochgürtel . Rainer Vehns . 
Ulrich Kühn
                >     >     Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . 
Klaus Jäger .
                > Jürgen
                >     > Schütz
                >     >
                >     >
                >     >
                >
                >     --
                >     Till Voß
                >
                >     codecentric AG | Kreuznacher Straße 30 | 60486 Frankfurt 
am Main |
                >     Deutschland
                >     mobil: +49 151 643 305 40 | fax: +49 69 714 02 682
                >
                >     Sitz der Gesellschaft: Solingen | HRB 25917 | Amtsgericht 
Wuppertal
                >     Vorstand: Michael Hochgürtel . Rainer Vehns . Ulrich Kühn
                >     Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus 
Jäger . Jürgen
                > Schütz
                >
                >
                >
                
                -- 
                Till Voß
                
                codecentric AG | Kreuznacher Straße 30 | 60486 Frankfurt am 
Main |
                Deutschland
                mobil: +49 151 643 305 40 | fax: +49 69 714 02 682
                
                Sitz der Gesellschaft: Solingen | HRB 25917 | Amtsgericht 
Wuppertal
                Vorstand: Michael Hochgürtel . Rainer Vehns . Ulrich Kühn
                Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . 
Jürgen Schütz
                
            
            
        
        
    
    

Reply via email to