]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/internal/kernel/Kernel.java
Allow unknown principals in Jackrabbit.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / Kernel.java
index 6246a1b1b7f9cafb1070878656564ce5fb3cbda4..08dad56b803c28bedf147e9e055ffa214e247e21 100644 (file)
@@ -84,14 +84,6 @@ final class Kernel implements ServiceListener {
                try {
                        // Transaction
                        transactionManager = new SimpleTransactionManager();
-                       bundleContext.registerService(TransactionManager.class,
-                                       transactionManager, null);
-                       bundleContext.registerService(UserTransaction.class,
-                                       transactionManager, null);
-                       bundleContext.registerService(
-                                       TransactionSynchronizationRegistry.class,
-                                       transactionManager.getTransactionSynchronizationRegistry(),
-                                       null);
 
                        // Jackrabbit node
                        node = new JackrabbitNode(bundleContext);
@@ -100,14 +92,12 @@ final class Kernel implements ServiceListener {
                        repositoryFactory = new OsgiJackrabbitRepositoryFactory();
 
                        // Authentication
-                       nodeSecurity.getUserAdmin().setSyncRegistry(
-                                       transactionManager.getTransactionSynchronizationRegistry());
                        nodeSecurity.getUserAdmin().setTransactionManager(
                                        transactionManager);
 
                        // Equinox dependency
                        ExtendedHttpService httpService = waitForHttpService();
-                       nodeHttp = new NodeHttp(httpService, node, nodeSecurity);
+                       nodeHttp = new NodeHttp(httpService, node);
 
                        // Kernel thread
                        kernelThread = new KernelThread(this);
@@ -115,6 +105,14 @@ final class Kernel implements ServiceListener {
                        kernelThread.start();
 
                        // Publish services to OSGi
+                       bundleContext.registerService(TransactionManager.class,
+                                       transactionManager, null);
+                       bundleContext.registerService(UserTransaction.class,
+                                       transactionManager, null);
+                       bundleContext.registerService(
+                                       TransactionSynchronizationRegistry.class,
+                                       transactionManager.getTransactionSynchronizationRegistry(),
+                                       null);
                        nodeSecurity.publish();
                        node.publish(repositoryFactory);
                        bundleContext.registerService(RepositoryFactory.class,