|
From: B. <jer...@xt...> - 2002-01-18 13:33:16
|
Bordet, Simone wrote: >>I have attached to the following mail the MBean implementation with >>proper XDoclet comments. >>I have also attached the results of XDoclet on the >>implementation source. >> > >Yes. But I have few questions: >1) there is a managed attribute "dummy", but no setDummy and getDummy in the MBean interface. Beware also of the fact that I can call the data member "m_dummy", does this impact the MBean interface (I don't want getm_dummy() ;) ? And also, beware of the fact that a "dummy" attribute *must* generate a getdummy() and setdummy(), not getDummy() and setDummy(). Can I specify if it's read-only ? > Ok. There are plenty of questions out there :-) First, as there is a diffence between a java field and a JMX attribute, where should we put the description? I think it should not be on the field itself because I am not sure it will be easy to check for the presence of the getter/setter methods. But then, should we put it on the getter or setter method? both (redundant information and possible mistakes -- don't like that)? Or we could put in the class javadoc and indicate something like that: "@openjmx:attribute name="Dummy" description="A dummy attribute". It would be up to the developer to implement the getDummy and setDummy methods. If the variable itself is m_dummy, then we don't care: the developer has to code the right stuff in the getter/setter methods. Regarding access-mode, i suggest we add another attribute on the "openjmx:attribute" tag such "access" or "access-mode" and the possible values would be "ro", "wo" or "both". >2) just for consistency with JMX, i would change "managed-method" to "managed-operation" > Fixed. >3) setStatus is an attribute, not an operation. > As explained in 1) it would be up to the developer to specify that. If the "openjmx:attribute" tag is missing, the output will be wrong. > Is there a way to enforce check of this kind of mistakes ? If a method is described as operation, but it's an attribute, can i know this when I'm generating the code with XDoclet ? > This is linked to question 1). I will look for a way to check those things but I am not sure it will be so easy. >4) I see that the parameter information for operations is not included, it's just because start() has no parameters ? > No. I have to apology, I have forgotten some few methods from the MBeanDescription class. Was playing too much with the example given in the documentation and forgot to check the definition of the interface :-( >Well, it's a great job, Jerome ! >Let me know if you need clarification on the questions above, but I guess the xdoclet generation will rock ! >I didn't know that XDoclet became so powerful. > >>I had to patch XDoclet because the template engine does not >>support yet >>constructors. I am working with one of the XDoclet administrator in >>order to put my modifications into CVS. >>If you want to use it for now on, send me a mail and I will >>send you the >>modified xdoclet.jar file. >> > >Ok ! > The patch has been sent and the administrator is currently reviewing it. Should be made available soon I hope... >>If we want to add this features to OpenJMX (I think this is a really >>nice thing), >> > >Absolutely agree ! > We're at least two then ;-p >>let me know where in the distribution I should do so... >> > >Ok, let me play a bit with CVS, I will tell you soon. > Ok. Anyway I have to fix/enhance the generator, but I wanted to have some initial feedback before :-) >If you have time, can you write a document on this beautiful feauture, when will be ready ? >If you don't have time just tell, we must absolutely write something about for users. > I guess I could, but english is not my native language, and I am not sure to be the best person for writing documentation: my english style is quite poor. I can however write a draft that someone could "re-style" i guess :-) Jerome. |