Nitin Verma Nverma

Greenhorn
+ Follow
since Jun 06, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nitin Verma Nverma

Hello,

If you wish to combine more than one resources inside a single transaction, you will have to use XA/JTA transactions. Though databases support both normal and XA transactions, but since filesystems do not support transactions (none of normal and XA transactions), you can rely on XADisk which exposes APIs for file/directory operations to enable transactions (both normal and XA) over filesystems.

Hope that helps.

Thanks,
Nitin
Please Note: Regarding my earlier replies, there are a few corrections.

First, please ignore the link to the binary (.rar) file and refer to the project page for new download links.
(Also ignore the link to the User Guide and refer to the project page for all updated information)

Second, there was a change in the package/class name for the connection factory classes. So, the one I mentioned earlier "Connection Definition (org.xadisk.connector.ConnectionFactory)", will not
work. Please refer to the user guide for updated information.

Sorry for the confusion.

Thanks,
Nitin
9 years ago
Correction... <Please refer to my reply below>.
9 years ago
Hi Jay,
Out of my curiosity, I too deployed XADisk.rar on JBoss 5.1.0/Java5. The deployment revealed a few changes in ra.xml, which were not caught by Glassfish (Glassfish didn't complain those things). Then, it goes good and I also wrote a simple test-case (managed application) to give a sanity check with JBoss.

I have now uploaded the modified .rar, which you can download and deploy on to GlassFish, JBoss (and any other J2EE server) : Updated XADisk.rar

Now, about your question on connection-factory, I have used the Admin Console (/admin-console) to create a connection-factory for XADisk. It works fine. The links I followed were -
admin-console --> Resources --> Connection Factories --> Tx ConnectionFactories --> Add a new Resource --> Select Resource Template (XA Connection Factory) --> from here, you only need to give these details:
JNDI Name (eg "xadiskcf"), RAR Name ("XADisk.rar" if you haven't renamed after downloading), Connection Definition (org.xadisk.connector.ConnectionFactory). I haven't altered/set other options; so may not comment on them.

Once connection factory gets created, the following sample code in my servlet goes successfully:



On your other question. Yes, in the guide, "jca/xadiskcf" was used to refer to such a connection-factory only.

I hope that should help. Let me know if there are any queries.

Thanks,
Nitin.
9 years ago
Hi Jay,
Sorry, but I haven't worked on JBoss much; I had tested XADisk on Glassfish (and its admin console facilitates creation of connection factories). Probably, you can refer to JBoss documentation on creating connection factories in JBoss; the same approach will apply to all JCA resource adapters including XADisk. In the meantime, I would also remain interested in deploying XADisk onto JBoss.

Thanks,
Nitin.
9 years ago
Hi Jay,
If I rightly understand the requirement you posted, it must be possible to achieve it with XADisk. In brief, the transaction manager (TM) will need to enlist all the involved resources (multiple databases: [db1, db2, db3]...and the local file-system: [wrapped by xadisk]) with the "global/xa" transaction, and as the TM will pass through its 2PC phases, the involved resources (db1, db2, db3..., xadisk) will fulfill their xa responsibility.

Please refer to the User Guide. The User Guide is a work in progress, so please feel free to ask questions in the XADisk Usage Forum if you have any issues using XADisk, or contact the Project Owner(s).

Thanks,
Nitin (on behalf - https://xadisk.dev.java.net).
9 years ago