Examples of ManagedRuntime


Examples of javax.tools.diagnostics.runtime.ManagedRuntime

    }
  }
 
  private Map getJavaThreads(Image loadedImage, String id)
  {
    ManagedRuntime mr;
    Iterator itRuntime = Utils.getRuntimes(loadedImage);
    Map threads = new HashMap();
   
    while (itRuntime.hasNext()) {
      mr = (ManagedRuntime)itRuntime.next();
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

      out.error("\"info system\" command does not take any parameters");
    }
    else
    {
      Iterator itRuntime = Utils.getRuntimes(loadedImage);
      ManagedRuntime mr;
      String output = "";
      try {
        output += "\nSystem:\t\t";
        output += loadedImage.getSystemType() + "\n";
        output += "System Memory:\t";
        output += loadedImage.getInstalledMemory() + " bytes\n";
        output += "Virtual Machine(s):\n";
       
        int count = 1;
        while (itRuntime.hasNext()) {
          mr = (ManagedRuntime)itRuntime.next();
          output += "\tRuntime #" + count + ":\n\t\t";
          output += mr.getVersion() + "\n";
          count++;
        }
      } catch (DataUnavailable d) {
       
      } catch (CorruptDataException e) {
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

  }
 
  private void printRuntimeObjects(Image loadedImage, Long objAddress, String objName,
      Output out, boolean supers)
  {
    ManagedRuntime mr;
    Iterator itRuntime = Utils.getRuntimes(loadedImage);
    int count = 1;

    out.print("\n");
    while (itRuntime.hasNext()) {
      mr = (ManagedRuntime)itRuntime.next();
      if (mr instanceof JavaRuntime)
      {
        out.print("\truntime #" + count + " - version: ");
        try {
          out.print(mr.getVersion());
        } catch (CorruptDataException e) {
          out.print(Exceptions.getCorruptDataExceptionString());
        }
        out.print("\n");
       
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

  {
    Vector runtimes = new Vector();
    Iterator itAddressSpace;
    Iterator itProcess;
    Iterator itRuntime;
    ManagedRuntime mr;
    ImageAddressSpace ias;
    ImageProcess ip;
   
    itAddressSpace = loadedImage.getAddressSpaces().iterator();
    while (itAddressSpace.hasNext()) {
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

    printImageClass(loadedImage, className);
  }
 
  private void printImageClass(Image loadedImage, String className)
  {
    ManagedRuntime mr;
    Iterator itRuntime = Utils.getRuntimes(loadedImage);
    int count = 1;

    out.print("\n");
    while (itRuntime.hasNext()) {
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

 
 
  // below methods are for "info class" (with no parameters)
 
  private void printImageClasses(Image loadedImage) {
    ManagedRuntime mr;
    Iterator itRuntime = Utils.getRuntimes(loadedImage);
    int count = 1;

    out.print("\n");
    while (itRuntime.hasNext()) {
View Full Code Here

Examples of javax.tools.diagnostics.runtime.ManagedRuntime

        param = paramsToString.toString();
        param = param.trim();
      }
    }
   
    ManagedRuntime mr;
    Iterator itRuntime = Utils.getRuntimes(loadedImage);
    int count = 1;

    out.print("\n");
    while (itRuntime.hasNext()) {
View Full Code Here

Examples of org.apache.openjpa.ee.ManagedRuntime

     * Find a managed runtime broker associated with the
     * current transaction, or returns null if none.
     */
    protected Broker findTransactionalBroker(String user, String pass) {
        Transaction trans;
        ManagedRuntime mr = _conf.getManagedRuntimeInstance();
        Object txKey;
        try {
            trans = mr.getTransactionManager().
                getTransaction();
            txKey = mr.getTransactionKey();

            if (trans == null
                || trans.getStatus() == Status.STATUS_NO_TRANSACTION
                || trans.getStatus() == Status.STATUS_UNKNOWN)
                return null;
View Full Code Here

Examples of org.apache.openjpa.ee.ManagedRuntime

     * @return true if synched with transaction, false otherwise
     */
    boolean syncWithManagedTransaction(BrokerImpl broker, boolean begin) {
        Transaction trans;
        try {
            ManagedRuntime mr = broker.getManagedRuntime();
            TransactionManager tm = mr.getTransactionManager();
            if (tm == null) {
                throw new InternalException(_loc.get("null-transactionmanager", mr));
            }
            trans = tm.getTransaction();
            if (trans != null
                && (trans.getStatus() == Status.STATUS_NO_TRANSACTION
                || trans.getStatus() == Status.STATUS_UNKNOWN))
                trans = null;

            if (trans == null && begin) {
                tm.begin();
                trans = tm.getTransaction();
            } else if (trans == null)
                return false;

            // synch broker and trans
            trans.registerSynchronization(broker);

            // we don't need to synchronize on brokers or guard against multiple
            // threads using the same trans since one JTA transaction can never
            // be active on multiple concurrent threads.
            Object txKey = mr.getTransactionKey();
            Collection<Broker> brokers = _transactional.get(txKey);
           
            if (brokers == null) {
                brokers = new ArrayList<Broker>(2);
                _transactional.put(txKey, brokers);
View Full Code Here

Examples of org.apache.openjpa.ee.ManagedRuntime

     * Find a managed runtime broker associated with the
     * current transaction, or returns null if none.
     */
    protected Broker findTransactionalBroker(String user, String pass) {
        Transaction trans;
        ManagedRuntime mr = _conf.getManagedRuntimeInstance();
        Object txKey;
        try {
            trans = mr.getTransactionManager().
                getTransaction();
            txKey = mr.getTransactionKey();

            if (trans == null
                || trans.getStatus() == Status.STATUS_NO_TRANSACTION
                || trans.getStatus() == Status.STATUS_UNKNOWN)
                return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.