I seem to be pretty unconcentrated lately, the upper part of the diff is part of the patch for external TM's that went to the proposals section. Anyway, this code is needed by that work and does not do any harm...

Oliver

[EMAIL PROTECTED] wrote:

ozeigermann    2004/09/23 03:46:56

  Modified:    src/share/org/apache/slide/common Namespace.java
  Log:
  Fixed my previous commit that made Slide bail out when the root node

  was already there. Thomas intention to remove the tx stuff at that point

  should not be undo by this.

Revision Changes Path
1.67 +20 -7 jakarta-slide/src/share/org/apache/slide/common/Namespace.java
Index: Namespace.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/Namespace.java,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Namespace.java 8 Sep 2004 04:20:23 -0000 1.66
+++ Namespace.java 23 Sep 2004 10:46:56 -0000 1.67
@@ -277,7 +277,17 @@
return transactionManager;
}
- + /**
+ * Allows for overriding the default transaction manager used by this
+ * namespace.
+ * @param transactionManager the new transaction manager
+ */
+ public void initTransactionManager(TransactionManager transactionManager) {
+ if (this.transactionManager instanceof SlideTransactionManager) {
+ this.transactionManager = transactionManager;
+ }
+ }
+
/**
* Return the current logger.
*/
@@ -778,8 +788,11 @@
Uri rootUri = getUri(slideToken, "/");
SubjectNode rootNode = new SubjectNode("/");
- rootUri.getStore().createObject(rootUri, rootNode);
-
+ try {
+ rootUri.getStore().createObject(rootUri, rootNode);
+ } catch (ObjectAlreadyExistsException e) {
+ // if it is already there, that's fine with us
+ }
getLogger().log("Init namespace " + getName() + " configuration",LOG_CHANNEL,Logger.INFO);
// Create the dummy configuration


---------------------------------------------------------------------
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]



Reply via email to