Package org.apache.sandesha2

Examples of org.apache.sandesha2.SandeshaException


      return newMessageContext;

    } catch (AxisFault e) {
      log.debug(e.getMessage());
      throw new SandeshaException(e.getMessage());
    }

  }
View Full Code Here


    //properties which gives comma seperated lists of property names that have to be copited
    //from various places when creating related messages.
   
    if (axisModule==null) {
      String message = SandeshaMessageKeys.moduleNotSet;
      throw new SandeshaException (message);
    }
   
    Parameter propertiesFromRefMsg = axisModule.getParameter(Sandesha2Constants.propertiesToCopyFromReferenceMessage);
    if (propertiesFromRefMsg!=null) {
      String value = (String) propertiesFromRefMsg.getValue();
View Full Code Here

  }
 
  public static SandeshaPolicyBean getDefaultPropertyBean (AxisConfiguration axisConfiguration) throws SandeshaException {
    Parameter parameter = axisConfiguration.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
    if (parameter==null)
      throw new SandeshaException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.defaultPropertyBeanNotSet));
   
    SandeshaPolicyBean sandeshaPropertyBean = (SandeshaPolicyBean) parameter.getValue();
    return sandeshaPropertyBean;
  }
View Full Code Here

    if (str.length() < 2) {
      String message = SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.invalidStringArray,
          str);
      log.debug(message);
      throw new SandeshaException(message);
    }

    int length = str.length();

    if (str.charAt(0) != '[' || str.charAt(length - 1) != ']') {
      String message = SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.invalidStringArray, str);
      log.debug(message);
      throw new SandeshaException(message);
    }

    ArrayList retArr = new ArrayList();

    String subStr = str.substring(1, length - 1);
View Full Code Here

  }
 
  public static SandeshaPolicyBean getPropertyBean (AxisDescription axisDescription) throws SandeshaException {
    Parameter parameter = axisDescription.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
    if (parameter==null)
      throw new SandeshaException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.propertyBeanNotSet));
   
    SandeshaPolicyBean propertyBean = (SandeshaPolicyBean) parameter.getValue();
    if (propertyBean==null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyBeanNotFound);
      throw new SandeshaException (message);
    }

    return propertyBean;
  }
View Full Code Here

      util = getSecurityManagerInstance(securityManagerClassStr,context);
      p = new Parameter(Sandesha2Constants.SECURITY_MANAGER,util);
      config.addParameter(p);
    } catch(AxisFault e) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotInitSecurityManager, e.toString());
      throw new SandeshaException(message,e);
    }
    return util;
  }
View Full Code Here

      AxisConfiguration config = context.getAxisConfiguration();
      Parameter classLoaderParam = config.getParameter(Sandesha2Constants.MODULE_CLASS_LOADER);
      if(classLoaderParam != null) classLoader = (ClassLoader) classLoaderParam.getValue();

      if (classLoader==null)
        throw new SandeshaException (SandeshaMessageHelper.getMessage(SandeshaMessageKeys.classLoaderNotFound));
       
      Class c = classLoader.loadClass(className);
      Class configContextClass = context.getClass();
     
      Constructor constructor = c.getConstructor(new Class[] { configContextClass });
      Object obj = constructor.newInstance(new Object[] {context});

      if (!(obj instanceof SecurityManager)) {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.securityManagerMustImplement, className);
        throw new SandeshaException(message);
      }
      return (SecurityManager) obj;
     
    } catch (Exception e) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotInitSecurityManager, e.toString());
      throw new SandeshaException(message,e);
    }
  }
View Full Code Here

          if (oldEnvHeaderBlockQName.equals(newEnvHeaderBlock.getQName())) {
            if (oldEnvHeaderBlock.isProcessed())
              newEnvHeaderBlock.setProcessed();
          } else {
            String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cloneDoesNotMatchToOriginal);
            throw new SandeshaException(message);
          }
        }
      }
    }
   
View Full Code Here

      if (makeConnection.getIdentifier()!=null) {
        sequenceID = makeConnection.getIdentifier().getIdentifier();
      } else if (makeConnection.getAddress()!=null){
        //TODO get sequenceId based on the anonymous address.
      } else {
        throw new SandeshaException (
            "Invalid MakeConnection message. Either Address or Identifier must be present");
      }
    } else
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.UNKNOWN);
   
View Full Code Here

    try {
      engine.send(closeSequenceResponseMsg);
    } catch (AxisFault e) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotSendCloseResponse,
          sequenceId, e.toString());
      throw new SandeshaException(message, e);
    }

    if (log.isDebugEnabled())
      log.debug("Exit: CloseSequenceProcessor::processInMessage " + Boolean.FALSE);
    return false;
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.SandeshaException

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.