Package net.sf.xbus.base.core

Examples of net.sf.xbus.base.core.XException


      filename = system.replaceAllMarkers(filename)[0];
      mQSYSobjPathname = new QSYSObjectPathName(filename);
    }
    catch (Exception ex)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_AS400, "0", ex);
    }
  }
View Full Code Here


      } // if (new IFSFile(mAS400System,
        // mQSYSobjPathname.getPath()).exists())
      else
      {
        throw new XException(Constants.LOCATION_EXTERN,
            Constants.LAYER_TECHNICAL,
            Constants.PACKAGE_TECHNICAL_AS400, "28");
      }
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_AS400, "0", e);
    }
  }
View Full Code Here

        && !resolution.equals(Constants.WRITE_ERROR)
        && !resolution.equals(Constants.WRITE_OVERWRITE))
    {
      List params = new Vector();
      params.add(mResolution);
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_AS400, "30", params);
    }
    return resolution;
  }
View Full Code Here

    {
      retString = (String) tc.call();
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_JAVA, "0", e);
    }
    return retString;
  }
View Full Code Here

          {
            // wrong file permissions
            Vector params = new Vector(1);
            params.add(mFilename);

            throw new XException(Constants.LOCATION_EXTERN,
                Constants.LAYER_TECHNICAL,
                Constants.PACKAGE_TECHNICAL_FILE, "17", params);
          } // then (!checkFilePermissions())
          else
          {
            try
            {
              // make copy and use this copy for read
              mCopyname = mFilename + Constants.getDateAsString();
              copyFile(mFilename, mCopyname);
              if (!mConfiguration.getResolution().equals(
                  Constants.READ_PRESERVE))
              {
                // hide file from other using wenn
                // resolution delete or rename
                mBackupname = mFilename
                    + Constants.BACKUP_SUFFIX;
                renameFile(mFilename, mBackupname);
              } // The content of the request.
              // Subclasses may define their own request content.
              Object requestContent = getRequestContent();

              // call application layer
              Adapter adapter = new Adapter();
              adapter.callApplication(xbusSystem, requestContent,
                  getType());
              // check the Adapter return code
              // in case of "not success" throw new XException
              if (Constants.RC_OK.equals(adapter.getReturncode()))
              {
                TAManager.getInstance().commit();

                PostProcessor.start(xbusSystem, adapter
                    .getResponse(),
                    Constants.POSTPROCESSING_PERSYSTEM);

                Trace.info("End processing "
                    + xbusSystem.getCompleteName());
                Trace
                    .info("----------------------------------------");
                successful = true;
              } // then
              // (Constants.RC_OK.equals(adapter.getReturncode()))
              else
              {
                TAManager.getInstance().rollback();

                NotifyError.notifyError(this, xbusSystem,
                    adapter.getErrormessage(),
                    requestContent, null);

                Trace.info("Error while processing "
                    + xbusSystem.getCompleteName());
                Trace
                    .info("----------------------------------------");
                return false;
              } // else
              // (Constants.RC_OK.equals(adapter.getReturncode()))

            } // try
            catch (Throwable t)
            {
              // Something unexpected has happened.
              TAManager.getInstance().rollback();
              NotifyError.notifyError(this, xbusSystem, t
                  .getMessage(), null, null);

              Trace.info("Error while processing "
                  + xbusSystem.getCompleteName());
              Trace
                  .info("----------------------------------------");

              throw new XException(Constants.LOCATION_EXTERN,
                  Constants.LAYER_TECHNICAL,
                  Constants.PACKAGE_TECHNICAL_FILE, "0", t);
            } // catch (Throwable t)

          } // else (!checkFilePermissions())
View Full Code Here

    // 1. check if it is one file ist
    if (!readFile.isFile())
    {
      List params = new Vector();
      params.add(mFilename);
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_FILE, "18", params);
    } // 2. check if file can be read
    if (!readFile.canRead())
    {
      List params = new Vector();
      params.add(mFilename);
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_FILE, "19", params);
    }

    // 3. resolution: Rename and Delete will take in account
View Full Code Here

        retBuffer.append(zeile);
      }
    }
    catch (IOException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_FILE, "0", e);
    }
    finally
    {
View Full Code Here

    {
      XDomSupport.deleteWhitespaceTextInElementNodes(doc);
    } // try
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_INTERN,
          Constants.LAYER_PROTOCOL,
          Constants.PACKAGE_PROTOCOL_RECORDS, "0", e);
    } // catch

    return doc;
View Full Code Here

      inStream = new BufferedInputStream(new FileInputStream(new File(
          mCopyname)));
    }
    catch (Exception e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_FILE, "0", e);
    }
    return inStream;
  }
View Full Code Here

      mOriginFile.close();

    }
    catch (Exception thr)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
          Constants.PACKAGE_TECHNICAL_AS400, "0", thr);
    }
    return retBuffer;
  }
View Full Code Here

TOP

Related Classes of net.sf.xbus.base.core.XException

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.