Esempio n. 1
0
 public QueueManager getQueueManager() {
   QueueManager queueManager =
       (QueueManager) registryBroker.lookupObject(MuleProperties.OBJECT_QUEUE_MANAGER);
   if (queueManager == null) {
     Collection temp = registryBroker.lookupObjects(QueueManager.class);
     if (temp.size() > 0) {
       queueManager = ((QueueManager) temp.iterator().next());
     }
   }
   return queueManager;
 }
Esempio n. 2
0
 /**
  * Gets the security manager used by this Mule instance to authenticate and authorise incoming and
  * outgoing event traffic and service invocations
  *
  * @return he security manager used by this Mule instance to authenticate and authorise incoming
  *     and outgoing event traffic and service invocations
  */
 public SecurityManager getSecurityManager() {
   SecurityManager securityManager =
       (SecurityManager) registryBroker.lookupObject(MuleProperties.OBJECT_SECURITY_MANAGER);
   if (securityManager == null) {
     Collection temp = registryBroker.lookupObjects(SecurityManager.class);
     if (temp.size() > 0) {
       securityManager = ((SecurityManager) temp.iterator().next());
     }
   }
   return securityManager;
 }
Esempio n. 3
0
 /**
  * Returns the Jta transaction manager used by this Mule server instance. or null if a transaction
  * manager has not been set
  *
  * @return the Jta transaction manager used by this Mule server instance. or null if a transaction
  *     manager has not been set
  */
 public TransactionManager getTransactionManager() {
   TransactionManager transactionManager =
       (TransactionManager) registryBroker.lookupObject(MuleProperties.OBJECT_TRANSACTION_MANAGER);
   if (transactionManager == null) {
     Collection temp = registryBroker.lookupObjects(TransactionManagerFactory.class);
     if (temp.size() > 0) {
       try {
         transactionManager = (((TransactionManagerFactory) temp.iterator().next()).create());
       } catch (Exception e) {
         throw new MuleRuntimeException(CoreMessages.failedToCreate("transaction manager"), e);
       }
     } else {
       temp = registryBroker.lookupObjects(TransactionManager.class);
       if (temp.size() > 0) {
         transactionManager = (((TransactionManager) temp.iterator().next()));
       }
     }
   }
   return transactionManager;
 }