Package org.apache.tuscany.sca.binding.jms

Examples of org.apache.tuscany.sca.binding.jms.JMSBindingException


                    // along the wire
                    return payload;
                }
            }           
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        }
    }
View Full Code Here


            Constructor<?> constructor = clazz.getDeclaredConstructor(new Class[] {JMSBinding.class});
            instance = constructor.newInstance(binding);

        } catch (Throwable e) {
            throw new JMSBindingException("Exception instantiating OperationAndDataBinding class", e);
        }

        return instance;
    }
View Full Code Here

                    }
                    return constructor.newInstance(binding, registry);
                }
               
            }
            throw new JMSBindingException("Class not found: " + className);
        } catch (Throwable e) {
            throw new JMSBindingException("Exception instantiating OperationAndDataBinding class", e);
        }
    }
View Full Code Here

    } // end constructor

    public Invoker createInvoker(Operation operation) {

        if (jmsBinding.getDestinationName() == null) {
                throw new JMSBindingException("No destination specified for reference " + reference.getName());
        } // end if

        if ( jmsBinding.getActivationSpecName() != null ) {
          throw new JMSBindingException("Activation spec can not be specified on an SCA reference binding.");
        }
        Invoker invoker = null;
        invoker = new RRBJMSBindingInvoker(operation, jmsResourceFactory, endpointReference);
      
        return invoker;
View Full Code Here

            MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class);
            MessageListener listener;
      try {
        listener = new JMSAsyncResponseInvoker(endpointReference, messageFactory, jmsResourceFactory);
      } catch (NamingException e) {
        throw new JMSBindingException("Unable to create JMSResponseInvoker", e);
      } // end try
       
        // Create the response queue handler
            UtilityExtensionPoint utilities = extensions.getExtensionPoint(UtilityExtensionPoint.class);
            WorkScheduler workScheduler = utilities.getUtility(WorkScheduler.class);
View Full Code Here

          } // end if
         
            jmsResourceFactory.closeConnection();
            jmsResourceFactory.closeResponseConnection();
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        }
    } // end method stop
View Full Code Here

        try {
            registerListener();
        } catch (Exception e) {
            if (e instanceof JMSBindingException) throw (JMSBindingException)e;
            throw new JMSBindingException("Error starting JMSAsyncResponse endpoint", e);
        }
    } // end start
View Full Code Here

        } catch (Exception e) {
            // if using an embedded broker then when shutting down Tuscany the broker may get closed
            // before this stop method is called. I can't see how to detect that so for now just
            // ignore the exception if the message is that the transport is already disposed
            if ((e.getMessage() == null) || !e.getMessage().contains("disposed")) {
                throw new JMSBindingException("Error stopping JMSServiceBinding", e);
            }
        }
    } // end stop
View Full Code Here

        Session session = jmsResourceFactory.createSession();
        lookupActivationSpec();
        destination = lookupQueue( jmsBinding.getResponseDestinationName() );
        if (destination == null) {
          throw new JMSBindingException("Unable to create Async Response queue");
        } // end if

        if (jmsBinding.getJMSSelector() != null) {
            consumer = session.createConsumer(destination, jmsBinding.getJMSSelector());
        } else {
View Full Code Here

        if ( jmsBinding.getActivationSpecName() != null )  {
          String createMode = jmsBinding.getActivationSpecCreate();
          if ( JMSBindingConstants.CREATE_ALWAYS.equals(createMode) ) {
            ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
            if ( spec != null ) {
              throw new JMSBindingException("ActivationSpec specifies create mode of \"always\" but resource already exists.");
            }
            throw new JMSBindingException("Can not create ActivationSpec");
          } else if ( JMSBindingConstants.CREATE_IF_NOT_EXIST.equals(createMode)) {
            ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
            if ( spec == null ) {
              throw new JMSBindingException("Can not create ActivationSpec");
            }
          } else if ( JMSBindingConstants.CREATE_NEVER.equals(createMode)) {
            ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
            if ( spec == null )
              throw new JMSBindingException("ActivationSpec specifies create mode of \"never\" but resource does not exist at jndiName " + jmsBinding.getActivationSpecName());
             
          } // end if
        } // end if
  } // end method lookupActivationSpec
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.jms.JMSBindingException

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.