log time to init
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1423715 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
856e7d19ba
commit
0a00f617a1
|
@ -35,6 +35,7 @@ import org.apache.archiva.redback.rbac.Resource;
|
||||||
import org.apache.archiva.redback.role.template.RoleTemplateProcessor;
|
import org.apache.archiva.redback.role.template.RoleTemplateProcessor;
|
||||||
import org.apache.archiva.redback.role.util.RoleModelUtils;
|
import org.apache.archiva.redback.role.util.RoleModelUtils;
|
||||||
import org.apache.archiva.redback.role.validator.RoleModelValidator;
|
import org.apache.archiva.redback.role.validator.RoleModelValidator;
|
||||||
|
import org.apache.commons.lang.time.StopWatch;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -57,9 +58,8 @@ import java.util.Map;
|
||||||
* RoleProfileManager:
|
* RoleProfileManager:
|
||||||
*
|
*
|
||||||
* @author: Jesse McConnell <jesse@codehaus.org>
|
* @author: Jesse McConnell <jesse@codehaus.org>
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Service( "roleManager" )
|
@Service("roleManager")
|
||||||
public class DefaultRoleManager
|
public class DefaultRoleManager
|
||||||
implements RoleManager
|
implements RoleManager
|
||||||
{
|
{
|
||||||
|
@ -81,23 +81,23 @@ public class DefaultRoleManager
|
||||||
private Map<String, ModelApplication> knownResources = new HashMap<String, ModelApplication>();
|
private Map<String, ModelApplication> knownResources = new HashMap<String, ModelApplication>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named( value = "roleModelValidator" )
|
@Named(value = "roleModelValidator")
|
||||||
private RoleModelValidator modelValidator;
|
private RoleModelValidator modelValidator;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named( value = "roleModelProcessor" )
|
@Named(value = "roleModelProcessor")
|
||||||
private RoleModelProcessor modelProcessor;
|
private RoleModelProcessor modelProcessor;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named( value = "roleTemplateProcessor" )
|
@Named(value = "roleTemplateProcessor")
|
||||||
private RoleTemplateProcessor templateProcessor;
|
private RoleTemplateProcessor templateProcessor;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Named( value = "rBACManager#cached" )
|
@Named(value = "rBACManager#cached")
|
||||||
private RBACManager rbacManager;
|
private RBACManager rbacManager;
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings("unchecked")
|
||||||
public void loadRoleModel( URL resource )
|
public void loadRoleModel( URL resource )
|
||||||
throws RoleManagerException
|
throws RoleManagerException
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ public class DefaultRoleManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings("unchecked")
|
||||||
public void loadRoleModel( RedbackRoleModel roleModel )
|
public void loadRoleModel( RedbackRoleModel roleModel )
|
||||||
throws RoleManagerException
|
throws RoleManagerException
|
||||||
{
|
{
|
||||||
|
@ -479,6 +479,10 @@ public class DefaultRoleManager
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void initialize()
|
public void initialize()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
StopWatch stopWatch = new StopWatch();
|
||||||
|
stopWatch.start();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
URL baseResource = RoleManager.class.getResource( "/META-INF/redback/redback-core.xml" );
|
URL baseResource = RoleManager.class.getResource( "/META-INF/redback/redback-core.xml" );
|
||||||
|
@ -508,6 +512,9 @@ public class DefaultRoleManager
|
||||||
{
|
{
|
||||||
throw new RuntimeException( "unable to initialize RoleManager, problem with redback.xml loading", e );
|
throw new RuntimeException( "unable to initialize RoleManager, problem with redback.xml loading", e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stopWatch.stop();
|
||||||
|
log.info( "DefaultRoleManager initialize time {}", stopWatch.getTime() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public RedbackRoleModel getModel()
|
public RedbackRoleModel getModel()
|
||||||
|
|
Loading…
Reference in New Issue