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

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


    }

    protected void createConnection() throws NamingException, JMSException {
        Object o  = jndiLookUp(connectionFactoryName);
        if (o == null) {
            throw new JMSBindingException("connection factory not found: " + connectionFactoryName);
        }
      if (!(o instanceof ConnectionFactory)) {
        throw new JMSBindingException("JNDI resource '" + connectionFactoryName +"' is not a JMS ConnectionFactory");
      }
        ConnectionFactory connectionFactory = (ConnectionFactory)o;
        connection = connectionFactory.createConnection();
    }
View Full Code Here


    public Connection getResponseConnection() throws NamingException, JMSException {
        if (responseConnection == null) {
            if (responseConnectionFactoryName != null) {
                ConnectionFactory connectionFactory = (ConnectionFactory)jndiLookUp(responseConnectionFactoryName);
                if (connectionFactory == null) {
                    throw new JMSBindingException("connection factory not found: " + responseConnectionFactoryName);
                }
                responseConnection = connectionFactory.createConnection();
            } else {
                // if no response connection is defined in the SCDL use the request connection
                responseConnection = getConnection();
View Full Code Here

    if ( o == null )
      return null;
    else if (o instanceof ActivationSpec)
      return (ActivationSpec) o;
   
    throw new JMSBindingException("Incorrect resource type for ActivationSpec: " + o.getClass().getName());
  }
View Full Code Here

           
            requestMsg.setJMSReplyTo(context.getReplyToDestination());
           
            return msg;
        } catch (JMSException e) {
            throw new JMSBindingException(e);
        }
    }
View Full Code Here

                        Node node = ((Node)response).getFirstChild();
                        e.setFaultName(new QName(node.getNamespaceURI(), node.getLocalName()));
                        msg.setFaultBody(e);
                    }
                } catch (JMSException e) {
                    throw new JMSBindingException(e);
                }
            } else {
                msg.setBody(null);
            }
        }
View Full Code Here

            }
           
            return tuscanyMsg;

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

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

                }
               
                return os;
   
            } catch (JMSException e) {
                throw new JMSBindingException(e);
            } catch (IOException e) {
                throw new JMSBindingException(e);
            } catch (SAXException e) {
                throw new JMSBindingException(e);
            }
        } else {
            // handle the non-text fault case
            return super.extractPayloadFromJMSMessage(msg);
        }
View Full Code Here

            }

            return message;

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

                message.setText(domHelper.saveAsString((Node)((FaultException)o).getFaultInfo()));
                message.setBooleanProperty(JMSBindingConstants.FAULT_PROPERTY, true);
                return message;

            } catch (JMSException e) {
                throw new JMSBindingException(e);
            }
        } else {
            // handle the non XML fault case
            return super.createFaultMessage(session, o);
        }
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.