本文整理了Java中org.gatein.common.logging.Logger.trace()
方法的一些代码示例,展示了Logger.trace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.trace()
方法的具体详情如下:
包路径:org.gatein.common.logging.Logger
类名称:Logger
方法名:trace
暂无
代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common
public final void closeContext(boolean save)
{
log.trace("Requesting for context close with save=" + save + " going to look for any context");
AbstractContext context = (AbstractContext)getContext(true);
//
if (context == null)
{
String msg = "Cannot close non existing context";
log.trace(msg);
throw new IllegalStateException(msg);
}
//
context.close(save);
}
代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common
final SessionContext openSynchronizedContext()
{
log.trace("Opening a global context");
AbstractContext context = (AbstractContext)getContext(true);
//
if (context != null)
{
String msg = "A global context is already opened";
log.trace(msg);
throw new IllegalStateException(msg);
}
// Attempt to get the synchronization
log.trace("Ok, no global context found, asking current synchronization");
Synchronization sync = manager.getSynchronization();
//
if (sync == null)
{
String msg = "Need global synchronization for opening a global context";
log.trace(msg);
throw new IllegalStateException(msg);
}
//
log.trace("Opening a global context for the related sync");
return sync.openContext(this);
}
代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common
log.trace("Requesting context");
Synchronization sync = manager.getSynchronization();
log.trace("Found synchronization about to get the current context for chromattic " + domainName);
SynchronizedContext context = sync.getContext(domainName);
log.trace("No current context found, about to open one");
context = sync.openContext(this);
log.trace("Found a context and will return it");
log.trace("No active synchronization about to try the current local context");
LocalContext localContext = currentContext.get();
log.trace("Found local context " + localContext);
代码示例来源:origin: org.gatein.sso/sso-agent
/**
* Obtain ID of partnerApp from configuration of given jossoAgent and from contextPath of given servlet request
*
* @param jossoAgent
* @param hreq
* @return partnerApp
*/
public static String getPartnerAppId(AbstractSSOAgent jossoAgent, HttpServletRequest hreq)
{
String requester = null;
// Try to obtain requester from ID of partnerApp
SSOPartnerAppConfig partnerAppConfig = jossoAgent.getPartnerAppConfig(hreq.getServerName(), hreq.getContextPath());
if (partnerAppConfig != null)
{
requester = partnerAppConfig.getId();
}
// Fallback to contextPath if previous failed
if (requester == null)
{
requester = hreq.getContextPath().substring(1);
}
if (log.isTraceEnabled())
{
log.trace("Using partnerAppId " + requester);
}
return requester;
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Store PLIDM root group
*
* @param ns
* @param rootGroup
*/
void putRootGroup(String ns, Group rootGroup) {
Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
Node ioNode = addNode(nodeFqn);
if (ioNode != null) {
ioNode.put(NODE_OBJECT_KEY, rootGroup);
if (log.isTraceEnabled()) {
log.trace(this.toString() + "GateIn root group stored in cache" + ";namespace=" + ns);
}
}
}
代码示例来源:origin: org.gatein.sso/sso-agent
log.trace("Found SamlCredential inside Subject: " + samlCredential);
log.trace("SecurityClient successfully updated with SAMLCredential");
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Retrieve PLIDM root group
*
* @param ns
* @return
*/
Group getRootGroup(String ns) {
Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
Node node = getNode(nodeFqn);
if (node != null) {
Group rootGroup = (Group) node.get(NODE_OBJECT_KEY);
if (log.isTraceEnabled() && rootGroup != null) {
log.trace(this.toString() + "GateIn root group found in cache" + ";namespace=" + ns);
}
return rootGroup;
}
return null;
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Store gatein group id
*
* @param ns
* @param pLIDMId
* @param id
*/
void putGtnGroupId(String ns, String pLIDMId, String id) {
Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
Node ioNode = addNode(nodeFqn);
if (ioNode != null) {
ioNode.put(NODE_OBJECT_KEY, id);
if (log.isTraceEnabled()) {
log.trace(this.toString() + "GateIn group id cached. PLIDM group id: " + pLIDMId + "GateIn group id: " + id
+ ";namespace=" + ns);
}
}
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Retrieve gatein group id
*
* @param ns
* @param pLIDMId
* @return
*/
String getGtnGroupId(String ns, String pLIDMId) {
Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
Node node = getNode(nodeFqn);
if (node != null) {
String id = (String) node.get(NODE_OBJECT_KEY);
if (log.isTraceEnabled() && id != null) {
log.trace(this.toString() + "GateIn group id found in cache. PLIDM group id: " + pLIDMId + "GateIn group id: "
+ id + ";namespace=" + ns);
}
return id;
}
return null;
}
代码示例来源:origin: org.gatein.sso/sso-agent
@Override
public void invoke(Request request, Response response) throws IOException, ServletException
{
ServletAccess.setRequestAndResponse(request, response);
if (log.isTraceEnabled())
{
log.trace("Current HttpServletRequest and HttpServletResponse added to ThreadLocal.");
}
try
{
getNext().invoke(request, response);
}
finally
{
ServletAccess.resetRequestAndResponse();
if (log.isTraceEnabled())
{
log.trace("Cleaning ThreadLocal");
}
}
}
代码示例来源:origin: org.gatein.sso/sso-agent
private SamlCredential getSamlCredential()
{
Subject subj = getCurrentSubject();
if (log.isTraceEnabled())
{
log.trace("Found subject " + subj);
}
if (subj == null)
{
return null;
}
Set<Object> credentials = subj.getPublicCredentials();
for (Object credential : credentials)
{
if (credential instanceof SamlCredential)
{
return (SamlCredential)credential;
}
}
return null;
}
代码示例来源:origin: org.gatein.sso/sso-agent
/**
* Performs portal logout by calling WCI logout.
*
* @param request
* @param response
*/
protected void portalLogout(HttpServletRequest request, HttpServletResponse response)
{
// Workaround: we need to temporary "restore" session to enforce crossContext logout at WCI layer
request.getSession(true);
try
{
ServletContainerFactory.getServletContainer().logout(request, response);
}
catch (Exception e)
{
String message = "Session has been invalidated but WCI logout failed.";
log.warn(message);
if (log.isTraceEnabled())
{
log.trace(message, e);
}
}
}
代码示例来源:origin: org.gatein.pc/pc-controller
if (consumerPortletInfo == null)
log.trace("Cannot deliver event " + toConsumeEvent +" because the consumer of the event does not have a portlet info");
safeInvoker.eventDiscarded(context.getEventControllerContext(), this, toConsumeEvent, EventControllerContext.EVENT_CONSUMER_INFO_NOT_AVAILABLE);
continue;
log.trace("Cannot deliver event " + toConsumeEvent +" because the consumer of the event does not accept the event name");
safeInvoker.eventDiscarded(context.getEventControllerContext(), this, toConsumeEvent, EventControllerContext.PORTLET_DOES_NOT_CONSUME_EVENT);
continue;
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Store IDMUserListAccess
*
* @param ns
* @param query
* @param list
*/
void putGtnUserLazyPageList(String ns, Query query, IDMUserListAccess list, UserStatus userStatus) {
Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
Node ioNode = addNode(nodeFqn);
if (ioNode != null) {
ioNode.put(NODE_OBJECT_KEY, list);
if (log.isTraceEnabled()) {
log.trace(this.toString() + "GateIn user query list cached. Query: " + getQueryKey(query, userStatus) + ";namespace=" + ns);
}
}
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.management
log.trace(e.getMessage(), e);
log.trace(e.getMessage(), e);
log.trace(e.getMessage(), e);
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Retrieve IDMUserListAccess
*
* @param ns
* @param query
* @return LazyPageList
*/
IDMUserListAccess getGtnUserLazyPageList(String ns, Query query, UserStatus userStatus) {
Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
Node node = getNode(nodeFqn);
if (node != null) {
IDMUserListAccess list = (IDMUserListAccess) node.get(NODE_OBJECT_KEY);
if (log.isTraceEnabled() && list != null) {
log.trace(this.toString() + "GateIn user query list found in cache. Query: " + getQueryKey(query, userStatus)
+ ";namespace=" + ns);
}
return list;
}
return null;
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
public void endRequest(ExoContainer container) {
if (!acceptComponentRequestCall)
return;
if (configuration.isUseJTA()) {
if (traceLoggingEnabled) {
log.trace("Finishing UserTransaction in method endRequest");
}
try {
jtaTransactionLifecycleService.finishJTATransaction();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} else {
try {
if (idmService_.getIdentitySession().getTransaction().isActive()) {
idmService_.getIdentitySession().getTransaction().commit();
}
} catch (Exception e) {
log.error(e.getMessage(), e);
recoverFromIDMError(e);
}
}
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
/**
* Used to allow nested requests (as done by the authenticator during unit tests) and avoid to commit two times the same
* transaction.
*/
/*
*
* private ThreadLocal<AtomicInteger> currentRequestCount = new ThreadLocal<AtomicInteger>() {
*
* @Override protected AtomicInteger initialValue() { return new AtomicInteger(); } };
*/
public void startRequest(ExoContainer container) {
if (!acceptComponentRequestCall)
return;
try {
if (configuration.isUseJTA()) {
if (traceLoggingEnabled) {
log.trace("Starting UserTransaction in method startRequest");
}
jtaTransactionLifecycleService.beginJTATransaction();
} else {
if (!idmService_.getIdentitySession().getTransaction().isActive()) {
idmService_.getIdentitySession().beginTransaction();
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
代码示例来源:origin: org.gatein.portal/exo.portal.component.identity
public void flush() {
if (configuration.isUseJTA()) {
if (traceLoggingEnabled) {
log.trace("Flushing UserTransaction in method flush");
}
// Complete restart of JTA transaction don't have good performance. So we will only sync identitySession (same
// as for non-jta environment)
// finishJTATransaction();
// beginJTATransaction();
try {
if (jtaTransactionLifecycleService.getUserTransaction().getStatus() == Status.STATUS_ACTIVE) {
idmService_.getIdentitySession().save();
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} else {
try {
if (idmService_.getIdentitySession().getTransaction().isActive()) {
idmService_.getIdentitySession().save();
}
} catch (Exception e) {
log.error(e.getMessage(), e);
recoverFromIDMError(e);
}
}
}
代码示例来源:origin: exoplatform/platform
@Override
public void execute(Event<UIComponent> event) throws Exception {
UIComponent ui = event.getSource();
super.execute(event);
AuthenticationRegistry authRegistry = event.getSource().getApplicationComponent(AuthenticationRegistry.class);
HttpServletRequest httpRequest = Util.getPortalRequestContext().getRequest();
// Clear whole context of OAuth login. See OAuthAuthenticationFilter.cleanAuthenticationContext
authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_OAUTH_PRINCIPAL);
authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_PORTAL_USER);
authRegistry.removeAttributeOfClient(httpRequest, OAuthConst.ATTRIBUTE_AUTHENTICATED_PORTAL_USER_DETECTED);
UIRegisterOAuth uiOauth = ui.getAncestorOfType(UIRegisterOAuth.class);
if(uiOauth != null) {
uiOauth.portalUser = null;
}
if (log.isTraceEnabled()) {
log.trace("Registration with OAuth properties terminated. Clearing authentication context");
}
}
}
内容来源于网络,如有侵权,请联系作者删除!