Examples of XmlConfiguration


Examples of org.mortbay.xml.XmlConfiguration

     */
    public void start( DirectoryService dirService ) throws Exception
    {
        this.dirService = dirService;

        XmlConfiguration jettyConf = null;

        if ( confFile != null )
        {
            jettyConf = new XmlConfiguration( new FileInputStream( confFile ) );

            LOG.info( "configuring jetty http server from the configuration file {}", confFile );

            try
            {
                jetty = new Server();
                jettyConf.configure( jetty );
                configured = true;
            }
            catch ( Exception e )
            {
                LOG.error( I18n.err( I18n.ERR_120 ) );
View Full Code Here

Examples of org.mortbay.xml.XmlConfiguration

public class JettyLauncher {

    public static void main(String[] args) throws Exception {
        Server server = new Server();
        FileInputStream jettyConfFile = new FileInputStream(args[0]);
        XmlConfiguration configuration = new XmlConfiguration(jettyConfFile);
        jettyConfFile.close();
        configuration.configure(server);
        server.start();
        server.join();
    }
View Full Code Here

Examples of org.mortbay.xml.XmlConfiguration

      keys.add("timestamp");
      testTables.put("system_metrics", keys);
      URL serverConf = TestDatabaseWebJson.class
        .getResource("/WEB-INF/jetty.xml");
      server = new Server();
      XmlConfiguration configuration;
      try {
        configuration = new XmlConfiguration(serverConf);
        configuration.configure(server);
        server.start();
        server.setStopAtShutdown(true);
      } catch (Exception e) {
        log.error(ExceptionUtil.getStackTrace(e));
      }
View Full Code Here

Examples of org.mortbay.xml.XmlConfiguration

                        System.arraycopy(old_server_classes, 0, server_classes, 2, old_server_classes.length);
                   
                    _context.setServerClasses(server_classes);
                    if(Log.isDebugEnabled())
                        Log.debug("Configure: "+jetty);
                    XmlConfiguration jetty_config=new XmlConfiguration(jetty.getURL());
                    jetty_config.configure(getWebAppContext());
                }
                finally
                {
                    _context.setServerClasses(old_server_classes);
                }
View Full Code Here

Examples of org.mortbay.xml.XmlConfiguration

        // the webapp being deployed.
        File hotDeployXmlFile=new File(filename);
        if (!hotDeployXmlFile.exists())
            return null;

        XmlConfiguration xmlConfiguration=new XmlConfiguration(hotDeployXmlFile.toURL());
        HashMap properties = new HashMap();
        properties.put("Server", _contexts.getServer());
        if (_configMgr!=null)
            properties.putAll(_configMgr.getProperties());
          
        xmlConfiguration.setProperties(properties);
        ContextHandler context=(ContextHandler)xmlConfiguration.configure();
        return context;
    }
View Full Code Here

Examples of org.mortbay.xml.XmlConfiguration

        {
            LOG.warn( "Neither configuration file nor web apps were configured for the http server, skipping initialization." );
            return;
        }

        XmlConfiguration jettyConf = null;

        if ( confFile != null )
        {
            jettyConf = new XmlConfiguration( new FileInputStream( confFile ) );

            LOG.info( "configuring jetty http server from the configuration file {}", confFile );

            try
            {
                jetty = new Server();
                jettyConf.configure( jetty );
                configured = true;
            }
            catch ( Exception e )
            {
                LOG.error( I18n.err( I18n.ERR_120 ) );
View Full Code Here

Examples of org.openqa.jetty.xml.XmlConfiguration

    {
        _configuration=configuration.toString();
        Server.hookThread.add(this);
        try
        {
            XmlConfiguration config=new XmlConfiguration(configuration);
            config.configure(this);
        }
        catch(IOException e)
        {
            throw e;
        }
View Full Code Here

Examples of org.ow2.util.xmlconfig.XMLConfiguration

        }

        EasyBeansDD easyBeansDD = null;
        if (easybeansXmlURL != null) {
            easyBeansDD = new EasyBeansDD();
            XMLConfiguration xmlConfiguration = new XMLConfiguration(easybeansXmlURL, "easybeans-mapping.xml");
            try {
                xmlConfiguration.configure(easyBeansDD);
            } catch (XMLConfigurationException e) {
                throw new ParsingException(
                        "Cannot create the object representing EasyBeans specific Deployment Descriptor", e);
            }
        }
View Full Code Here

Examples of org.ow2.util.xmlconfig.XMLConfiguration

    public static void configure(final Embedded embedded,
                                  final List<URL> xmlConfigurationURLs,
                                  final Map<String, Object> contextualInstances) throws EmbeddedException {
        long tStart = System.currentTimeMillis();
        logger.debug("Starting configuration of EasyBeans server");
        XMLConfiguration xmlConfiguration = new XMLConfiguration("easybeans-mapping.xml");

        // Set the source configurations
        if (xmlConfigurationURLs != null) {
            for (URL configuration : xmlConfigurationURLs) {
                xmlConfiguration.addConfigurationFile(configuration);
            }
        }

        // Resolve properties as system properties
        xmlConfiguration.setPropertyResolver(new SystemPropertyResolver());

        // Use the map if not null
        if (contextualInstances != null) {
            xmlConfiguration.setContextualInstances(contextualInstances);
        }

        try {
            xmlConfiguration.configure(embedded);
        } catch (XMLConfigurationException e) {
            throw new EmbeddedException("Cannot configure the embedded server", e);
        }
        logger.debug("Configuration done in : {0} ms", Long.valueOf((System.currentTimeMillis() - tStart)));
    }
View Full Code Here

Examples of org.wso2.carbon.security.util.XmlConfiguration

        Registry registry = registryService.getConfigSystemRegistry();

        try {
            // Scenarios are listed in resources/scenario-config.xml
            URL resource = bundleContext.getBundle().getResource("scenario-config.xml");
            XmlConfiguration xmlConfiguration = new XmlConfiguration(resource.openStream(),
                    SecurityConstants.SECURITY_NAMESPACE);

            OMElement[] elements = xmlConfiguration.getElements("//ns:Scenario");

            boolean transactionStarted = Transaction.isStarted();
            if (!transactionStarted) {
                registry.beginTransaction();
            }
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.