Hi Jonathan,
On Fri, Jun 22, 2012 at 12:20 PM, Jonathan Halliday <
jonathan.halliday_at_redhat.com> wrote:
>
> On 06/22/2012 09:32 AM, Christian Romberg wrote:
>
>>
>>
>> I understand your concerns, however I have a different view on those
>> additional bytes, I think the transaction log should be as
>> self-contained as possible and
>> an additional 20-40 byte per transaction don't harm IMO.
>>
>
> I'm not sure where you're getting the 20-40 bytes size from.
>
this is an estimate of all the information we would need to bootstrap our
resource manager
to be able to provide an XAResource for recovery:
4-8 byte magic number, to know, that it is our data, 2 byte version
information, 20-30 ASCII-7 characters for the database URL
Assuming a registry of resource managers, there is no need for any class
information.
Also this information is static and the same for all XAResource instances
for a particular database, so it's calculated once and reused.
On a second thought, this even allows to compress the data to a single byte
only:
The TransactionManager could maintain a map of local 1-byte identifiers to
recovery infos in the head of it's log file like this.
HEAD
--------
....
1 -> byte[] (from e.g. us for database "versant:db1_at_machine")
2 -> byte[] (from e.g. Oracle to database so-and-so ...)
.....
DYNAMIC PART
------------------------
any record here might have one additional byte, which meaning is resolved
via the log file header information
> byte[] logIdentity = logfile.getTxRecord().**getJNDIName();
>
>
But we don't have a real JNDI name, of course we could provide some opaque
identifier for the logfile,
but I think we should avoid the term JNDI here.
Note, that we (i.e. the Versant JPA implementation) enlist our XAResource
instances directly with the Transaction, because
we are not using a JDBC pool (or any JCA based pool), so there is no JNDI
name for our XAResource currently.
For the time being we will make our XAResource serializable, AFAIK JBoss
supports serializable XAResources.
Regards,
Christian
--
Christian Romberg
Chief Engineer | Versant GmbH
(T) +49 40 60990-0
(F) +49 40 60990-113
(E) cromberg_at_versant.com
www.versant.com<http://www.google.com/url?q=http%3A%2F%2Fwww.versant.com%2F&sa=D&sntz=1&usg=AFrqEzeeEBc_gN_8mxtt8xDB0tjXDXQVlw>|
www.db4o.com<http://www.google.com/url?q=http%3A%2F%2Fwww.db4o.com%2F&sa=D&sntz=1&usg=AFrqEzdo3Q40RwKQPBtnPIuBYQd1diFxJQ>
--
Versant
GmbH is incorporated in Germany. Company registration number: HRB
54723, Amtsgericht Hamburg. Registered Office: Halenreie 42, 22359
Hamburg, Germany. Geschäftsführer: Bernhard Wöbker, Volker John
CONFIDENTIALITY
NOTICE: This e-mail message, including any attachments, is for the sole
use of the intended recipient(s) and may contain confidential or
proprietary information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
immediately contact the sender by reply e-mail and destroy all copies of
the original message.