mirror of https://github.com/apache/activemq.git
This commit is contained in:
parent
b588d6cb9b
commit
8320e66b5d
|
@ -2738,7 +2738,7 @@ public class BrokerService implements Service {
|
|||
* @return the schedulerSupport
|
||||
*/
|
||||
public boolean isSchedulerSupport() {
|
||||
return this.schedulerSupport;
|
||||
return this.schedulerSupport && (isPersistent() || jobSchedulerStore != null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,10 +38,11 @@ import org.apache.activemq.broker.jmx.QueueViewMBean;
|
|||
import org.apache.activemq.filter.DestinationMapEntry;
|
||||
import org.apache.activemq.security.AuthenticationUser;
|
||||
import org.apache.activemq.security.AuthorizationEntry;
|
||||
import org.apache.activemq.security.AuthorizationMap;
|
||||
import org.apache.activemq.security.AuthorizationPlugin;
|
||||
import org.apache.activemq.security.DefaultAuthorizationMap;
|
||||
import org.apache.activemq.security.SimpleAuthenticationPlugin;
|
||||
import org.apache.activemq.security.TempDestinationAuthorizationEntry;
|
||||
import org.apache.activemq.store.kahadb.scheduler.JobSchedulerStoreImpl;
|
||||
import org.apache.activemq.transport.stomp.util.ResourceLoadingSslContext;
|
||||
import org.apache.activemq.transport.stomp.util.XStreamBrokerContext;
|
||||
import org.junit.After;
|
||||
|
@ -162,6 +163,12 @@ public class StompTestSupport {
|
|||
brokerService.setAdvisorySupport(false);
|
||||
brokerService.setSchedulerSupport(true);
|
||||
brokerService.setPopulateJMSXUserID(true);
|
||||
brokerService.setSchedulerSupport(true);
|
||||
|
||||
JobSchedulerStoreImpl jobStore = new JobSchedulerStoreImpl();
|
||||
jobStore.setDirectory(new File("activemq-data"));
|
||||
|
||||
brokerService.setJobSchedulerStore(jobStore);
|
||||
}
|
||||
|
||||
protected BrokerPlugin configureAuthentication() throws Exception {
|
||||
|
@ -222,7 +229,13 @@ public class StompTestSupport {
|
|||
entry.setAdmin("guests,users");
|
||||
authorizationEntries.add(entry);
|
||||
|
||||
AuthorizationMap authorizationMap = new DefaultAuthorizationMap(authorizationEntries);
|
||||
TempDestinationAuthorizationEntry tempEntry = new TempDestinationAuthorizationEntry();
|
||||
tempEntry.setRead("admins");
|
||||
tempEntry.setWrite("admins");
|
||||
tempEntry.setAdmin("admins");
|
||||
|
||||
DefaultAuthorizationMap authorizationMap = new DefaultAuthorizationMap(authorizationEntries);
|
||||
authorizationMap.setTempDestinationAuthorizationEntry(tempEntry);
|
||||
AuthorizationPlugin authorizationPlugin = new AuthorizationPlugin(authorizationMap);
|
||||
|
||||
return authorizationPlugin;
|
||||
|
|
Loading…
Reference in New Issue