Examples of InitialisationException


Examples of org.mule.api.lifecycle.InitialisationException

    public void initialise() throws InitialisationException
    {

        if (xquery != null && xqueryFile != null)
        {
            throw new InitialisationException(XmlMessages.canOnlySetFileOrXQuery(), this);
        }

        try
        {
            if (xqueryFile != null)
            {
                xquery = IOUtils.getResourceAsString(xqueryFile, getClass());
            }
            if (configuration == null)
            {
                configuration = new Configuration();
            }

            XQDataSource ds = new SaxonXQDataSource(configuration);
            if (commonHandler != null)
            {
                ds.setCommonHandler(commonHandler);
            }
            connection = ds.getConnection();

            transformerPool.addObject();

        }
        catch (Throwable te)
        {
            throw new InitialisationException(te, this);
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

            }

        }
        catch (RegistrationException e)
        {
            throw new InitialisationException(CoreMessages.failedToLoad("NamespaceManager"), e, this);
        }

        super.initialise();
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

        {
            throw e;
        }
        catch (Exception e)
        {
            throw new InitialisationException(e, this);
        }
        try
        {
            fireLifecycle(Initialisable.PHASE_NAME);
        }
        catch (InitialisationException e)
        {
            throw e;
        }
        catch (LifecycleException e)
        {
            throw new InitialisationException(e, this);
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

                }
            });
        }
        catch (Throwable t)
        {
            throw new InitialisationException(t, this);
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

            unregisterMBeansIfNecessary();
            mBeanServer.registerMBean(new HierarchyDynamicMBean(), objectName);
        }
        catch (Exception e)
        {
            throw new InitialisationException(CoreMessages.failedToStart("Log4j Agent"), e, this);
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

    {
        createMultipleTransactedReceivers = false;

        if (dataSource == null)
        {
            throw new InitialisationException(MessageFactory.createStaticMessage("Missing data source"), this);
        }
        if (resultSetHandler == null)
        {
            resultSetHandler = new org.apache.commons.dbutils.handlers.MapListHandler(new ColumnAliasRowProcessor());
        }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

                return;
            }
        }
        catch (Exception e)
        {
            throw new InitialisationException(e, this);
        }


        if (mBeanServer == null && createServer)
        {
            // here we create a new mbean server, not using a platform one
            mBeanServer = MBeanServerFactory.createMBeanServer();
            serverCreated.set(true);
        }

        if (mBeanServer == null && locateServer)
        {
            mBeanServer = ManagementFactory.getPlatformMBeanServer();
        }

        if (mBeanServer == null)
        {
            throw new InitialisationException(ManagementMessages.cannotLocateOrCreateServer(), this);
        }

        if (StringUtils.isBlank(muleContext.getConfiguration().getId()))
        {
            // TODO i18n the message properly
            throw new IllegalArgumentException(
                    "Manager ID is mandatory when running with JmxAgent. Give your Mule configuration a valid ID.");
        }

        try
        {
            // We need to register all the services once the server has initialised
            muleContext.registerListener(new MuleContextStartedListener());
            // and unregister once context stopped
            muleContext.registerListener(new MuleContextStoppedListener());
        }
        catch (NotificationException e)
        {
            throw new InitialisationException(e, this);
        }
        initialized.compareAndSet(false, true);
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

                        rmiRegistry = LocateRegistry.getRegistry(uri.getHost(), uri.getPort());
                    }
                }
                catch (RemoteException e)
                {
                    throw new InitialisationException(e, this);
                }
            }
        }
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

            {
                paramTransformer = ExpressionAnnotationsHelper.getTransformerForMethodWithAnnotations(transformMethod, muleContext);
            }
            catch (TransformerException e)
            {
                throw new InitialisationException(e, this);
            }
        }
        resolvers = muleContext.getRegistry().lookupObjects(TransformerArgumentResolver.class);
    }
View Full Code Here

Examples of org.mule.api.lifecycle.InitialisationException

                }
            });
        }
        catch (NotificationException e)
        {
            throw new InitialisationException(e, this);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.