Package org.switchyard.component.common.knowledge.session

Examples of org.switchyard.component.common.knowledge.session.KnowledgeDisposal


     * Creates a new EntityManagetFactory disposal.
     * @param entityManagerFactory the EntityManagerFactory
     * @return the disposal
     */
    public static KnowledgeDisposal newDisposal(final EntityManagerFactory entityManagerFactory) {
        return new KnowledgeDisposal() {
            @Override
            public void dispose() {
                try {
                    if (entityManagerFactory != null) {
                        entityManagerFactory.close();
View Full Code Here


     * Creates a new KieRuntimeLogger disposal.
     * @param kieRuntimeLoggers the loggers
     * @return the disposal
     */
    public static KnowledgeDisposal newDisposal(final List<KieRuntimeLogger> kieRuntimeLoggers) {
        return new KnowledgeDisposal() {
            @Override
            public void dispose() {
                if (kieRuntimeLoggers != null) {
                    for (KieRuntimeLogger kieRuntimeLogger : kieRuntimeLoggers) {
                        try {
View Full Code Here

     * Creates a new KieScanner disposal.
     * @param kieScanner the scanner
     * @return the disposal
     */
    public static KnowledgeDisposal newDisposal(final KieScanner kieScanner) {
        return new KnowledgeDisposal() {
            @Override
            public void dispose() {
                try {
                    if (kieScanner != null) {
                        kieScanner.stop();
View Full Code Here

     * Creates a new KieSession disposal.
     * @param kieSession the session
     * @return the disposal
     */
    public static KnowledgeDisposal newDisposal(final KieSession kieSession) {
        return new KnowledgeDisposal() {
            @Override
            public void dispose() {
                try {
                    if (kieSession != null) {
                        try {
View Full Code Here

                }
            };
            runtimeManager.init();
            if (!runtimeManagerRegistry.isRegistered(deploymentId)) {
                runtimeManagerRegistry.register(runtimeManager);
                session.addDisposals(new KnowledgeDisposal() {
                    @Override
                    public void dispose() {
                        runtimeManagerRegistry.remove(deploymentId);
                    }
                });
View Full Code Here

TOP

Related Classes of org.switchyard.component.common.knowledge.session.KnowledgeDisposal

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.