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

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


        try {
          responseJMSMsg.setStringProperty(JMSBindingConstants.DEFAULT_OPERATION_PROP_NAME, msg.getOperation().getName());
        } catch (JMSException e) {
          // Not sure what to do at this point.. it doesn't make sense to create a fault message.
          // Throwing a runtime exception for now. 
          throw new JMSBindingException(e);         
        }
       
        msg.setBody(responseJMSMsg);

        return msg;
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

            // statically-configured destination unless a message is received that does not have
            // the necessary properties. 
            bindingRequestDest = lookupDestination();
            bindingReplyDest = lookupResponseDestination();
        } catch (NamingException e) {
            throw new JMSBindingException(e);
        } // end try
    } // end constructor
View Full Code Here

        Destination dest = jmsResourceFactory.lookupDestination(queueName);

        if (qCreateMode.equals(JMSBindingConstants.CREATE_ALWAYS)) {
            // In this mode, the queue must not already exist as we are creating it
            if (dest != null) {
                throw new JMSBindingException(queueType + queueName
                    + " already exists but has create mode of \""
                    + qCreateMode
                    + "\" while registering binding "
                    + jmsBinding.getName()
                    + " invoker");
            }
            // Create the queue
            dest = jmsResourceFactory.createDestination(queueName);

        } else if (qCreateMode.equals(JMSBindingConstants.CREATE_IF_NOT_EXIST)) {
            // In this mode, the queue may nor may not exist. It will be created if it does not exist
            // but don't create when using jms:jndi uri format
            if (dest == null && !"jndi".equals(jmsBinding.getDestinationType())) {
                dest = jmsResourceFactory.createDestination(queueName);
            }

        } else if (qCreateMode.equals(JMSBindingConstants.CREATE_NEVER)) {
            // In this mode, the queue must have already been created.
            if (dest == null) {
                throw new JMSBindingException(queueType + queueName
                    + " not found but create mode of \""
                    + qCreateMode
                    + "\" while registering binding "
                    + jmsBinding.getName()
                    + " invoker");
            }
        }

        // Make sure we ended up with a queue
        if (dest == null) {
            throw new JMSBindingException(queueType + queueName
                + " not found with create mode of \""
                + qCreateMode
                + "\" while registering binding "
                + jmsBinding.getName()
                + " invoker");
View Full Code Here

                }
            }
           
            return tuscanyMsg;
        } catch (Exception e) {
            throw new JMSBindingException(e);
        }  
    }
View Full Code Here

            context.setRequestDestination(getRequestDestination(tuscanyMsg, session));
            context.setReplyToDestination(getReplyToDestination(session));
           
            return tuscanyMsg;
        } catch (Exception e) {
            throw new JMSBindingException(e);
        } // end try  
  } // end method processRequest
View Full Code Here

          context.closeJmsSession();
          if (jmsResourceFactory.isConnectionClosedAfterUse()) {
              jmsResourceFactory.closeConnection();
          } // end if
    } catch (JMSException ex) {
      throw new JMSBindingException(ex);
    } // end try
    return tuscanyMsg;
  } // end method postProcessRequest
View Full Code Here

                os = null;
            }
            return os;

        } catch (IOException e) {
            throw new JMSBindingException(e);
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        } catch (SAXException e) {
            throw new JMSBindingException(e);
        }
    }
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.