brokerService.setPersistent(isPersistent());
brokerService.setAdvisorySupport(false);
brokerService.setSchedulerSupport(isSchedulerSupportEnabled());
brokerService.setPopulateJMSXUserID(true);
final CompositeTopic compositeTopic = new CompositeTopic();
compositeTopic.setName(COMPOSITE_TOPIC);
final ArrayList<ActiveMQDestination> forwardDestinations = new ArrayList<ActiveMQDestination>();
forwardDestinations.add(new ActiveMQQueue(FORWARD_QUEUE));
forwardDestinations.add(new ActiveMQTopic(FORWARD_TOPIC));
compositeTopic.setForwardTo(forwardDestinations);
// NOTE: allows retained messages to be set on the Composite
compositeTopic.setForwardOnly(false);
final VirtualDestinationInterceptor destinationInterceptor = new VirtualDestinationInterceptor();
destinationInterceptor.setVirtualDestinations(new VirtualDestination[] {compositeTopic} );
brokerService.setDestinationInterceptors(new DestinationInterceptor[] { destinationInterceptor });
}