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

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


        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
            if (dest == null) {
                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

          }
         
          return getNext().invoke(msg);
         
      } catch (JMSException e) {
          throw new JMSBindingException(e);
      }
    }
View Full Code Here

          // call out here to some 3rd party system to do whatever you
          // need to authenticate the principal
     
          return getNext().invoke(msg);
      } catch (JMSException e) {
          throw new JMSBindingException(e);
      }
    }
View Full Code Here

    public synchronized Session getJmsSession() {
        if (jmsSession == null) {
            try {
                jmsSession = getJmsResourceFactory().createSession();
            } catch (Exception e) {
                throw new JMSBindingException(e);
            }
        }
        return jmsSession;
    }
View Full Code Here

    public synchronized void closeJmsSession() {
        if (jmsSession != null) {
            try {
                getJmsResourceFactory().closeSession(jmsSession);
            } catch (Exception e) {
                throw new JMSBindingException(e);
            } finally {
                jmsSession = null;
            }
        }
    }
View Full Code Here

    public synchronized Session getJmsResponseSession() {
        if (jmsResponseSession == null) {
            try {
                jmsResponseSession = getJmsResourceFactory().createResponseSession();
            } catch (Exception e) {
                throw new JMSBindingException(e);
            }
        }
        return jmsResponseSession;
    }
View Full Code Here

    public synchronized void closeJmsResponseSession() {
        if (jmsResponseSession != null) {
            try {
                getJmsResourceFactory().closeResponseSession(jmsResponseSession);
            } catch (Exception e) {
                throw new JMSBindingException(e);
            } finally {
                jmsResponseSession = null;
            }
        }
    }
View Full Code Here

              context.setTimeToLive(JMSBindingConstants.DEFAULT_TIME_TO_LIVE);       
            }            
           
            return tuscanyMsg;
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        }
    }
View Full Code Here

                os = null;
            }
            return os;

        } catch (XMLStreamException e) {
            throw new JMSBindingException(e);
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.jms.impl.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.