Package org.apache.qpid

Examples of org.apache.qpid.AMQStoreException


        AMQShortString name = queue.getNameShortString();
        _logger.debug("public void removeQueue(AMQShortString name = " + name + "): called");
        int results = removeConfiguredObject(queue.getId());
        if (results == 0)
        {
            throw new AMQStoreException("Queue " + name + " with id " + queue.getId() + " not found");
        }
    }
View Full Code Here


                }
            }
            catch (IOException e)
            {
                // This should never happen
                throw new AMQStoreException(e.getMessage(), e);
            }
            argumentBytes = bos.toByteArray();
        }
        return argumentBytes;
    }
View Full Code Here

            }
        }
        catch (SQLException e)
        {
            _logger.error("Failed to enqueue: " + e.getMessage(), e);
            throw new AMQStoreException("Error writing enqueued message with id " + messageId + " for queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" ) + " with id " + queue.getId()
                + " to database", e);
        }

    }
View Full Code Here



                if(results != 1)
                {
                    throw new AMQStoreException("Unable to find message with id " + messageId + " on queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
                           + " with id " + queue.getId());
                }

                if (_logger.isDebugEnabled())
                {
                    _logger.debug("Dequeuing message " + messageId + " on queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
                            + " with id " + queue.getId());
                }
            }
            finally
            {
                stmt.close();
            }
        }
        catch (SQLException e)
        {
            _logger.error("Failed to dequeue: " + e.getMessage(), e);
            throw new AMQStoreException("Error deleting enqueued message with id " + messageId + " for queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
                    + " with id " + queue.getId() + " from database", e);
        }

    }
View Full Code Here



                if(results != 1)
                {
                    throw new AMQStoreException("Unable to find message with xid");
                }
            }
            finally
            {
                stmt.close();
            }

            stmt = conn.prepareStatement(DELETE_FROM_XID_ACTIONS);
            try
            {
                stmt.setLong(1,format);
                stmt.setBytes(2,globalId);
                stmt.setBytes(3,branchId);
                int results = stmt.executeUpdate();

            }
            finally
            {
                stmt.close();
            }

        }
        catch (SQLException e)
        {
            _logger.error("Failed to dequeue: " + e.getMessage(), e);
            throw new AMQStoreException("Error deleting enqueued message with xid", e);
        }

    }
View Full Code Here

        }
        catch (SQLException e)
        {
            _logger.error("Failed to enqueue: " + e.getMessage(), e);
            throw new AMQStoreException("Error writing xid ", e);
        }

    }
View Full Code Here

            conn.close();
        }
        catch (SQLException e)
        {
            throw new AMQStoreException("Error commit tx: " + e.getMessage(), e);
        }
        finally
        {

        }
View Full Code Here

    public void abortTran(ConnectionWrapper connWrapper) throws AMQStoreException
    {
        if (connWrapper == null)
        {
            throw new AMQStoreException("Fatal internal error: transactional context is empty at abortTran");
        }

        if (_logger.isDebugEnabled())
        {
            _logger.debug("abort tran called: " + connWrapper.getConnection());
        }

        try
        {
            Connection conn = connWrapper.getConnection();
            conn.rollback();
            conn.close();
        }
        catch (SQLException e)
        {
            throw new AMQStoreException("Error aborting transaction: " + e.getMessage(), e);
        }

    }
View Full Code Here

                    conn.close();
                }
            }
            catch (SQLException e)
            {
                throw new AMQStoreException("Error inserting of configured object " + configuredObject + " into database: " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

                conn.close();
            }
        }
        catch (SQLException e)
        {
            throw new AMQStoreException("Error deleting of configured object with id " + id + " from database: " + e.getMessage(), e);
        }
        return results;
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.AMQStoreException

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.