Examples of ActivationException


Examples of org.apache.tuscany.sca.runtime.ActivationException

            } else if (implementation != null) {
                removeImplementationProvider((RuntimeComponent) component);
                removeScopeContainer(component);
            }
        } catch (Exception e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.ActivationException

        this.endpointRegistry = endpointRegistry;
        this.extensionPointRegistry = extensionPointRegistry;
        try {
            init();
        } catch (ContributionResolveException e) {
            throw new ActivationException(e);
        } catch (CompositeBuilderException e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.ActivationException

            }
            for (Component component : composite.getComponents()) {
                activateComponent(compositeContext, component);
            }
        } catch (Exception e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.ActivationException

            }
            for (Component component : composite.getComponents()) {
                deactivateComponent(component);
            }
        } catch (Exception e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.ActivationException

            for (ComponentReference reference : component.getReferences()) {
                activate(compositeContext,
                        (RuntimeComponent) component, (RuntimeComponentReference) reference);
            }
        } catch (Exception e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.ActivationException

            } else if (implementation != null) {
                removeImplementationProvider((RuntimeComponent) component);
                removeScopeContainer(component);
            }
        } catch (Exception e) {
            throw new ActivationException(e);
        }
    }
View Full Code Here

Examples of org.qi4j.api.activation.ActivationException

        {
            if( e instanceof ActivationException )
            {
                throw ( (ActivationException) e );
            }
            throw new ActivationException( "Could not activate application", e );
        }
// START SNIPPET: actual

        moduleInstance = applicationInstance.findModule( "Layer 1", "Module 1" );
    }
View Full Code Here

Examples of org.wso2.carbon.event.broker.exceptions.ActivationException

            }
           
        } catch (Exception e) {
            String message = "Error while building broker configuration from file";
            log.error(message, e);
            throw new ActivationException(message, e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.broker.exceptions.ActivationException

                String message = "Error while creating Subscription Manager";
                log.error(message, e);
                if (e instanceof ClassNotFoundException) {
                    throw (ClassNotFoundException)e;
                }
                throw new ActivationException(message, e);
            }
   
            Map<String, String> subscriptionManagerParameters = getParameters(
                    subscriptionManagerElement.getChildrenWithName(new QName(
                            BROKER_CONFIG_NAMESPACE, LOCAL_NAME_PARAMETER)));
            Set<Map.Entry<String, String>> parameters = subscriptionManagerParameters.entrySet();
            for(Map.Entry<String, String> e : parameters) {
                subscriptionManager.addProperty(e.getKey(), e.getValue());
            }
   
            OMElement notificationManagerElement = configElement.getFirstChildWithName(new QName(
                    BROKER_CONFIG_NAMESPACE, LOCAL_NAME_NOTIFICATION_MANAGER_CONFIG));
            String notificationManagerClass = notificationManagerElement.getAttribute(
                    new QName(ATTR_CLASS)).getAttributeValue();
            try {
                notificationManager =
                        (NotificationManager) Class.forName(notificationManagerClass).newInstance();
                if (notificationManager instanceof CarbonNotificationManager) {
                    Map<String, String> notificationManagerParameters = getParameters(
                            notificationManagerElement.getChildrenWithName(new QName(
                                    BROKER_CONFIG_NAMESPACE, LOCAL_NAME_PARAMETER)));
                    ((CarbonNotificationManager) notificationManager).init(
                            notificationManagerParameters);
                }
            } catch(Exception e) {
                String message = "Error while creating Notification Manager";
                log.error(message, e);
                if (e instanceof ClassNotFoundException) {
                    throw (ClassNotFoundException)e;
                }
                throw new ActivationException(message, e);
            }
   
            /*String eventDispatcherName = configElement.getFirstChildWithName(new QName(
                    BROKER_CONFIG_NAMESPACE, LOCAL_NAME_EVENT_DISPATCHER_CONFIG)).getText().trim();
            try {
                eventDispatcher = (EventDispatcher) Class.forName(eventDispatcherName).newInstance();
                if (eventDispatcher instanceof CarbonEventDispatcher) {
                    ((CarbonEventDispatcher)eventDispatcher).init(serverConfigurationContext);
                }
            } catch(Exception e) {
                String message = "Error while creating Event Dispatcher";
                log.error(message, e);
                if (e instanceof ClassNotFoundException) {
                    throw (ClassNotFoundException)e;
                }
                throw new ActivationException(message, e);
            }*/
        }else{
            notificationManager = new CarbonNotificationManager();
            ((CarbonNotificationManager)notificationManager).init(new HashMap<String, String>());
            subscriptionManager = new EmbeddedRegistryBasedSubscriptionManager();
        }

        try {
            CarbonEventBroker broker = (CarbonEventBroker)CarbonEventBroker.getInstance();
            broker.registerSubscriptionManager(subscriptionManager);
            broker.registerNotificationManager(notificationManager);
            subscriptionManager.init();
            return broker;
        } catch(Exception e) {
            String message = "Error while initializing Event Source";
            log.error(message, e);
            throw new ActivationException(message, e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.eventing.broker.exceptions.ActivationException

                }
            }
        } catch (Exception e) {
            String message = "Error while building broker configuration from file";
            log.error(message, e);
            throw new ActivationException(message, e);
        }
    }
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.