Package org.jpos.core

Examples of org.jpos.core.ConfigurationException


        String uri = e != null ? e.getText() : "";
        Space sp = SpaceFactory.getSpace (uri);
        if (sp instanceof LocalSpace) {
            return (LocalSpace) sp;
        }
        throw new ConfigurationException ("Invalid space " + uri);
    }
View Full Code Here


        mux = new MUX[muxName.length];
        try {
            for (int i=0; i<mux.length; i++)
                mux[i] = QMUX.getMUX (muxName[i]);
        } catch (NameRegistrar.NotFoundException ex) {
            throw new ConfigurationException (ex);
        }
        NameRegistrar.register ("mux."+getName (), this);
    }
View Full Code Here

    timeout = sTimeout == null ? 10000 : Long
        .parseLong(sTimeout);

    contextName = persist.getChildText("context-name");
        if (contextName == null) {
            throw new ConfigurationException(
                    "Missing 'context-name' property - the context name of the object received on 'in'");
    }
       
        in = persist.getChildText("in");
        if (in == null) {
            throw new ConfigurationException(
                    "Missing 'in' property - the queue to process objects from.");
    }
       
        out = persist.getChildText("out");
        if (out == null) {
            throw new ConfigurationException(
                    "Missing 'out' property - the target queue of the created context");
    }
       
        Element values = persist.getChild("context-values");
        if (values != null) {
View Full Code Here

            prepareForAbortMethod = BSHMethod.createBshMethod(e.getChild("prepare-for-abort"));
            commitMethod = BSHMethod.createBshMethod(e.getChild("commit"));
            abortMethod = BSHMethod.createBshMethod(e.getChild("abort"));
            trace = "yes".equals (e.getAttributeValue ("trace"));
        } catch (Exception ex) {
            throw new ConfigurationException(ex.getMessage(), ex);
        }
    }
View Full Code Here

    public void setConfiguration(org.jdom.Element e) throws ConfigurationException {
        super.setConfiguration(e);
        try {
            selectMethod = BSHMethod.createBshMethod(e.getChild("select"));
        } catch (Exception ex) {
            throw new ConfigurationException(ex.getMessage(), ex);
        }
    }   
View Full Code Here

        String uri = e != null ? e.getText() : "";
        Space sp = SpaceFactory.getSpace (uri);
        if (sp instanceof LocalSpace) {
            return (LocalSpace) sp;
        }
        throw new ConfigurationException ("Invalid space " + uri);
    }
View Full Code Here

        throws ConfigurationException
    {
        sp = SpaceFactory.getSpace(cfg.get ("space", ""));
        queue = cfg.get ("queue", null);
        if (queue == null)
            throw new ConfigurationException ("Unspecified queue");
        timeout = cfg.getLong ("timeout", 60000L);
    }
View Full Code Here

        String ip = cfg.get ("bind-address", null);
        if (ip != null) {
            try {
                bindAddr = InetAddress.getByName (ip);
            } catch (UnknownHostException e) {
                throw new ConfigurationException ("Invalid bind-address " + ip, e);
            }
        }
        if (socketFactory == null) {
            socketFactory = this;
        }
View Full Code Here

    public void setConfiguration (Configuration cfg)
        throws ConfigurationException
    {
        filename = cfg.get("packager-config", null);
        if (filename == null)
            throw new ConfigurationException("packager-config property cannot be null");

        try
        {
            String loggerName = cfg.get("packager-logger");
            if (loggerName != null)
                setLogger(Logger.getLogger (loggerName),
                           cfg.get ("packager-realm"));
            readFile(filename);
        } catch (ISOException e)
        {
            throw new ConfigurationException(e.getMessage(), e.fillInStackTrace());
        }
    }
View Full Code Here

            Class p = Class.forName(packagerName);
            setPackager ((ISOPackager) p.newInstance());
            if (standardPackager instanceof Configurable)
                ((Configurable)standardPackager).setConfiguration (cfg);
        } catch (ClassNotFoundException e) {
            throw new ConfigurationException ("Invalid inner-packager", e);
        } catch (InstantiationException e) {
            throw new ConfigurationException ("Invalid inner-packager", e);
        } catch (IllegalAccessException e) {
            throw new ConfigurationException ("Invalid inner-packager", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.jpos.core.ConfigurationException

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.