Oliver Zeigermann wrote:
Ah, I see. This really sounds like a good idea. Is there anything you
could contribute to get this started in Slide?
A little bit of our current implementation that uses simple maps and does
a bit for transactions around it.
I could clean this up, let it use one of your transactional maps (may be
configurable which of them) and put it all to a new package
org.apache.slide.store.mem.
Shall I do that?
Stefan
Oliver
Stefan L�tzkendorf wrote:
Hi,
we use such stores as utilities in the namespace configuration.
e.g.
We use a transient store as root of the namespace. So we have different
stores (TXFiles, XMLFiles in our own store, ...) and
(1) none of theses stores has to maintain the other as child
(2) automatically created users and the actions are transient
(3) permissions set in the Domain.xml will have effect after next restart
A TransientLockStore we use in connection with our read only
principal and groups. A TransientSecurityStore we use as a dummy in this
case too. With the JNDIPrincipalStore this may be usefull too.
Stefan
Oliver Zeigermann wrote:
Hi Stefan!
This is nothing I have on my TODO list. What are those stores good for?
Oliver
Stefan L�tzkendorf wrote:
Hello Oliver,
at our company we are using TransientNodeStore, TransientLockStore, ...
Something like the former MemoryStore with a bit of transaction
support.
But with your new transaction package it should be not to hard to
reimplement
this with better transaction support and add this to slide's store
repertoire.
Am I right that this is still a TODO and not always in your pipeline?
Regards, Stefan
[EMAIL PROTECTED] wrote:
ozeigermann 2004/07/19 04:02:03
Modified: src/share/org/apache/slide/common
AbstractXAServiceBase.java
XAServiceBase.java
src/share/org/apache/slide/util/logger TxLogger.java
src/stores/org/apache/slide/store/impl/rdbms
J2EEStore.java
JDBCStore.java AbstractRDBMSStore.java
Added: webdavclient/lib commons-transaction-20040719.jar
lib commons-transaction-20040719.jar
Removed: src/share/org/apache/slide/util/logger
LoggerFacade.java
webdavclient/lib commons-transaction-0.1pre.jar
src/share/org/apache/slide/transaction
AbstractXAResource.java
TransactionalResource.java
Log:
Step #1 to migrate Slide's tx classes to commons transaction
Revision Changes Path
1.2 +6 -6
jakarta-slide/src/share/org/apache/slide/common/AbstractXAServiceBase.java
Index: AbstractXAServiceBase.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/AbstractXAServiceBase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractXAServiceBase.java 1 Jul 2004 12:59:10 -0000 1.1
+++ AbstractXAServiceBase.java 19 Jul 2004 11:02:02 -0000 1.2
@@ -25,10 +25,10 @@
import java.util.Hashtable;
+import org.apache.commons.transaction.util.LoggerFacade;
import org.apache.slide.authenticate.CredentialsToken;
-import org.apache.slide.transaction.AbstractXAResource;
+import org.apache.commons.transaction.util.xa.AbstractXAResource;
import org.apache.slide.util.logger.Logger;
-import org.apache.slide.util.logger.LoggerFacade;
import org.apache.slide.util.logger.TxLogger;
/**
1.2 +11 -6
jakarta-slide/src/share/org/apache/slide/common/XAServiceBase.java
Index: XAServiceBase.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/common/XAServiceBase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XAServiceBase.java 1 Jul 2004 12:59:10 -0000 1.1
+++ XAServiceBase.java 19 Jul 2004 11:02:02 -0000 1.2
@@ -29,7 +29,7 @@
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
-import org.apache.slide.transaction.TransactionalResource;
+import
org.apache.commons.transaction.util.xa.TransactionalResource;
/**
* Slide Service dummy implementation.
@@ -80,7 +80,11 @@
return new DummyTxResource(xid);
}
- protected class DummyTxResource implements
TransactionalResource {
+ protected boolean includeBranchInXid() {
+ return false;
+ }
+
+ protected class DummyTxResource implements
TransactionalResource {
Xid xid;
int status;
@@ -116,4 +120,5 @@
return xid;
}
}
+
}
1.2 +6 -4
jakarta-slide/src/share/org/apache/slide/util/logger/TxLogger.java
Index: TxLogger.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/util/logger/TxLogger.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TxLogger.java 1 Jul 2004 12:54:34 -0000 1.1
+++ TxLogger.java 19 Jul 2004 11:02:02 -0000 1.2
@@ -23,6 +23,8 @@
package org.apache.slide.util.logger;
+import org.apache.commons.transaction.util.LoggerFacade;
+
/**
* Default logger implementation. Uses java.util.logging
implementation provided
* by Java 1.4.
1.1
jakarta-slide/webdavclient/lib/commons-transaction-20040719.jar
<<Binary file>>
1.13 +8 -4
jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/J2EEStore.java
Index: J2EEStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/J2EEStore.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- J2EEStore.java 22 Jun 2004 17:40:37 -0000 1.12
+++ J2EEStore.java 19 Jul 2004 11:02:02 -0000 1.13
@@ -161,4 +161,8 @@
con.setAutoCommit(false);
return con;
}
+
+ protected boolean includeBranchInXid() {
+ return false;
+ }
}
1.21 +7 -4
jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/JDBCStore.java
Index: JDBCStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/JDBCStore.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- JDBCStore.java 11 Feb 2004 11:30:21 -0000 1.20
+++ JDBCStore.java 19 Jul 2004 11:02:02 -0000 1.21
@@ -345,4 +345,7 @@
return connection;
}
+ protected boolean includeBranchInXid() {
+ return false;
+ }
}
1.7 +5 -5
jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/AbstractRDBMSStore.java
Index: AbstractRDBMSStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/AbstractRDBMSStore.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractRDBMSStore.java 5 Jul 2004 10:55:21 -0000 1.6
+++ AbstractRDBMSStore.java 19 Jul 2004 11:02:03 -0000 1.7
@@ -33,6 +33,7 @@
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
+import
org.apache.commons.transaction.util.xa.TransactionalResource;
import org.apache.slide.common.AbstractXAService;
import org.apache.slide.common.AbstractXAServiceBase;
import org.apache.slide.common.Scope;
@@ -69,7 +70,6 @@
import org.apache.slide.structure.ObjectAlreadyExistsException;
import org.apache.slide.structure.ObjectNode;
import org.apache.slide.structure.ObjectNotFoundException;
-import org.apache.slide.transaction.TransactionalResource;
import org.apache.slide.util.logger.Logger;
/**
1.1
jakarta-slide/lib/commons-transaction-20040719.jar
<<Binary file>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]