Package com.arjuna.ats.arjuna.exceptions

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


          {
            tsLogger.arjLoggerI18N.fatal("com.arjuna.ats.arjuna.common.Uid_4", new Object[]
            { uidString });
          }

          throw new FatalError(
              tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.common.Uid_2"));
        }
      }
      else
      {
        if (tsLogger.arjLoggerI18N.isFatalEnabled())
        {
          tsLogger.arjLoggerI18N.fatal("com.arjuna.ats.arjuna.common.Uid_5", new Object[]
          { uidString });
        }

        throw new FatalError(
            tsLogger.log_mesg.getString("com.arjuna.ats.arjuna.common.Uid_3")
                + uidString);
      }
    }
  }
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);
                }
            }
        }
       
        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);
                    }
                }
               
                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);
                    }
                   
                    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);
                    }
                    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

            if (_pid == -1)
            {
                String pid = arjPropertyManager.getPropertyManager().getProperty(Environment.PROCESS_IDENTIFIER);
               
                if (pid == null)
                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_1"));
               
                try
                {
                    _pid = Integer.parseInt(pid);
                }
                catch (final Exception ex)
                {
                    throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_3")+" "+pid);
                }
            }
        }
       
        if (_pid == -1)
            throw new FatalError(tsLogger.log_mesg.getString("com.arjuna.ats.internal.arjuna.utils.ManualProcessId_1"));
       
        return _pid;
    }
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

/* 1609 */       if (jtaLogger.loggerI18N.isWarnEnabled())
/*      */       {
/* 1611 */         jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.threadexception", new Object[] { e });
/*      */       }
/*      */
/* 1618 */       throw new FatalError(e.toString());
/*      */     }
/*      */
/* 1621 */     return false;
/*      */   }
View Full Code Here

/* 1675 */       if (jtaLogger.loggerI18N.isWarnEnabled())
/*      */       {
/* 1677 */         jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror", new Object[] { "TransactionImple.isNewRM", XAHelper.printXAErrorCode(ex) });
/*      */       }
/*      */
/* 1685 */       throw new FatalError(ex.toString());
/*      */     }
/*      */     catch (Exception e)
/*      */     {
/* 1689 */       if (jtaLogger.loggerI18N.isWarnEnabled())
/*      */       {
/* 1691 */         jtaLogger.loggerI18N.warn("com.arjuna.ats.internal.jta.transaction.arjunacore.newtmerror", new Object[] { e });
/*      */       }
/*      */
/* 1698 */       throw new FatalError(e.toString());
/*      */     }
/*      */
/* 1701 */     return null;
/*      */   }
View Full Code Here

    }
      }
  }

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

  return _thePort;
    }
View Full Code Here

            new java.lang.Object[] { "InterpositionORBInitializerImpl", "ENCODING_CDR_ENCAPS" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.codeccreate"));
  }
   
  /*
   * Register client interceptor to propogate the context.
   */

  try
  {
      if (jtsLogger.logger.isDebugEnabled())
      {
    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "InterpositionORBInitializerImpl - registering ClientRequestInterceptor");
      }

      ClientRequestInterceptor client_interceptor = new InterpositionClientRequestInterceptorImpl(localSlot, cdr_codec);

      init_info.add_client_request_interceptor(client_interceptor);
  }
  catch (DuplicateName ex)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
    jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.duplicatename",
            new java.lang.Object[] { "InterpositionORBInitializerImpl", "ClientRequestInterceptor" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.cie"));
  }
 
  /*
   * Register a server interceptor to receive the context.
   */

  try
  {
      if (jtsLogger.logger.isDebugEnabled())
      {
    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "InterpositionORBInitializerImpl - registering ServerRequestInterceptor");
      }

      ServerRequestInterceptor server_interceptor = new InterpositionServerRequestInterceptorImpl(receivedSlot, cdr_codec);

      init_info.add_server_request_interceptor(server_interceptor);
  }
  catch (DuplicateName ex)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
    jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.duplicatename",
            new java.lang.Object[] { "InterpositionORBInitializerImpl", "ServerRequestInterceptor" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.hporb.interceptors.interposition.sie"));
  }
    }
View Full Code Here

            new java.lang.Object[] { "ContextORBInitializerImpl", "ENCODING_CDR_ENCAPS" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.codeccreate"));
  }
   
  /*
   * Register client interceptor to propogate the context.
   */

  try
  {
      if (jtsLogger.logger.isDebugEnabled())
      {
    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializerImpl - registering ClientRequestInterceptor");
      }

      ClientRequestInterceptor client_interceptor = new ContextClientRequestInterceptorImpl(localSlot, cdr_codec);

      init_info.add_client_request_interceptor(client_interceptor);
  }
  catch (DuplicateName ex)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
    jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.duplicatename",
            new java.lang.Object[] { "ContextORBInitializerImpl", "ClientRequestInterceptor" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.cie"));
  }
 
  /*
   * Register a server interceptor to receive the context.
   */

  try
  {
      if (jtsLogger.logger.isDebugEnabled())
      {
    jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
               (com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS | com.arjuna.ats.jts.logging.FacilityCode.FAC_INTERCEPTOR), "ContextORBInitializerImpl - registering ServerRequestInterceptor");
      }

      ServerRequestInterceptor server_interceptor = new ContextServerRequestInterceptorImpl(receivedSlot, cdr_codec);

      init_info.add_server_request_interceptor(server_interceptor);
  }
  catch (DuplicateName ex)
  {
      if (jtsLogger.loggerI18N.isWarnEnabled())
      {
    jtsLogger.loggerI18N.warn("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.duplicatename",
            new java.lang.Object[] { "ContextORBInitializerImpl", "ServerRequestInterceptor" });
      }

      ex.printStackTrace();

      throw new FatalError(jtsLogger.logMesg.getString("com.arjuna.ats.internal.jts.orbspecific.javaidl.interceptors.context.sie"));
  }
    }
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.