Package org.jpos.core

Examples of org.jpos.core.ConfigurationException


            defaultFacility = cfg.getInt ("facility", LOG_USER);
            defaultSeverity = cfg.getInt ("severity", PRI_INFO);
            tags     = cfg.get ("tags", "audit, syslog");
            prefix = cfg.get ("prefix", null);
        } catch (Exception e) {
            throw new ConfigurationException (e);
        }
    }
View Full Code Here


                    XML_CONFIG_ATTR__EXEC_SRV_COREPOOLSIZE, true,
                    "(number of threads in the pool)");
            initialCorePoolSize = corePoolSizeAttr.getIntValue();

        } else {
            throw new ConfigurationException(
                    "Invalid thread pool executor type '%s' (valid types={fixed|cached|scheduled} )");
        }

        Attribute terminationTimerAttr = getAttribute(rootElt,
                XML_CONFIG_ATTR__EXEC_SRV_TERMINATION_TIMER, false,
View Full Code Here

            boolean mandatory, String errDesc) throws ConfigurationException {
        Attribute attr = elt.getAttribute(attrName);

        if ((null == attr) || ("".equals(attr.getValue().trim()))) {
            if (mandatory) {
                throw new ConfigurationException(String.format(
                        "'%s' attribute has not been found or is empty %s",
                        XML_CONFIG_ATTR__EXEC_SRV_TYPE, errDesc));
            } else {
                return null;
            }
View Full Code Here

    }
    protected ISOChannel initChannel () throws ConfigurationException {
        Element persist = getPersist ();
        Element e = persist.getChild ("channel");
        if (e == null)
            throw new ConfigurationException ("channel element missing");

        ISOChannel c = newChannel (e, getFactory());
        String socketFactoryString = getSocketFactory();
        if (socketFactoryString != null && c instanceof FactoryChannel) {
            ISOClientSocketFactory sFac = (ISOClientSocketFactory) getFactory().newInstance(socketFactoryString);
View Full Code Here

        try {
            AttributeList attributeList = getAttributeList(e);
            for (Object anAttributeList : attributeList)
                server.setAttribute(objectName, (Attribute) anAttributeList);
        } catch (Exception e1) {
            throw new ConfigurationException(e1);
        }

    }
View Full Code Here

                Class[] parameterTypes = {"".getClass()};
                Object[] parameterValues = {value};
                return attributeType.getConstructor(parameterTypes).newInstance(parameterValues);
            }
        } catch (Exception e1) {
            throw new ConfigurationException(e1);
        }
       
    }
View Full Code Here

            for (Object o : e.getChildren("item")) {
                col.add(getObject((Element) o));
            }
            return col;
        }catch(Exception e1){
            throw new ConfigurationException(e1);
        }
    }
View Full Code Here

    {
        try {
            MBeanServer mserver = q2.getMBeanServer();
            return mserver.instantiate (clazz, loaderName);
        } catch (Exception e) {
            throw new ConfigurationException (clazz, e);
        }
    }
View Full Code Here

                                    cfg.put(k, v);
                            }
                        }
                    }
                } catch (NameRegistrar.NotFoundException ex) {
                    throw new ConfigurationException (ex.getMessage());
                }
            }
        }
        return cfg;
    }
View Full Code Here

            if (obj instanceof Configurable)
                ((Configurable)obj).setConfiguration (getConfiguration (e));
            if (obj instanceof XmlConfigurable)
                ((XmlConfigurable)obj).setConfiguration(e);
        } catch (ConfigurationException ex) {
            throw new ConfigurationException (ex);
        }
    }
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.