1. A computer-implemented method for extending a database transaction to include at least one user-defined operation that accesses a computer resource by means of an XA Transaction Protocol, said method comprising: registering said user-defined operation with said database; executing said database transaction; enabling said database to operate as an XA Transaction Manager by means of said XA Transaction Protocol; accessing a resource manager by said database operating as said XA Transaction Manager; invoking said user-defined operation as part of said database transaction; recording with said database that said user-defined operation has been invoked; executing said invoked and recorded user-defined operation while executing said database transaction; and accessing said computer resource by said resource manager, thereby extending said database transaction.