Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-143

Make Install useable from Java apps and allow install to be performed using program name as well as pid

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.5.0
    • 1.4.1
    • Tools
    • None

    Description

      The Install class used by script bminstall.sh to install the Bteman agent into a running program is built to be driven from a command line. It only provides a public main routine and this calls System.exit when things go wrong. It should also provide an API which can be called to install the agent and which will generate sensible errors if the install fails. The API should be

      install(String pid, boolean addToBoot, String host, int port, String[] properties)
      throws IllegalArgumentException, FileNotFoundException,
      IOException, AttachNotSupportedException,
      AgentLoadException, AgentInitializationException

      pid will normally be the process id of the JVM. However, it can also be the ame of the java app as displayed by the jps command or the tail of the program name. For example, JBoss will be reported as org.jboss.Main so pid can be supplied using this name or using jboss.Main or Main. Of course thelast of these might be ambiguous if e.g. there is another JVM running com.Intellij.Main. In such cases you get whatever JVM is found first.

      The various possible errors occur for the obvious reasons. AgentInitializationException probably indicates that the agent is already loaded in the target JVM.

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: