The correct URL is:
I have tried the url you suggested me:
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(username, password, "discovery:(fabric://default)");
When this line is executed then I receive an exception:
This class belongs to the activemq client jar. And the mq-client profile has been added.
Additionaly I have another question. It is required for creating the ActiveMQConnectionFactory the credentials username/password. Could it be deactivated? I say this because right now the username/password is stored into a properties file, but as the profiles are common for different container instances it has no sense to maintain a common username/password.
Can you tell more about what you have otherwise customized as there is some overlord in the stacktrace. And it may be that overlord is not OSGi friendly causing that problem.
This error dissapeared. No worries about this.