Package org.wildfly.clustering.ejb

Examples of org.wildfly.clustering.ejb.BeanPassivationConfiguration


            public ScheduledExecutorService getExecutor() {
                return scheduler;
            }
        };
        final Executor executor = this.executor.getValue();
        final BeanPassivationConfiguration passivationConfig = this.passivationConfig;
        final PassivationConfiguration<T> passivation = new PassivationConfiguration<T>() {
            @Override
            public PassivationListener<T> getPassivationListener() {
                return passivationListener;
            }
View Full Code Here


        CommandDispatcher<BeanEvictionContext<String>> dispatcher = mock(CommandDispatcher.class);
        Batcher<TransactionBatch> batcher = mock(Batcher.class);
        TransactionBatch batch = mock(TransactionBatch.class);
        Evictor<String> evictor = mock(Evictor.class);
        PassivationConfiguration<Bean<Object, String, Object>> config = mock(PassivationConfiguration.class);
        BeanPassivationConfiguration passivationConfig = mock(BeanPassivationConfiguration.class);
        ArgumentCaptor<Command> capturedCommand = ArgumentCaptor.forClass(Command.class);
        ArgumentCaptor<BeanEvictionContext> capturedContext = ArgumentCaptor.forClass(BeanEvictionContext.class);

        when(dispatcherFactory.createCommandDispatcher(same(name), (BeanEvictionContext<String>) capturedContext.capture())).thenReturn(dispatcher);
        when(config.getConfiguration()).thenReturn(passivationConfig);
        when(passivationConfig.getMaxSize()).thenReturn(1);

        try (Scheduler<String> scheduler = new BeanEvictionScheduler<>(name, batcher, evictor, dispatcherFactory, config)) {
            BeanEvictionContext<String> context = capturedContext.getValue();

            assertSame(scheduler, context);
View Full Code Here

TOP

Related Classes of org.wildfly.clustering.ejb.BeanPassivationConfiguration

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.