Package com.arjuna.ats.arjuna.exceptions

Examples of com.arjuna.ats.arjuna.exceptions.FatalError


    if (txojLogger.aitLoggerI18N.isFatalEnabled())
    {
        txojLogger.aitLoggerI18N.fatal("com.arjuna.ats.txoj.CadaverLockRecord_4");
    }
   
    throw new FatalError(txojLogger.log_mesg.getString("com.arjuna.ats.txoj.CadaverLockRecord_4"));
      }

      CadaverLockManager manager = new CadaverLockManager(order(), objectTypeName);

      return (manager.releaseAll(super.actionHandle.get_uid()) ? TwoPhaseOutcome.FINISH_OK : TwoPhaseOutcome.FINISH_ERROR);
View Full Code Here


                            }
                    );
                }
            }

            throw new FatalError("Recovery manager already active (or recovery port and address are in use)!");
                }

                // start the expiry scanners

                // start the activator recovery loader
View Full Code Here

                {
                    _pid = Integer.valueOf(parsed[0]);
                }
                catch (final Exception ex)
                {
                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.MBeanProcessId_2")+" "+name, ex);
                }
            }
        }

        if (_pid == -1)
            throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.MBeanProcessId_1"));

        return _pid;
    }
View Full Code Here

                        cmd = new String[] { tempFile.getAbsolutePath() };
                    }
                    catch (final Exception ex)
                    {
                        throw new FatalError(
                                tsLogger.log_mesg
                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_2")+" "+ex, ex);
                    }
                }

                if (cmd != null)
                {
                    Process p = null;

                    try
                    {
                        p = Runtime.getRuntime().exec(cmd);
                    }
                    catch (final IOException ex)
                    {
                        throw new FatalError(
                                tsLogger.log_mesg
                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_3")+" "+ex, ex);
                    }

                    ByteArrayOutputStream bstream = new ByteArrayOutputStream();
                    byte[] bytes = new byte[1024];
                    int read;

                    try
                    {
                        while ((read = p.getInputStream().read(bytes)) != -1)
                            bstream.write(bytes, 0, read);
                    }
                    catch (final Exception ex)
                    {
                        throw new FatalError(
                                tsLogger.log_mesg
                                        .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_4")+" "+ex, ex);
                    }
                    finally
                    {
                        try
                        {
                            bstream.close();
                        }
                        catch (final Exception ex)
                        {
                            if (tsLogger.arjLoggerI18N.isWarnEnabled())
                            {
                                    tsLogger.arjLoggerI18N.warn("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_5", new Object[]
                                    { ex });
                            }
                        }
                    }

                    if (tempFile != null)
                        tempFile.delete();

                    StringTokenizer theTokenizer = new StringTokenizer(bstream.toString());
                    theTokenizer.nextToken();

                    String pid = theTokenizer.nextToken();

                    try
                    {
                        _pid = Integer.parseInt(pid);
                    }
                    catch (final Exception ex)
                    {

                    }
                }
            }
        }

        if (_pid == -1)
            throw new FatalError(
                    tsLogger.log_mesg
                            .getString("com.arjuna.ats.internal.arjuna.utils.ExecProcessId_1"));

        return _pid;
    }
View Full Code Here

                _pid = arjPropertyManager.getCoreEnvironmentBean().getPid();
            }
        }

        if (_pid == -1)
            throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_1"));

        return _pid;
    }
View Full Code Here

        } while (_theSocket == null && ++port < maxPort);

        _thePort = ((_theSocket == null) ? -1 : _theSocket.getLocalPort());

        if (_thePort == -1) {
            throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.SocketProcessId_2"));
        }
    }
View Full Code Here

      dir = dir + File.separator + "tmp";

        File tmpDir = new File(dir);

        if (tmpDir.isDirectory() == false && tmpDir.mkdirs() == false)
      throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.FilePocessId_1"));

        for (int i = 0; i < retry; i++)
        {
      try
      {
          File f = new File(dir + File.separator+ "pid " + pid);

          if (f.createNewFile())
          {
        f.deleteOnExit()// problem if we crash?

        processId = pid;
       
        break;
          }
          else
        pid++;
      }
      catch (IOException e)
            {
      }
        }

        if (processId == 0)
      throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.FilePocessId_2"));
    }
      }
  }

  return processId;
View Full Code Here

                {
                        if (tsLogger.arjLoggerI18N.isFatalEnabled())
                                tsLogger.arjLoggerI18N
                                                .fatal("com.arjuna.ats.internal.arjuna.objectstore.JDBCStore_5");

                        throw new FatalError(
                                        tsLogger.log_mesg
                                                        .getString("com.arjuna.ats.internal.arjuna.objectstore.JDBCStore_5"));
                }

                try
View Full Code Here

              if (drop == 1)
            _dropTable = true;
          }
          catch (Exception ex)
          {
              throw new FatalError(toString()+" : "+ex, ex);
          }
        }

  if (_url == null)
      throw new FatalError(toString()+" : invalid ObjectName parameter!");
    }
View Full Code Here

/* 127 */         if (txojLogger.aitLoggerI18N.isFatalEnabled())
/*     */         {
/* 129 */           txojLogger.aitLoggerI18N.fatal("CadaverLockRecord_1");
/*     */         }
/*     */
/* 132 */         throw new FatalError(txojLogger.log_mesg.getString("com.arjuna.ats.txoj.CadaverLockRecord_1"));
/*     */       }
/*     */
/* 135 */       return manager.releaseAll(this.actionHandle.get_uid()) ? 7 : 8;
/*     */     }
/*     */
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.exceptions.FatalError

Copyright © 2018 www.massapicom. 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.