> If you can get the above test case working using other TMs together
> with Neo4j would be great!

OK, it took some time, since I messed with some things for the first time.
I have created the following:
- I have added two classes in the kernel module that provide support
for registration
of TransactionManager implementations as services. Like the lucene
indexer, if the jar
is in the classpath it will be picked up and made available. The configuration
passed to the GraphDatabase must define the name of the TxManager to
use, defaulting
of course to the native one. These changes required some modifications
in TxManager, ReadOnlyTxManager,
TxModule, EmbeddedGraphDbImpl and Config.
- A sample implementation of the above for providing a JOTM instance as a
TransactionManager.
- A test "platform" that, through JDI crashes the system at specific points,
up to a resolution of line of code. This way at any point in the transaction
the system can be brought down in flames. This aspect is still a
little awkward to
integrate since a new JVM process must be started and terminated. At the time
being I use it as a standalone test (launched at the console).

Using the above, after crashing a neo instance that uses a lucene
XaResource and (of course)
a Neo XaResource at any point during commit or rollback, using JOTM
2.1.9, restating the system brings it in
a consistent state, committing all pending resources or rolling back,
whatever is needed.
There are many test cases still to be implemented to
make sure that the setup is production ready but what I have tested so
far passes. This includes
of course the stock tests for the kernel component, ensuring (to
whatever possible extent) that my
changes do not mess up with normal operations.

>> - Find the least intrusive way of making neo fit in the picture, in
>> terms of configuration/code changes etc, approve and commit those.

See above.

What I would like as feedback is ways the community would integrate
these capabilities in their
environment. This way I can provide integration methods that will make
the procedure less risky
and more transparent, as well as develop test cases that do not at the
moment occur to me.

As this feature requires changes in the neo kernel, I am still
searching for the best way to make
the code available. I will inform you when that changes, hopefully soon.
Also, if there is interest, I could write an article on how this is implemented.

What I will test next is how this thing plays with JDBC, seeing as
this would be a common case. Also,
I have read up on JCA and there is some preliminary code to produce a
.rar archive that will provide neo
functionality within a container, although this still very premature.

Thank you for your time,

CG
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to