How to to programmatically create diagnostic profile ?

Hi,
I'm trying to create a diaganostic profile programmatically .
I didn't see any example like this. My purpose is to create a profile like in the ' Visualizer ' tool.
I'm trying to use these lines:
Application a=new ApplicationImpl(myApp);
DiagnosticProfileManagerImpl diagnosticProfileManagerImpl=new DiagnosticProfileManagerImpl(a);
probeNames=new ObjectName;
diagnosticProfileManagerImpl.createDiagnosticProfile(profileName, probeNames);
I got a NullPointerException .
Any ideas? examples ?

Hi again ..
I think I know where is the problem but I don't know how to solve it:
i use these lines to make a connection :
     env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,     "com.bea.core.jmx.remote.provider");
                         System.setProperty("mx4j.remote.resolver.pkgs", "com.bea.core.jmx.remote.resolver");
                         connector = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
                         connector.connect(env);
                         connection = connector.getMBeanServerConnection();
and you suggested to use this :
                         connection=ManagementFactory.getPlatformMBeanServer();
I think there is inconsistency in the typs of the connection mbean.
Neither of of them works fine:
The first one works fine for getting troughput , averageLatency and so on ,
BUT, when i try to terminate ( unregister from the mbean server ),
and than re-connect again, the numbers i'm getting are wrong.
In the second type (ManagementFactory.getPlatformMBeanServer() ) , when I want to use as a profile creator ( like in the 'Visualizer' tool - which works fine )
I don't know which of the types to use.
What is your recommendation to to use : for temintinag the probeRuntime, and for making a profile .
again, neither of them works all the way!
Plz help.

Similar Messages

  • How to to programmatically create diagnostic profile : Please , Help!

    Hi,
    I already opened a question about that , but since I got a wrong answer ( I think , or i did something wrong ..) , and , since it is very
    important for me :
    May I have a full example showing how to create diagnostic profile programmatically ?
    I tried many ways to do that , but nothing works !
    Among the things i did was ( for example ) , something like this :
    DiagnosticProfileBean bean=new DiagnosticProfileBean();
    // setting the bean ..
    bean.setLatency(latency);
                   bean.setThroughput(throughput);
                   String profileName="EyalProfile";
                   //DataAggregation d;
                   bean.setProfileName(profileName);
                   bean.setApplicationId("com.oracle.training.jms@defaultserver");
                   //bean.setApplicationId("Application");
                   bean.setState(true);
                   bean.setStageObjectName(this.stageObjectIn);
                   bean.setServerId("defaultserver");
    .... and so on ..
         try {
              dataServiceName =ObjectName.getInstance("com.bea.wlevs:Name=DataServiceFactory,Type=DataServiceFactory,Application=com.oracle.cep.training.jms");
              //     DataServiceFactoryMBeanImpl dsfmb=     (DataServiceFactoryMBeanImpl) MBeanServerInvocationHandler.newProxyInstance(connection,dataServiceName, "com.bea.wlevs:Name=DataServiceFactory,Type=DataServiceFactory,Application=com.oracle.cep.training.jms", ObjectName.class, false);
              } catch (Exception e) {
         throw new RuntimeException(e);
         DataServiceFactoryMBean dataServiceFactory=null;
         DiagnosticProfileBean bean=new DiagnosticProfileBean();
         try {
              dataServiceFactory=(DataServiceFactoryMBean) MBeanServerInvocationHandler.newProxyInstance(connection, dataServiceName, DataServiceFactoryMBean.class, false);
                   // dataServiceFactory=(DataServiceFactoryMBean) MBeanServerInvocationHandler.newProxyInstance(connection, dataServiceName, DataServiceFactoryMBean.class, false);
    it all works fine untul now , but when the program runs this :
              dataServiceFactory.createDiagnosticProfileMBean(bean, bean.getServerId());
    I got the "InstanceNotFoundException " ..
    It seems that the problem related to the connection object , but I'm not sure about it.
    The connection was created in 2 different ways , neither of them worked.
    1. ..
    connector = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
                             connector.connect(env);
                             connection = connector.getMBeanServerConnection();
    2.
    MBeanServer connection =ManagementFactory.getPlatformMBeanServer();
    Does anyone have a clue about it??
    Example ( that works ..) will be appriciated !
    If someone has anothar way that works, it is OK to.just something to create a profile ..
    Again, it very important for me, i'm stuck because of that .
    Thanks.

    Hi
    my project includes many files, but a attached thre relevant parts here :
    // connect to server ( like in the examples )
    env.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER, com.bea.core.jmx.remote.provider.msarmi.ServerProvider.class.getClassLoader());
                             env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_CLASS_LOADER, com.bea.core.jmx.remote.provider.msarmi.ServerProvider.class.getClassLoader());
                             JMXServiceURL serviceUrl = new JMXServiceURL("MSARMI", "localhost", port, "/jndi/jmxconnector");
                             env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,     "com.bea.core.jmx.remote.provider");
                             System.setProperty("mx4j.remote.resolver.pkgs", "com.bea.core.jmx.remote.resolver");
                             connector = JMXConnectorFactory.newJMXConnector(serviceUrl, env);
                             connector.connect(env);
                             connection = connector.getMBeanServerConnection();
    and then :getting MonitorRuntimeMBean object..
    monitorMBean = (MonitorRuntimeMBean)MBeanServerInvocationHandler.newProxyInstance(connection, monitorName, MonitorRuntimeMBean.class, false);
    and then :
    ObjectName thruputObject = monitorMBean.monitorAvgThroughput(stageObjectIn, (new Long(averageThroughputInterval)).longValue(), (new Long(averageThroughputInterval)).longValue());
                   ProbeRuntimeMBean probeAvgThroughput = (ProbeRuntimeMBean)MBeanServerInvocationHandler.newProxyInstance(connection, thruputObject, ProbeRuntimeMBean.class, false);
                   listener = new AverageThroughputJMXNotificationListener(stageName,connection );
    When i done i use:
    probeAvgThroughput .terminate();
    ofcource , i just cut the relevant parts , but I'm sure that what I'm doing is right.
    My question is not about the latency but about AvgThroughput which shows wrong numbers each time i reconnect to thr server .
    The numbers get smaller each time i reconnect ( I described it in my previuos post ).
    My questions are very simple :
    *1. How to add a profile via api ? ( DiagnosticProfile )*
    *2.How to get DataAggregationMBean ?*
    *3. How to get DataServiceFactoryMBean 'and then use it to add profile?*
    PLEASE , I JUST WANT A GOOD EXAMPLE OF DOING THOSE THINGS !!!
    If there is no answer to those, just tell me , because it's been to much time trying to figure it out.
    Having my code , and asking why do I need this , does not contribute to my quetions ..
    I'm sure you ( the oracle company team ) wants to help , but the mosy helpfull help is via GOOD  examples.
    Thanks.

  • How do I programmatically create and save an empty project?

    I can programmatically create an empty project, but when I drop an
    invoke node on the project, select "Save", and wire in the desired
    path, it results in an "Error 1".  I am getting the error on the "Save"
    invoke node (An input parameter is invalid.)  The only input is the
    path, which is correct.  What am I doing wrong?  Also, how can I
    specify a name for the project?
    Greg

    I think the problem is that you use the current path and strip off the path the current VI's name.  This leaves you with a path that has no filename to save it to.  Put in a build path after it where you build in a project name with a .lvproj extension.  When I did that, the error went away.
    Message Edited by Ravens Fan on 08-08-2007 11:36 PM
    Attachments:
    Create%20and%20Save%20New%20Project[1].png ‏4 KB

  • How can I programmatically create and use a global variable?

    I have an app where the number of AI DAQmx tasks I create are specified in a config file.  I have a monitor task that periodically looks at the latest values from all DAQ tasks.  I've been doing this with a set of global variables because it was the simplest way to do it.  But to do this, I have to explicitly create a separate AI task that uses the hard-coded global variable name for the DAQmx samples.  I would prefer to only write one VI for the DAQ loop that writes to a global variable that I programmatically create based on the config file.  The only solution I can think of is to use a global variable "pool" that is sized bigger than I expect to need, and then have a big switch case to select which one I want based on the task index.  But this sounds pretty silly.

    I tend to agree with Ben. I don't buy the concept of taking the asy way out (globals) because it very rarely will things remain static. You almost always have to extend the features and functionality of an application and then you will run into issues with sloppy and lazy implementations. The solutions offered may require a little time to learn but once you do it doesn't really require any extra effort.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to display programmatically created property in KM Conf.

    Hi all,
    I have created a KM property programmatically with
    new Property(PropName,"test").getMutable();
    I can not see it in KM Management < Content Management < Global Services < Property MetaData < Properties
    Does anybody how to solve this issue?
    Ismail

    Hi Ismail,
    I am not 100% sure of this, however my understanding is that what  you are trying to do is not possible. You are creating a property for a KM resource at runtime, and then expecting to see it in the KM configuration which is basically at design time.
    Although I expect that the property is created against the resource and saved, in order to display it via the standard KM UI you will need to create it manually in the configuration as well and then you can configure the UI to show you the property and it's associated value.
    Like I said I am not 100% sure, so maybe a KM expert can chime in here too!
    Hope that helps a little,
    BRgds,
    Simon

  • How did my nephew create a profile with out a password?

    Greetings Everyone,
    There are two apple computers at my sister's house which I take care of. They have a 8 month old flat screen mac with probably the latest os. They also have an older mac tower with 10.6.8 on it. I am the person that maintains the computers. I set up profiles for my nephews and when I went back to visit, Some how my nephew was able to create a second profile and give himself admin privalages. I have my own profile which has admin privilages but he does not have my password.
    After talking to him he tells me was able to do it because of the way the computer was made but that was all he would tell me. Does anyone have any idea how he was able to do that?
    Thanks for any help
    Marco

    My other question is, how do i set up the EFI password on the new computer since it does not have a DVD player?
    Check out KB Article:  http://support.apple.com/kb/HT1352 and read some of  the suggestion in this thread:  https://discussions.apple.com/thread/4236268?start=0&tstart=0
    Since the iMac in question is still under warranty, you can call Apple tech support for help.  Do you have AppleCare?

  • How to disable programmatically created Submit Button in ProcessFormRequest

    Hi All,
    I'm working on an issue where i have created an Upload button Programmatically. The upload button should get disabled after it is clicked. The code for the upload button creation is as below. This has been added in the processRequest of CO.
    OASubmitButtonBean oasb;
    oasb =
    (OASubmitButtonBean)pageContext.getWebBeanFactory().createWebBean(pageContext,
    OAWebBeanConstants.BUTTON_SUBMIT_BEAN,
    null,
    "BUTTON_SUBMIT");
    oasb.setID("Upload");
    oasb.setUINodeName("Upload");
    oasb.setEvent("Upload");
    oasb.setText("Upload");
    Now, when i handle the upload button click in the processFormRequest, i should also disable the button at the end. I followed the below method in the processFormRequest but it threw a null pointer exception at the point where i have disabled the button.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String strEvent = pageContext.getParameter(EVENT_PARAM);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (strEvent.equals("Upload"))
    OASubmitButtonBean oasb2 = (OASubmitButtonBean)webBean.findIndexedChildRecursive("Upload");
    oasb2.setDisabled(true); --- this is where the null pointer exception gets thrown
    I'm not sure if this is the way to go about it. Could you please let me know how to handle the above request?
    Regards,
    Shreyas
    Edited by: user11258661 on Mar 28, 2012 7:15 AM

    Hi Ram,
    Thank you for the response. I have created the button programmatically. So I'm not sure how to add the newly created button to the webBean as child. I'm new to OAF. So could you please elaborate. A code snippet might help.
    Thanks in advance.
    Regards,
    Shreyas

  • Programmatically create custom attributes in KM

    Hi all,
    We are implementing an application which uploads/downloads files to/from KM content of a portal user. The application will also display the list of files for the portal user. The file list displays the standard file attributes: filename,  created_date, size.
    Additionally to these attributes we want to store  some custom attributes (e.g. last sent to, received from...) for files in the KM.
    We need to create these custom attributes programmatically at runtime, if the file is stored/updated in the KM content.
    How can we programmatically create these kind of custom attributes in KM and read/write these custom attributes at runtime?
    Thanks,
    Yasar

    hi,
    General example on how to code KM
    http://wiki.sdn.sap.com/wiki/display/Snippets/UpdateKnowledgeManagementusingWebDynproJavaApplication
    Coding custom attributes, look into Properties section
    https://media.sdn.sap.com/html/submitted_docs/nw_kmc/howto/rf/client_api/rf_client_api.html
    Coding custom renderer.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f7b176eb-0701-0010-2b84-8edb1f76771d?QuickLink=index&overridelayout=true
    Srini

  • How to create a profile set for a campaign.

    HI  Friends,
    I am working on CRM 7.0.
    My requirement is to create a Batch program for  campaign creation and automation.
    i have used the class 'cl_crm_mktpl_appl_base' to copy the existing campaign .
    It copied the entire target groups,campaign  elements, profile sets.
    My requirement is for the created campaign id, i need to create a profile set in that i need to create target goups.
    Fm : BAPI_PROFILESET_CREATE is not helpful for me in my case.bacause it is asking parent guid ..etc...
    I have ony one guid ,ie. campaign guid . if i give this in parent guid it is thriwing error.
    can any suggest how to create a custom profile set.
    If any one  worked on this batch program please reply to this thread.
    Edited by: jagadheeswara raju on Feb 10, 2010 7:02 PM

    Hi,
    I have replied to the below thread mentioning the FM's to create Profile sets, profiles and also target groups. This may be helpful to you.
    Re: target group creation
    Regards,
    Priyanka

  • How to create a profile value at user level programatically

    Dear all,
    I want to create a profile value at user level programatically, I refer to the developer guide and try to use fnd_profile.put() to create a new value.
    But I find out the value is just created in session level, not be inserted into base table.
    So is there anyone know how to realize this function in PL/SQL?
    Any idea is appreciated.
    Best Regards,
    Kenny

    Check Note: 364503.1 - How to Set a System Profile Value Without Logging in to the Applications
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=364503.1

  • I created one profile in Firefox. But while deleting the Profile i deleted the files also. How to get those files?

    For creating a User agent, I created one profile in Fire fox. But while i am deleting the Profile, i clicked on the button 'Delete Files'. Now i want those files. Can you please tell me from where can i get those files?
    Please revert back to
    [email protected]

    Yes, the places.sqlite has been copied. I don't see any specific instructions in the "restoring to a different locaton" directions on how to open the new profile, though. Step 7 just says to paste the contents of the backed up file to the new profile (in this case, I've copied them over the default profile created when I first downloaded firefox). This overwrote the existing files. Then it says to Start Firefox. Which I did with no old bookmarks showing up. That's why I posted here - am I missing a step once I open Firefox to make it look at the new profile information?

  • How to create Partner profile

    1)Could someone tell me how to create partner profile in file to idoc scenario.
    2)How to create RFC connection.
    3)How to use IDX1 and IDX2.
    Thanks
    Regards
    Ashish

    Ashish,
    take a look at this article,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660 
    XI ~~
    1. SM59 -- Create an RFC destination for R3 system.
    2. IDX1 -- Create a port to R3 system
    3. IDX2 -- Import IDOC metadata.
    SLD ~~
    Create technical system and business system pointing to the R3 system and use this as you reciver system.
    Let me know if you need any inouts.
    Regards,
    Bhavesh

  • How to Create Roaming Profile(s) For Windows Workgroups

    This Tutorial Shows how to create roaming profile(s) for Windows Workgroups.
    Here are the steps in order to do this:
    On the host PC:
    1. Goto 'Folder Options'>'View' and un-tick 'Use Simple File Sharing'.
    2. Goto Network Connections and right click on the 'Local Area Connection' (Ethernet recommended)
    3. Goto Properties>General, and tick 'File and Printer Sharing'.
    Click Apply + Ok.
    4. Goto Control Panel>User Accounts, add a new user.
    5. Logon to this user, and open the profile folder properties.
    5b. Share this folder.
    6. Make the Share permissions so that 'everyone' has: Full Control, Read, Change.
    Click Apply + Ok.
    7. Click on 'Caching' and disable Caching for this Share.
    Click Ok.
    8. Now goto the 'Security' tab and give 'Administrator' and 'SYSTEM' 'Full Control'.
    Click Apply + Ok.
    On the remote PC(s):
    1. Make the same User as on the Host.
    1b.Logon to the account and log back out again. Delete the profile folder from 'Documents and Settings'.
    3. Give 'SYSTEM': 'Read','Read and Execute','List Folder Contents' to the 'Administrators' Profile
    4. Type 'lusrmgr.msc' into run, goto: 'Users', double click on the new user and goto the 'Profile' tab.
    4b. In the 'Profile Path' box, type \\hostPCname\ProfileName.
    Click Apply + Ok
    *Note* Replace the \\path\ accordingly to what names are on your Host PC.
    5. Goto regedit>HKLM\Software\Microsoft\Windows NT\CurrentVersion. Double click
    on 'ProfileList'.
    Find which key is for the new user. (Example S-1-5-21-58435627-18431725-18026167-1003)
    6. Right click that key and goto: 'Permissions' and give 'SYSTEM' 'read'.
    *Note* Once you logon to the roaming profile from the remote PC for the first time you can undo this step.
    7. goto GPEdit>Computer Configuration/Administrative Templates/System/User Profiles:
    Enable these settings:
    'Do not check for user ownership of roaming profile folders'
    'Delete cached copies of roaming profiles'
    'Log users off when roaming profile fails'
    "Add the Administrators security group to roaming profiles'
    'Prevent roaming profile changes from propagating to the server'
    7b. Make 'Timeout for dialog boxes' '1' (seconds)
    8. goto: Computer Configuration/Security Settings/Local Policies/Security Options:
    Make 'Number of previous logons to cache (if server is unavailable) '0'
    Now you're ready to login to the Profile on the remote PC.
    *Note* Sometimes, when windows loads it takes a minute for the profile folder to become shared again.
    Thanks for reading.

    Hi,
    I have replied to the below thread mentioning the FM's to create Profile sets, profiles and also target groups. This may be helpful to you.
    Re: target group creation
    Regards,
    Priyanka

  • How to create Creation Profile

    Hello all Gurus,
    Can someone please tell me how to create "Creation Profile" and use them in MM scheduling agreement? I have an issue, where the user wants 2 separate creation profiles to be created so that the demands should be sent to suppliers on Thursdays and Fridays only. I maintained the creation profiles in SPRO -- MM -- Purchasing -- Scheduling Agreement -- Maintain Creation Profile for Scheduling agreement with rel. doc. But these creation profiles doesn't seems to work. What are the extra steps that we need to carry out once the creation profiles are created and then maintained in MM scheduling agreement?
    If you have any knowledge on creation of CREATION PROFILES please share it with me. It will be very much helpful for me.
    Thanks and Regards,
    Umakanth

    hi,
    Go to SPRO > MM > Purchasing > Scheduling Agreement > Maint. Rel. Creation Profile for Sched. Agmt. w. Rel. Docu.
    Maint. Rel. Creation Profile for Sched. Agmt. w. Rel. Docu.
    In this step, you can define the release creation profile.
    The latter is an instrument for determining which criteria are used to generate releases against a scheduling agreement and transmit them to the vendor.
    You assign the creation profile to the scheduling agreement item in the additional data.
    The creation profile controls the creation periodicity of the releases and - starting from the current date of release creation - the way in which the quantities are aggregated.
    In the release creation profile, you can define
    o   General Parameters
    -   Which creation strategy is the basis for JIT delivery schedules and scheduling agreements.
    -   How backlog and immediate requirements are taken into account during release creation.
    o   Aggregation and release horizon
    -   If and how schedule lines should be aggregated during release creation.
    o   Release creation periodicity
    -    With which periodicity scheduling agreement releases are created
    o   Tolerance profile
    -    That for releases created as a result of changed schedule lines, the system performs a tolerance check
    o   Internet release
    -    Whether an Internet release is created during release creation

  • 5.1 SP10 How do you programmatically make a datasource from a dynamically created Pool?

    How do you programmatically make a data source from a dynamically created Pool?
    I can make the Pool OK but can not find any classes the return a datasource
    given a JDBC Pool.
    Thanks in advance

    Hi John,
    weblogic 5.1 doesn't have API allowing dynamic creation
    of datasources. 6.1 does.
    Regards,
    Slava Imeshev
    How do you programmatically make a data source from a dynamically createdPool?
    >
    I can make the Pool OK but can not find any classes the return adatasource
    given a JDBC Pool.
    Thanks in advance

Maybe you are looking for

  • IPhone display lights up for half a second...

    My new iPhone 4 does the same my old iPhone 3GS did. Sometimes when I push the slepp/wake button to wake it up, the display lights up for half a second and goes dark again. This always happens twice. Only when I push it the third time, the display st

  • DVD Player in Mac 10.6.8

    I am testing out a brand-new External Optical drive ASUS SDRW-08D2S-U for use with my Mac OS X 10.6.8. The Mac recognizes the new drive, and when I insert a DVD into it, the Disk with its title appears on my desktop.  Also, QuickTime Player is activa

  • Agent Inbox in WebIC always empty ?

    Hi All, We have an Account in CRM. It has been assigned as Sold-To-Party to 4 Sales Orders. But, when we search the Account in WebIC, the Agent Inbox and Field Worklist is always empty. Any idea why this must be happening ? Are we missing any customi

  • Address Book and Multiple Name Labels?

    Has anyone found a way to make address book print labels with related names included?  Lion seems to have left this out of the new Address Book.  Thanks!

  • IPod Classic as Windows Boot Disk?

    Hi friends, In trying to use my PC-formatted iPod classic (160gb) as a boot disk for my MacBook Pro, I've been having some problems. WindowsXP setup says my computer won't be able to boot from the classic, and therefore won't install onto it. Is this