Package org.apache.tuscany.common.monitor

Examples of org.apache.tuscany.common.monitor.MonitorFactory


    public static final void main(String[] args) throws Exception {
       
        // Setup Tuscany monitoring to use java.util.logging
        LogManager.getLogManager().readConfiguration(HelloWorldClient.class.getResourceAsStream("/logging.properties"));
        Properties levels = new Properties();
        MonitorFactory monitorFactory = new JavaLoggingMonitorFactory(levels, Level.FINEST, "MonitorMessages");

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("HelloWorldModuleComponent", "http://helloworld", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
View Full Code Here


    public void contextInitialized(ServletContextEvent servletContextEvent) {
        ServletContext servletContext = servletContextEvent.getServletContext();
        String name = servletContext.getInitParameter(SCA_COMPONENT_NAME);
        String uri = name; // todo get from context path
        MonitorFactory monitorFactory = new NullMonitorFactory(); // todo have one that writes to the servlet log

        try {
            bootRuntime(name, uri, monitorFactory);
        } catch (ConfigurationException e) {
            throw new RuntimeException(e.getMessage(), e);
View Full Code Here

        assertNull(systemContext.resolveExternalInstance(MockComponent.class));
    }

    protected void setUp() throws Exception {
        super.setUp();
        MonitorFactory monitorFactory = new NullMonitorFactory();
        ContextFactoryBuilderRegistry builderRegistry = BootstrapHelper.bootstrapContextFactoryBuilders(monitorFactory);
        DefaultWireBuilder wireBuilder = new DefaultWireBuilder();
        runtime = new RuntimeContextImpl(monitorFactory, builderRegistry, wireBuilder);
        runtime.start();
        systemContext = runtime.getSystemContext();
View Full Code Here

        // Create a factory for model objects
        factory = new JavaAssemblyFactoryImpl();

        // Create and bootstrap an empty Tuscany runtime
        MonitorFactory monitorFactory = new NullMonitorFactory();
        ContextFactoryBuilderRegistry builderRegistry = BootstrapHelper.bootstrapContextFactoryBuilders(monitorFactory);
        DefaultWireBuilder wireBuilder = new DefaultWireBuilder();
        runtime = new RuntimeContextImpl(monitorFactory, builderRegistry, wireBuilder);
        runtime.start();
    }
View Full Code Here

    public static final void main(String[] args) throws Exception {
       
        // Setup Tuscany monitoring to use java.util.logging
        LogManager.getLogManager().readConfiguration(CustomerInfoClient.class.getResourceAsStream("/logging.properties"));
        Properties levels = new Properties();
        MonitorFactory monitorFactory = new JavaLoggingMonitorFactory(levels, Level.FINEST, "MonitorMessages");

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("CustomerInfoModuleComponent", "http://customerinfo", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
View Full Code Here

     * Creates a default {@link RuntimeContext} configured with support for Java component implementations
     *
     * @throws ConfigurationException
     */
    public static RuntimeContext createJavaRuntime() throws ConfigurationException {
        MonitorFactory monitorFactory = new NullMonitorFactory();
        ContextFactoryBuilderRegistry builderRegistry = BootstrapHelper.bootstrapContextFactoryBuilders(monitorFactory);
        DefaultWireBuilder wireBuilder = new DefaultWireBuilder();
        RuntimeContext runtime = new RuntimeContextImpl(monitorFactory, builderRegistry, wireBuilder);
        runtime.start();
        runtime.getSystemContext().registerModelObject(createSystemCompositeComponent(SYSTEM_CHILD));
View Full Code Here

    public static final void main(String[] args) throws Exception {
       
        // Setup Tuscany monitoring to use java.util.logging
        LogManager.getLogManager().readConfiguration(CalculatorClient.class.getResourceAsStream("/logging.properties"));
        Properties levels = new Properties();
        MonitorFactory monitorFactory = new JavaLoggingMonitorFactory(levels, Level.FINEST, "MonitorMessages");

        // Create a Tuscany runtime for the sample module component
        TuscanyRuntime tuscany = new TuscanyRuntime("CalculatorModuleComponent", "http://calculator", monitorFactory);

        // Start the Tuscany runtime and associate it with this thread
View Full Code Here

    public static final void main(String[] args) throws Exception {
       
        // Setup Tuscany monitoring to use java.util.logging
        LogManager.getLogManager().readConfiguration(SupplyChainClient.class.getResourceAsStream("/logging.properties"));
        Properties levels = new Properties();
        MonitorFactory monitorFactory = new JavaLoggingMonitorFactory(levels, Level.FINEST, "MonitorMessages");

        // Obtain Tuscany runtime
        TuscanyRuntime tuscany = new TuscanyRuntime("supplychain", null, monitorFactory);

        // Associate the application module component with this thread
View Full Code Here

TOP

Related Classes of org.apache.tuscany.common.monitor.MonitorFactory

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.