Skip to content

Commit

Permalink
set security on acceptor on start
Browse files Browse the repository at this point in the history
  • Loading branch information
andytaylor committed Nov 16, 2012
1 parent 55f6e60 commit ee9676b
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -104,6 +104,8 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle

private final Map<ProtocolType, ProtocolManager> protocolMap = new ConcurrentHashMap<ProtocolType, ProtocolManager>();

private HornetQPrincipal defaultInvmSecurityPrincipal;

// Static --------------------------------------------------------

// Constructors --------------------------------------------------
Expand Down Expand Up @@ -228,6 +230,11 @@ public ClassLoader run()
threadPool,
scheduledThreadPool);

if(defaultInvmSecurityPrincipal != null && acceptor.isUnsecurable())
{
acceptor.setDefaultHornetQPrincipal(defaultInvmSecurityPrincipal);
}

acceptors.add(acceptor);

if (managementService != null)
Expand Down Expand Up @@ -258,6 +265,7 @@ public ClassLoader run()

public synchronized void allowInvmSecurityOverride(HornetQPrincipal principal)
{
defaultInvmSecurityPrincipal = principal;
for (Acceptor acceptor : acceptors)
{
if(acceptor.isUnsecurable())
Expand Down

0 comments on commit ee9676b

Please sign in to comment.