commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject [transaction] XAResource wrapper for commons transaction
Date Thu, 03 Nov 2005 11:16:01 GMT
Hello,

I now implement the XAResource wrapper for commons transaction and came across
two issues:

1. Commons transaction is not prepared for JNDI. This is probably not a must,
but most of the containers seem to work with JNDI. When trying it that way I get
the following exception:

java.lang.IllegalArgumentException: RegistryContext: object to bind must be
Remote, Reference, or Referenceable
  at com.sun.jndi.rmi.registry.RegistryContext.encodeObject
      (RegistryContext.java:403)
  at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:131)
  at javax.naming.InitialContext.rebind(InitialContext.java:367)
  ...
  at com.rauser_ag.transaction.file.XAFileResourceTestCase.setUp
      (XAFileResourceTestCase.java:65)

Any opinion about this?

2. Using the transaction id for the name of the temporary directory is not very
reliable:

2005-11-03 12:11:47,293 FileResourceManager ERROR - Saving status information to
'build/tmp/bb14:38:40:0177cdf01a0acfa3a8...a42401:0177cdf01a0acfa3a8f38...000000
/transaction.log' failed! Could not create file
java.io.FileNotFoundException: build\tmp\bb14:38:40:0177cdf01a0acfa3a8...a42401:
0177cdf01a0acfa3a8f38...000000\transaction.log (Die Syntax für den Dateinamen,
Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch)
  at java.io.FileOutputStream.open(Native Method)
  at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
  at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
  at org.apache.commons.transaction.file.FileResourceManager
       $TransactionContext.saveState(FileResourceManager.java:1447)
  at org.apache.commons.transaction.file.FileResourceManager
       $TransactionContext.init(FileResourceManager.java:1342)
  at org.apache.commons.transaction.file.FileResourceManager.startTransaction
      (FileResourceManager.java:515)
  at com.rauser_ag.transaction.file.XAFileTransactionalResource.begin
      (XAFileTransactionalResource.java:28)
  at org.apache.commons.transaction.util.xa.AbstractXAResource.start
      (AbstractXAResource.java:186)
  at org.objectweb.jotm.TransactionImpl.enlistResource(TransactionImpl.java:432)
  at com.rauser_ag.transaction.file.XAFileResourceTestCase.testCreateCommit
      (XAFileResourceTestCase.java:93)

In this case it is the Xid I have no influence on. But even without XA stuff you
can run into this issue as you allow an arbitrary Object as id.

Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message