Package javax.jbi

Examples of javax.jbi.JBIException


        return idGenerator.generateId();
    }

    protected void checkInitialized() throws JBIException {
        if (!containerInitialized.get()) {
            throw new JBIException("The Container is not initialized - please call init(...)");
        }
    }
View Full Code Here


            ctx.registerMBean(mBeanName, this, ComponentMBean.class);
            return mBeanName;
        catch (Exception e) {
            String errorStr = "Failed to register MBeans";
            LOG.error(errorStr, e);
            throw new JBIException(errorStr, e);
        }
    }
View Full Code Here

        // register self with the management context
        ObjectName objectName = br.getContainer().getManagementContext().createObjectName(this);
        try {
            br.getContainer().getManagementContext().registerMBean(objectName, this, LifeCycleMBean.class);
        } catch (JMException e) {
            throw new JBIException("Failed to register MBean with the ManagementContext", e);
        }
    }
View Full Code Here

            Queue queue = inboundSession.createQueue(INBOUND_PREFIX + broker.getContainer().getName());
            MessageConsumer inboundQueue = inboundSession.createConsumer(queue);
            inboundQueue.setMessageListener(this);
        } catch (JMSException e) {
            log.error("Failed to initialize JMSFlow", e);
            throw new JBIException(e);
        }
    }
View Full Code Here

                    }
                }

                startConsumerMonitor();
            } catch (JMSException e) {
                JBIException jbiEx = new JBIException("JMSException caught in start: " + e.getMessage());
                throw jbiEx;
            }
        }
    }
View Full Code Here

            // Inbound broadcast
            broadcastTopic = new ActiveMQTopic(broadcastDestinationName);
            advisoryTopic = AdvisorySupport.getConsumerAdvisoryTopic((ActiveMQDestination) broadcastTopic);
        } catch (Exception e) {
            log.error("Failed to initialize JCAFlow", e);
            throw new JBIException(e);
        }
    }
View Full Code Here

                    }
                };
                advisoryConnector = new Connector(advisoryTopic, listener, false);
                advisoryConnector.start();
            } catch (Exception e) {
                throw new JBIException("JMSException caught in start: " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

    public Object request(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException {
        InOut exchange = createInOutExchange(resolver);
        populateMessage(exchange, exchangeProperties, inMessageProperties, content);
        boolean answer = sendSync(exchange);
        if (!answer) {
            throw new JBIException("Exchange aborted");
        }
        Exception error = exchange.getError();
        if (error != null) {
            throw new JBIException(error);
        }
        if (exchange.getFault() != null) {
            throw FaultException.newInstance(exchange);
        }
View Full Code Here

        if (components != null) {
            for (Iterator it = components.entrySet().iterator(); it.hasNext();) {
                Map.Entry e = (Map.Entry) it.next();
                if (!(e.getKey() instanceof String)) {
                    throw new JBIException("Component must have a non null string name");
                }
                if (!(e.getValue() instanceof Component)) {
                    throw new JBIException("Component is not a known component");
                }
                String name = (String) e.getKey();
                activateComponent((Component) e.getValue(), name);
                getComponent(name).init();
            }
View Full Code Here

                Object endpoint = itEp.next();
                Component c = null;
                if (key.length() > 0) {
                    Component comp = (Component) components.get(key);
                    if (comp == null) {
                        throw new JBIException("Could not find component '" + key + "' specified for endpoint");
                    }
                    c = comp;
                } else {
                    for (Iterator itCmp = components.values().iterator(); itCmp.hasNext();) {
                        Component comp = (Component) itCmp.next();
                        Class[] endpointClasses = (Class[]) getEndpointClassesMethod.invoke(comp, null);
                        if (isKnownEndpoint(endpoint, endpointClasses)) {
                            c = comp;
                            break;
                        }
                    }
                    if (c == null) {
                        c = getComponentForEndpoint(getEndpointClassesMethod, endpoint);
                        if (c == null) {
                            throw new JBIException("Unable to find a component for endpoint class: " + endpoint.getClass());
                        }
                    }
                }
                addEndpointMethod.invoke(c, new Object[] {endpoint });
            }
View Full Code Here

TOP

Related Classes of javax.jbi.JBIException

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.