Examples of dispose()


Examples of org.drools.agent.KnowledgeAgent.dispose()

            Thread.sleep(6000);
            kbase = kagent.getKnowledgeBase();
            assertEquals(1, kbase.getKnowledgePackages().iterator().next().getRules().size());

        } finally {
            kagent.dispose();
            ResourceFactory.getResourceChangeNotifierService().stop();
            ResourceFactory.getResourceChangeScannerService().stop();
        }
    }
View Full Code Here

Examples of org.drools.command.SingleSessionCommandService.dispose()

        log.info( "Started process instance {}", processInstance.getId() );

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
        assertNotNull( workItem );
        service.dispose();

        service = jpaService.loadStatefulKnowledgeSession(sessionId);
        GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
        getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
        processInstance = service.execute( getProcessInstanceCommand );
View Full Code Here

Examples of org.drools.compiler.kie.builder.impl.InternalKieContainer.dispose()

                    if (kci.getKieContainer() != null) {
                        InternalKieContainer kieContainer = kci.getKieContainer();
                        kci.setKieContainer(null); // helps reduce concurrent access issues
                        try {
                            // this may fail, but we already removed the container from the registry
                            kieContainer.dispose();
                        } catch (Exception e) {
                            logger.warn("Container '" + containerId + "' disposed, but an unexpected exception was raised", e);
                            return new ServiceResponse<Void>(ServiceResponse.ResponseType.SUCCESS, "Container " + containerId +
                                    " disposed, but exception was raised: " + e.getClass().getName() + ": " + e.getMessage());
                        }
View Full Code Here

Examples of org.drools.core.StatefulSession.dispose()

            try {
                session = ruleBase.newStatefulSession();
            } finally {
                if (session != null) {
                    session.dispose();
                }
            }
        }
    }
}
View Full Code Here

Examples of org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.dispose()

    list.add("Test");
   
    ksession.insert(list);
    ksession.execute(new ActivateRuleFlowCommand("ruleflow-group"));
   
    ksession.dispose();       
        ksession = createSession(id, "ruleflow-groups.drl");
       
        groups = ((InternalAgenda)stripSession(ksession).getAgenda()).getAgendaGroups();
        // main and rule flow is now on the agenda
        assertEquals(2, groups.length);
View Full Code Here

Examples of org.drools.core.impl.StatefulKnowledgeSessionImpl.dispose()

        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

        StatefulKnowledgeSessionImpl ksession = (StatefulKnowledgeSessionImpl)kbase.newKieSession();
        checkKieSession(ksession);

        ksession.dispose();
        ksession.reset();
        checkKieSession(ksession);
    }

    private void checkKieSession(KieSession ksession) {
View Full Code Here

Examples of org.drools.examples.conway.ui.ConwayGUI.dispose()

        f.getContentPane().add( BorderLayout.CENTER,
                                gui );

        f.addWindowListener( new WindowAdapter() {
            public void windowClosing(WindowEvent we) {
                gui.dispose();
            }
        } );
        f.pack();
        f.setVisible( true );
    }
View Full Code Here

Examples of org.drools.grid.Grid.dispose()

        GridConnection connection = grid.get( ConnectionFactoryService.class ).createConnection( gsd );
        assertSame( gnode,
                    connection.connect() );

        grid.dispose();
    }

    //    public void testWhitePagesAddRemoveAddresss() {
    //        Grid grid = new GridImpl(new HashMap<String,Object>());
    //
View Full Code Here

Examples of org.drools.grid.GridNode.dispose()

        session.update( handle,
                        new MyObject( "myObj3" ) );

        fired = session.fireAllRules();

        remoteN1.dispose();
        grid1.get( SocketService.class ).close();
    }

    public static class MyObject
        implements
View Full Code Here

Examples of org.drools.grid.impl.GridImpl.dispose()

        GridConnection connection = grid.get( ConnectionFactoryService.class ).createConnection( gsd );
        assertSame( gnode,
                    connection.connect() );

        grid.dispose();
    }

    //    public void testWhitePagesAddRemoveAddresss() {
    //        Grid grid = new GridImpl(new HashMap<String,Object>());
    //
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.