4 Replies Latest reply on Dec 7, 2012 7:27 PM by 938644

    Some questions about building  a plug in


      1.I'm trying to build a plug in ( for EM12c release 2 ) for my standalone java application - which exposes mbeans whom i want to collect some metrics with.
      It's been a while since i started to build it - and I asked quite a lot of quesions about it - because the documnets supplied with the EDK and
      the books ( ProgrammersGuide, ProgrammersReferece and the README file ) are not very clear to me ( I'm a newbie with EM in general .. )
      So far some of the questions got answered and were very halpfull with this long process. BUT, there are some questions that nobody answered yet.
      I'm quite "stuck" with it. I'm talking about the questions in : Re: A question about updating metadata files in plug in
      I have a deadline for this plug in ( which is very close ..) so this the reason I post this new message.

      I will appriciate any help about those questions .

      2. Regarding the above, ( hoping to have an answered soon ..) I'm trying another way to buils this plug in:
      In the README file there is this section( 3.6 : using MPCUI ) . I read the programmersReference ( chapter 8 ) and followed the instructions both in the README file and the ProgrammersReference .
      For a begining, I just wanted to modify a small thing in the example supplied ( Demo Host System ) just to get started with something .
      So i modify the file which contains the label ' Select member ... ' ( i don't remember the name of the file since the project is in my office , and I can't copy/paste ..- I think the the file icontians the name ' ConfirmationTarget .xml - it's one of the pages seen while adding a target ) .

      I i changed it , i build the project ( using FlexBuilder) but did not use ANT as it's says in the README - the eclipse IDE build this file automatically
      ( HostSystem.swf  in bin-debug dir as it says in the README ) . I copied this file to stage_dir/oms/metadata/mpcui .
      i build a new plug in ( i incremented the version of it ) - no errors, everty thing was fine .I also copied this file to the oms server ( it wasn't there before )
      and than run the commad ' emctl register oms ...' as it says in section 3.6 - and o got 'Success' eventually .

      Now, when i opened the EM console , hoping to see tge change i made ( again , it's just a change of the title of the step while adding the target , and adding another menuitem to the 3 item that were alreay there ( CPU, FS, etc ) .
      I believe wad i did is right- i mean changing in the right file and place ( there is no title like like this in any oter source file in the whole project )

      but still, I didn't see any change! it seems execatly as it was befoer the change ..

      Any idea?

        • 1. Re: Some questions about building  a plug in
          Regarding your question #2. Please read my response here carefully as it covers a number of different issues.

          1. Ant is not required to build the SWF file in your plug-in. It is an OPTION. Section 8.27 describes the different development options using either Ant or FlexBuilder.
          2. You do NOT need to ever copy a SWF file to any location under the OMS runtime. You need to include it in the stage area and then either build an OPAR or use emctl to incrementally update the deployed plug-in. It has to either be deployed as part of the plug-in deployment or updated incrementally using emctl register oms metadata. Section describes the specific steps to do this incremental update.

          Steps to update the SWF associated with demo_hostsample. These are covered in the README and in chapter 8.

          1. deploy the demo_hostsample plug-in as described in the README
          2. create an instance of the Host Sample target type through manually discovery (Add Targets->Add Non-Host Target Specifying Properties)
          3. using the demo_hostsample.zip project in Flex Builder, modify some part of the code, for example, modify the line containing label="Current Status" to label="My New Label"
          4. rebuild the SWF, to be sure you can to a Clean build of the demo_hostsample project
          5. ensure there is an updated copy of the HostSample.swf under demo_hostsample\mpcui\bin-debug (NOT bin-release, unless you Exported A Release Build)
          6. copy that updated HostSample.swf file to the location on the OMS machine where you unzipped and built the OPAR for the demo_hostsample plug-in
          7. cd to the stage/oms/metadata/mpcui directory and replace the current HostSample.swf with the one you just built (BE SURE ITS THE UPDATED FILE)
          8. execute the command "emctl register oms metadata -sysman_pwd sysman -pluginId oracle.sysman.ohs -service mpcui -file demo_hostsample_uimd_swf.xml (BE SURE TO USE THE CORRECT sysman_pwd)

          At this point you should be able to go to the homepage for the Host Sample target you created and see the changes.
          • 2. Re: Some questions about building  a plug in
            Given your deadline, I would highly recommend that you start by taking advantage of JVM diagnostics to discover your standalone JVMs for your applications. This will provide you with full thread visibility, cross-tier (assuming the back-end is a DB), heap analysis with a ton of dimensions to filter on (methods, packages, requests, thread state, etc). Anyways, that may be a much simpler approach to monitoring and diagnosing your standalone Java apps in production environments. By the way, the overhead is near zero as JVM diagnostics uses native thread sampling as opposed to byte code instrumentation so you are looking at less than 1% (usually around .25%) which is about as close to zero as you can get. The instructions are below for using JVM diagnostics with a standalone Java application.


            • 3. Re: Some questions about building  a plug in
              Thank you for the answer . I'll try it next week and let you know.
              by the way, you already answered some of my other questions regarding this plug in, which were very halpfull for me :-)
              • 4. Re: Some questions about building  a plug in
                Tanks a lot fror your question . I wasn't aware of monitoring standalone java app the way you told me - just knew about the way in the docs .
                I'm sure I will use it in my project.but, the main issue is monitoring these mbeans that keep the data - the same data ( metics ) we( all the people in the project .. ) so
                desire to see in the EM .
                Do you have any clue why or what is missing in my actions I described to see that ? maybe someone from the development team , anyone ?
                Thanks you.