You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by oz...@apache.org on 2004/05/10 11:48:41 UTC
cvs commit: jakarta-slide/src/stores/org/apache/slide/store/txfile TxXMLFileDescriptorsStore.java
ozeigermann 2004/05/10 02:48:41
Modified: src/stores/org/apache/slide/store/txfile
TxXMLFileDescriptorsStore.java
Log:
Fixed bug that showed up when an internal error was thrown.
Bug was introduced with the speedup modification
Revision Changes Path
1.13 +15 -5 jakarta-slide/src/stores/org/apache/slide/store/txfile/TxXMLFileDescriptorsStore.java
Index: TxXMLFileDescriptorsStore.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/TxXMLFileDescriptorsStore.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TxXMLFileDescriptorsStore.java 10 May 2004 08:23:26 -0000 1.12
+++ TxXMLFileDescriptorsStore.java 10 May 2004 09:48:41 -0000 1.13
@@ -386,7 +386,7 @@
try {
if (deferSaving) {
// save all descriptors registered for saving
- TxContext txContext = (TxContext) getActiveTxId();
+ TxContext txContext = getActiveTxContext();
// really should not, but only to be sure...
if (txContext != null) {
try {
@@ -488,7 +488,7 @@
*/
protected XMLResourceDescriptor getFileDescriptor(Uri uri) throws ServiceAccessException, ObjectNotFoundException {
try {
- TxContext txContext = (TxContext) getActiveTxId();
+ TxContext txContext = getActiveTxContext();
XMLResourceDescriptor xfd;
if (txContext != null) {
xfd = txContext.lookup(uri);
@@ -511,6 +511,16 @@
}
}
+ protected TxContext getActiveTxContext() {
+ TxContext context = (TxContext)activeTransactionBranch.get();
+ return context;
+ }
+
+ protected Object getActiveTxId() {
+ TxContext context = (TxContext) activeTransactionBranch.get();
+ return (context == null ? null : context.xid);
+ }
+
private static class TxContext {
public Xid xid;
public Map descriptors = new HashMap();
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org