Hi Rupert,
It must have been filtered out.
So here it is in plain text:
Interface MessageStore
{
/**
/* Create a queue.
/*
/* throws:
/* InternalErrorException
/**
void createQueue(Queue queue) throws
InternalErrorException
/**
/* Destroy a queue.
/*
/* throws:
/* InternalErrorException
/**
void destroyQueue(Queue queue) throws
InternalErrorException
QueueDoesntExistException
/**
/* stage a message.
/*
/* throws:
/* InternalErrorException
/**
void stage(Message m) throws
InternalErrorException
/**
/* Append more data with a previously staged message.
/*
/* throws:
/* InternalErrorException
/* MessageDoesntExistException
/**
void appendContent(Message m, byte[] data) throws
InternalErrorException
MessageDoesntExistException
/**
/* load the content of previously staged or enqueued message.
/*
/* throws:
/* InternalErrorException
/* MessageDoesntExistException
/**
void loadContent(Message m) throws
InternalErrorException
MessageDoesntExistException
/**
/* destroy a previously staged message identified by msgId.
/*
/* throws:
/* InternalErrorException
/* MessageDoesntExistException
/**
void destroy(Message m) throws
InternalErrorException
MessageDoesntExistException
/**
/* Enqueue a message under the scope of the transaction branch
identified by xid when specified. Return the message identifier.
/*
/* throws:
/* InternalErrorException
/* QueueDoesntExistException
/* InvalidXidException
/**
Uid enqueue(Xid xid, Message m, Queue queue) throws
InternalErrorException
QueueDoesntExistException
InvalidXidException
/**
/* Dequeue a message under the scope of the transaction branch
identified by xid if specified.
/*
/* throws:
/* InternalErrorException
/* QueueDoesntExistException
/* InvalidXidException
/**
void dequeue(Xid xid, Message m, Queue queue) throws
InternalErrorException
QueueDoesntExistException
InvalidXidException
/*************************
/* Recovery specific methods
/*************************
/**
/* List all the persistent queues
/* Return a list of Queues
/*
/* throws:
/* InternalErrorException
/**
List getAllQueues() throws InternalErrorException
/**
/* List all enqueued messages of a given queue
/*
/* throws:
/* InternalErrorException
/* QueueDoesntExistException
/**
List getAllMessages(Queue queue) throws
InternalErrorException
QueueDoesntExistException
}
Interface TransactionManager
{
/**
/* Begin a transaction branch identified by Xid.
/*
/* throws:
/* InternalErrorException
/* InvalidXidException
/*
/* possible outcomes are:
/* xa-ok: Normal execution.
/* xa-rbrollback: The transaction branch was marked rollback-only for an
unspecified reason.
/**
int begin(Xid xid) throws
InternalErrorException
InvalidXidException
/**
/* Prepare the transaction branch identified by Xid
/*
/* throws:
/* InternalErrorException
/* CommandInvalidException
/* UnknownXidException
/* possible outcomes are:
/* xa-ok: Normal execution.
/* xa-rdonly: The transaction branch was read-only and has been committed.
/* xa-rbrollback: The transaction branch was marked rollback-only for an
unspecified reason.
/* xa-rbtimeout: The work represented by this transaction branch took
too long.
/**
int prepare(Xid xid) throws
InternalErrorException
CommandInvalidException
UnknownXidException
/**
/* rollback the transaction branch identified by Xid
/*
/* throws
/* InternalErrorException
/* CommandInvalidException
/* UnknownXidException
/*
/* possible outcomes are:
/* xa-ok: Normal execution,
/* xa-heurhaz: Due to some failure, the work done on behalf of the
specified transaction branch may have been heuristically completed.
/* xa-heurcom: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was committed.
/* xa-heurrb: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was rolled back.
/* xa-heurmix: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was partially committed and partially rolled
back.
/* xa-rbrollback: The broker marked the transaction branch rollback-only
for an unspecified reason.
/* xa-rbtimeout: The work represented by this transaction branch took
too long.
/**
int rollback(Xid xid) throws
InternalErrorException
CommandInvalidException
UnknownXidException
/**
/* Commit the transaction branch identified by Xid
/*
/* throws
/* InternalErrorException
/* CommandInvalidException
/* UnknownXidException
/* NotPreparedException
/*
/* possible outcomes are:
/* xa-ok: Normal execution,
/* xa-heurhaz: Due to some failure, the work done on behalf of the
specified transaction branch may have been heuristically completed.
/* xa-heurcom: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was committed.
/* xa-heurrb: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was rolled back.
/* xa-heurmix: Due to a heuristic decision, the work done on behalf
of the specified transaction branch was partially committed and partially rolled
back.
/* xa-rbrollback: The broker marked the transaction branch
rollback-only for an unspecified reason.
/* xa-rbtimeout: The work represented by this transaction branch took
too long.
/**
int commit(Xid xid) throws
InternalErrorException
CommandInvalidException
UnknownXidException
NotPreparedException
/**
/* One phase commit the transaction branch identified by Xid
/*
/* throws
/* InternalErrorException
/* CommandInvalidException
/* UnknownXidException
/*
/* possible outcomes are:
/* xa-ok: Normal execution,
/* xa-heurhaz: Due to some failure, the work done on behalf of the
specified transaction branch may have been heuristically completed.
/* xa-heurcom: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was committed.
/* xa-heurrb: Due to a heuristic decision, the work done on behalf of
the specified transaction branch was rolled back.
/* xa-heurmix: Due to a heuristic decision, the work done on behalf
of the specified transaction branch was partially committed and partially rolled
back.
/* xa-rbrollback: The broker marked the transaction branch
rollback-only for an unspecified reason.
/* xa-rbtimeout: The work represented by this transaction branch took
too long.
/**
int commit_one_phase(Xid xid) throws
InternalErrorException
CommandInvalidException
UnknownXidException
/**
/* Forget about the transaction branch identified by Xid
/*
/* throws
/* InternalErrorException
/* CommandInvalidException
/* UnknownXidException
/**
void forget(Xid xid) throws
InternalErrorException
CommandInvalidException
UnknownXidException
/**
/* Sets the transaction branch timeout value in seconds.
/*
/* throws
/* InternalErrorException
/* UnknownXidException
/**
void setTimeout(Xid xid, long timeout) throws
InternalErrorException
UnknownXidException
/**
/* Gets the transaction branch timeout.
/*
/* throws
/* InternalErrorException
/* UnknownXidException
/**
long getTimeout(Xid xid) throws
InternalErrorException
UnknownXidException
/**
/* Get a list of Xids the RM has prepared or heuristically completed.
/*
/* startscan: Indicates that recovery scan should start.
/* endscan: Indicates that the recovery scan should end after
returning the Xids
/*
/* throws
/* InternalErrorException
/* CommandInvalidException
/**
List recover(boolean startscan, boolean endscan) throws
InternalErrorException
CommandInvalidException
}
Interface RecoveryManager
{
/**
/* Check the status of all the transactions, rollback unprepared
transactions and replay phase 2 of the commit protocol for transactions that
are committing. Empty queues are also deleted.
/*
/* throws
/* InternalErrorException
/**
void recoverFromFailure() throws
InternalErrorException
/**
/* Periodic recovery of transactions that are not in progress.
/* throws
/* InternalErrorException
/**
void periodicRecovery() throws
InternalErrorException
}
Interface Xid
{
/**
/* Get the global transaction identifier.
/*
/**
byte[] getGlobalTransactionId()
/**
/* Obtain the transaction branch identifier part of Xidas an array of
bytes.
/*
/**
byte[] getBranchQualifier()
/**
/* Obtain the format identifier part of the Xid.
/*
/**
int getFormatId()
}
// Exceptions
InternalErrorException
CommandInvalidException
UnknownXidException
NotPreparedException
InvalidXidException
QueueDoesntExistException
MessageDoesntExistException
// Constants
Interface XAConstantes
{
// The rollback was caused by an unspecified reason.
int xa-rbrollback = 1
// A transaction branch took too long.
int xa-rbtimeout = 2
// The transaction branch may have been heuristically completed.
Int xa-heurhaz = 3
// The transaction branch has been heuristically committed.
int Xa-heurcom = 4
// The transaction branch has been heuristically rolled back.
int xa-heurrb = 5
// The transaction branch has been heuristically committed and rolled back.
int xa-heurmix = 6
// The transaction branch was read-only and has been committed.
int xa-rdonly =7
// Normal execution.
int xa-ok = 8
}
On Mon, 2007-03-26 at 12:52 +0100, Rupert Smith wrote:
> Hi Arnaud,
>
> There doesn't seem to be an attachment. Did it get filtered out by the
> mailing list?
>
> Rupert
>
> On 26/03/07, Arnaud Simon <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have attached with this email a proposal for APIs that I
> expect to use
> for dtx support. Those interfaces are the one I expect to
> implement on
> the Java broker. The C++ broker may use some slightly
> different APIs but
> they should semantically be very similar.
> Those APIs have been designed to:
> 1) make a clean distinction between transaction manager,
> recovery
> manager and persistence store.
> 2) Use whenever possible a direct mapping between dtx classes
> and
> transaction manager methods. (you'll see that exceptions
> should be
> mapped to channel close with the corresponding error code and
> results
> can be returned straight ahead)
> 3) Use an unique way of identifying transactional work by
> only
> propagating Xids all over the place. The underlying
> implementation can
> keep the mapping between its tx context representation and
> Xids.
>
> I would very much appreciate your comments.
>
> For a synchronization purpose I am going to do the following
> unless it
> clashes with somebody else's agenda:
> - on the broker:
> 1) refactor the current code for supporting the proposed
> interfaces
> 2) add dtx classes support
> 3) extend current dbd code for dtx support
> 4) add support for dtx around a file based store
> -on the client:
> 1) add dtx classes support
> 2) extend JMS implementation with XA capabilities
>
> I should start with the broker (1, 2 and 3) then with the
> client and
> finally do 4) on the broker.
>
> Regards
>
> Arnaud
>
>