Package org.apache.synapse.commons

Examples of org.apache.synapse.commons.SynapseCommonsException


        }
    }

    private void validateDSName(String dataSourceName) {
        if (dataSourceName == null || "".equals(dataSourceName)) {
            throw new SynapseCommonsException("Invalid DataSource configuration !! -" +
                    "DataSource Name cannot be found ", log);
        }
    }
View Full Code Here


        }
    }

    private void validateInitialContext(InitialContext initialContext) {
        if (initialContext == null) {
            throw new SynapseCommonsException("InitialContext cannot be found.", log);
        }
    }
View Full Code Here

            }

            return new InitialContext(jndiEnv);

        } catch (NamingException e) {
            throw new SynapseCommonsException("Error creating a InitialContext" +
                    " with JNDI env jndiProperties : " + jndiEnv, log);
        }
    }
View Full Code Here

     * @param dataSourceInformation <code>DataSourceInformation</code> instance
     */
    public void addDataSourceInformation(DataSourceInformation dataSourceInformation) {

        if (dataSourceInformation == null) {
            throw new SynapseCommonsException("DataSource information is null", log);
        }

        // Sets the global secret resolver
        SecretInformation secretInformation = dataSourceInformation.getSecretInformation();
        if (secretInformation != null) {
View Full Code Here

     *         , returns null
     */
    public DataSourceInformation getDataSourceInformation(String name) {

        if (name == null || "".equals(name)) {
            throw new SynapseCommonsException("Name of the datasource information instance to be " +
                    "returned is null", log);
        }

        return dataSourceInformationMap.get(name);
    }
View Full Code Here

     * @return removed DataSourceInformation instance
     */
    public DataSourceInformation removeDataSourceInformation(String name) {

        if (name == null || "".equals(name)) {
            throw new SynapseCommonsException("Name of the datasource information instance to be" +
                    " removed is null", log);

        }

        DataSourceInformation information = dataSourceInformationMap.remove(name);

        if (information == null) {
            throw new SynapseCommonsException("There is no datasource information instance" +
                    " for given name :" + name, log);

        }

        if (assertListerNotNull()) {
View Full Code Here

     * @param listener <code>DataSourceInformationRepositoryListener</code> instance
     */
    public void setRepositoryListener(DataSourceInformationRepositoryListener listener) {

        if (listener == null) {
            throw new SynapseCommonsException("Provided DataSourceInformationRepositoryListener " +
                    "instance is null", log);
        }

        if (this.listener != null) {
            throw new SynapseCommonsException("There is already a DataSourceInformationRepositoryListener " +
                    "associated with 'DataSourceInformationRepository", log);
        }

        this.listener = listener;
    }
View Full Code Here

     *
     * @param msg The error message
     */
    private static void handleException(String msg) {
        log.error(msg);
        throw new SynapseCommonsException(msg);
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.commons.SynapseCommonsException

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.