Package org.torquebox.core.component

Examples of org.torquebox.core.component.ComponentResolver


   
    @Before
    public void setUp() throws Exception {
        this.ruby = createRuby();
        this.componentClass = new ComponentClass();
        this.componentResolver = new ComponentResolver( false );
        this.componentResolver.setComponentInstantiator( this.componentClass );
        this.componentResolver.setComponentWrapperClass( ServiceComponent.class );
        this.service = new RubyService( "test service" );
        this.service.setComponentResolver( this.componentResolver );
        this.service.setRubyRuntimePool( new RestartableRubyRuntimePool(
View Full Code Here


            throw new Exception("Instantiator needs to be initialized before initializing component resolver");
        }

        log.tracef("Initializing component resolver for service '%s'...", serviceName.getSimpleName());

        componentResolver = new ComponentResolver(alwaysReload);

        componentResolver.setAlwaysNewInstance(alwaysNewInstance);
        componentResolver.setComponentInstantiator(instantiator);
        componentResolver.setComponentName(serviceName.getCanonicalName());
        componentResolver.setComponentWrapperClass(componentWrapperClass);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        this.ruby = createRuby();
        this.componentClass = new ComponentClass();
        this.componentResolver = new ComponentResolver( false );
        this.componentResolver.setComponentInstantiator( this.componentClass );
        this.componentResolver.setComponentWrapperClass( JobComponent.class );
        this.jobDetail = new JobDetailImpl();
        this.jobDetail.setName( "RubyJobProxyTest" );
        this.context = mock( JobExecutionContext.class );
View Full Code Here

    @Override
    public void startAsync(StartContext context) throws Exception {
        this.runtime = this.poolInjector.getValue().borrowRuntime( getDestinationPattern() );

        try {
            ComponentResolver componentResolver = this.componentResolverInjector.getValue();
            XAStompletComponent stomplet = (XAStompletComponent) componentResolver.resolve( runtime );

            SimpleStompletContainer container = containerInjector.getValue();
            container.addStomplet( this.destinationPattern, stomplet, this.config );
        } catch (Exception e) {
            this.poolInjector.getValue().returnRuntime( this.runtime );
View Full Code Here

    @Override
    public Job newJob(TriggerFiredBundle bundle, Scheduler scheduler) throws SchedulerException {
        JobDetail jobDetail = bundle.getJobDetail();

        ComponentResolver resolver = this.componentResolvers.get(jobDetail.getKey());
        if (resolver == null) {
            log.errorf("JobScheduler.newJob found no ComponentResolver for %s", jobDetail.getKey());
        }
        RubyJobProxy rubyJob = new RubyJobProxy(this.rubyRuntimePoolInjector.getValue(), resolver, jobDetail);
View Full Code Here

TOP

Related Classes of org.torquebox.core.component.ComponentResolver

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.