activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ali Sadik Kumlali <>
Subject How can I enable principle and credentials for embedded broker?
Date Wed, 13 Dec 2006 12:44:08 GMT
Hi folks,

I've been walking through the documentation, mailing list and Google for a while but couldn't
get a solution to my problem.

I need to;
1) Use embedded broker
2) Access initial context by providing username(SECURITY_PRINCIPAL) and password(SECURITY__CREDENTIALS)
3) Create connections by providing username and password
For standalone case, I managed to do 3) by following the instructions[1]. But couldn't find
a way for 2) either.

Here is the code snippet:

// Server initialization
BrokerService broker = new BrokerService();

// Client initialization
Properties props = new Properties();
props.setProperty(Context.SECURITY_PRINCIPAL, "contextUser");
props.setProperty(Context.SECURITY__CREDENTIALS, "contextPassword");

Context jndiContext = new InitialContext(props);
Connection connection = connectionFactory.createConnection("connUser", "connPassword");

Now, how can I configure embedded broker to make it require contextUser, contextPassword,
connUser and connPassword?

Any help would be appreciated.


Ali Sadik Kumlali


Any questions? Get answers on any topic at  Try it now.

View raw message