org.gatein.common.logging.Logger.trace()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(11.1k)|赞(0)|评价(0)|浏览(186)

本文整理了Java中org.gatein.common.logging.Logger.trace()方法的一些代码示例,展示了Logger.trace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.trace()方法的具体详情如下:
包路径:org.gatein.common.logging.Logger
类名称:Logger
方法名:trace

Logger.trace介绍

暂无

代码示例

代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common

  1. public final void closeContext(boolean save)
  2. {
  3. log.trace("Requesting for context close with save=" + save + " going to look for any context");
  4. AbstractContext context = (AbstractContext)getContext(true);
  5. //
  6. if (context == null)
  7. {
  8. String msg = "Cannot close non existing context";
  9. log.trace(msg);
  10. throw new IllegalStateException(msg);
  11. }
  12. //
  13. context.close(save);
  14. }

代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common

  1. final SessionContext openSynchronizedContext()
  2. {
  3. log.trace("Opening a global context");
  4. AbstractContext context = (AbstractContext)getContext(true);
  5. //
  6. if (context != null)
  7. {
  8. String msg = "A global context is already opened";
  9. log.trace(msg);
  10. throw new IllegalStateException(msg);
  11. }
  12. // Attempt to get the synchronization
  13. log.trace("Ok, no global context found, asking current synchronization");
  14. Synchronization sync = manager.getSynchronization();
  15. //
  16. if (sync == null)
  17. {
  18. String msg = "Need global synchronization for opening a global context";
  19. log.trace(msg);
  20. throw new IllegalStateException(msg);
  21. }
  22. //
  23. log.trace("Opening a global context for the related sync");
  24. return sync.openContext(this);
  25. }

代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common

  1. log.trace("Requesting context");
  2. Synchronization sync = manager.getSynchronization();
  3. log.trace("Found synchronization about to get the current context for chromattic " + domainName);
  4. SynchronizedContext context = sync.getContext(domainName);
  5. log.trace("No current context found, about to open one");
  6. context = sync.openContext(this);
  7. log.trace("Found a context and will return it");
  8. log.trace("No active synchronization about to try the current local context");
  9. LocalContext localContext = currentContext.get();
  10. log.trace("Found local context " + localContext);

代码示例来源:origin: org.gatein.sso/sso-agent

  1. /**
  2. * Obtain ID of partnerApp from configuration of given jossoAgent and from contextPath of given servlet request
  3. *
  4. * @param jossoAgent
  5. * @param hreq
  6. * @return partnerApp
  7. */
  8. public static String getPartnerAppId(AbstractSSOAgent jossoAgent, HttpServletRequest hreq)
  9. {
  10. String requester = null;
  11. // Try to obtain requester from ID of partnerApp
  12. SSOPartnerAppConfig partnerAppConfig = jossoAgent.getPartnerAppConfig(hreq.getServerName(), hreq.getContextPath());
  13. if (partnerAppConfig != null)
  14. {
  15. requester = partnerAppConfig.getId();
  16. }
  17. // Fallback to contextPath if previous failed
  18. if (requester == null)
  19. {
  20. requester = hreq.getContextPath().substring(1);
  21. }
  22. if (log.isTraceEnabled())
  23. {
  24. log.trace("Using partnerAppId " + requester);
  25. }
  26. return requester;
  27. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store PLIDM root group
  3. *
  4. * @param ns
  5. * @param rootGroup
  6. */
  7. void putRootGroup(String ns, Group rootGroup) {
  8. Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
  9. Node ioNode = addNode(nodeFqn);
  10. if (ioNode != null) {
  11. ioNode.put(NODE_OBJECT_KEY, rootGroup);
  12. if (log.isTraceEnabled()) {
  13. log.trace(this.toString() + "GateIn root group stored in cache" + ";namespace=" + ns);
  14. }
  15. }
  16. }

代码示例来源:origin: org.gatein.sso/sso-agent

  1. log.trace("Found SamlCredential inside Subject: " + samlCredential);
  2. log.trace("SecurityClient successfully updated with SAMLCredential");

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve PLIDM root group
  3. *
  4. * @param ns
  5. * @return
  6. */
  7. Group getRootGroup(String ns) {
  8. Fqn nodeFqn = getFqn(ns, NODE_PLIDM_ROOT_GROUP);
  9. Node node = getNode(nodeFqn);
  10. if (node != null) {
  11. Group rootGroup = (Group) node.get(NODE_OBJECT_KEY);
  12. if (log.isTraceEnabled() && rootGroup != null) {
  13. log.trace(this.toString() + "GateIn root group found in cache" + ";namespace=" + ns);
  14. }
  15. return rootGroup;
  16. }
  17. return null;
  18. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store gatein group id
  3. *
  4. * @param ns
  5. * @param pLIDMId
  6. * @param id
  7. */
  8. void putGtnGroupId(String ns, String pLIDMId, String id) {
  9. Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
  10. Node ioNode = addNode(nodeFqn);
  11. if (ioNode != null) {
  12. ioNode.put(NODE_OBJECT_KEY, id);
  13. if (log.isTraceEnabled()) {
  14. log.trace(this.toString() + "GateIn group id cached. PLIDM group id: " + pLIDMId + "GateIn group id: " + id
  15. + ";namespace=" + ns);
  16. }
  17. }
  18. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve gatein group id
  3. *
  4. * @param ns
  5. * @param pLIDMId
  6. * @return
  7. */
  8. String getGtnGroupId(String ns, String pLIDMId) {
  9. Fqn nodeFqn = getFqn(ns, NODE_GTN_GROUP_ID, pLIDMId);
  10. Node node = getNode(nodeFqn);
  11. if (node != null) {
  12. String id = (String) node.get(NODE_OBJECT_KEY);
  13. if (log.isTraceEnabled() && id != null) {
  14. log.trace(this.toString() + "GateIn group id found in cache. PLIDM group id: " + pLIDMId + "GateIn group id: "
  15. + id + ";namespace=" + ns);
  16. }
  17. return id;
  18. }
  19. return null;
  20. }

代码示例来源:origin: org.gatein.sso/sso-agent

  1. @Override
  2. public void invoke(Request request, Response response) throws IOException, ServletException
  3. {
  4. ServletAccess.setRequestAndResponse(request, response);
  5. if (log.isTraceEnabled())
  6. {
  7. log.trace("Current HttpServletRequest and HttpServletResponse added to ThreadLocal.");
  8. }
  9. try
  10. {
  11. getNext().invoke(request, response);
  12. }
  13. finally
  14. {
  15. ServletAccess.resetRequestAndResponse();
  16. if (log.isTraceEnabled())
  17. {
  18. log.trace("Cleaning ThreadLocal");
  19. }
  20. }
  21. }

代码示例来源:origin: org.gatein.sso/sso-agent

  1. private SamlCredential getSamlCredential()
  2. {
  3. Subject subj = getCurrentSubject();
  4. if (log.isTraceEnabled())
  5. {
  6. log.trace("Found subject " + subj);
  7. }
  8. if (subj == null)
  9. {
  10. return null;
  11. }
  12. Set<Object> credentials = subj.getPublicCredentials();
  13. for (Object credential : credentials)
  14. {
  15. if (credential instanceof SamlCredential)
  16. {
  17. return (SamlCredential)credential;
  18. }
  19. }
  20. return null;
  21. }

代码示例来源:origin: org.gatein.sso/sso-agent

  1. /**
  2. * Performs portal logout by calling WCI logout.
  3. *
  4. * @param request
  5. * @param response
  6. */
  7. protected void portalLogout(HttpServletRequest request, HttpServletResponse response)
  8. {
  9. // Workaround: we need to temporary "restore" session to enforce crossContext logout at WCI layer
  10. request.getSession(true);
  11. try
  12. {
  13. ServletContainerFactory.getServletContainer().logout(request, response);
  14. }
  15. catch (Exception e)
  16. {
  17. String message = "Session has been invalidated but WCI logout failed.";
  18. log.warn(message);
  19. if (log.isTraceEnabled())
  20. {
  21. log.trace(message, e);
  22. }
  23. }
  24. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. if (consumerPortletInfo == null)
  2. log.trace("Cannot deliver event " + toConsumeEvent +" because the consumer of the event does not have a portlet info");
  3. safeInvoker.eventDiscarded(context.getEventControllerContext(), this, toConsumeEvent, EventControllerContext.EVENT_CONSUMER_INFO_NOT_AVAILABLE);
  4. continue;
  5. log.trace("Cannot deliver event " + toConsumeEvent +" because the consumer of the event does not accept the event name");
  6. safeInvoker.eventDiscarded(context.getEventControllerContext(), this, toConsumeEvent, EventControllerContext.PORTLET_DOES_NOT_CONSUME_EVENT);
  7. continue;

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Store IDMUserListAccess
  3. *
  4. * @param ns
  5. * @param query
  6. * @param list
  7. */
  8. void putGtnUserLazyPageList(String ns, Query query, IDMUserListAccess list, UserStatus userStatus) {
  9. Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
  10. Node ioNode = addNode(nodeFqn);
  11. if (ioNode != null) {
  12. ioNode.put(NODE_OBJECT_KEY, list);
  13. if (log.isTraceEnabled()) {
  14. log.trace(this.toString() + "GateIn user query list cached. Query: " + getQueryKey(query, userStatus) + ";namespace=" + ns);
  15. }
  16. }
  17. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.management

  1. log.trace(e.getMessage(), e);
  2. log.trace(e.getMessage(), e);
  3. log.trace(e.getMessage(), e);

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Retrieve IDMUserListAccess
  3. *
  4. * @param ns
  5. * @param query
  6. * @return LazyPageList
  7. */
  8. IDMUserListAccess getGtnUserLazyPageList(String ns, Query query, UserStatus userStatus) {
  9. Fqn nodeFqn = getFqn(ns, USER_QUERY_NODE, getQueryKey(query, userStatus));
  10. Node node = getNode(nodeFqn);
  11. if (node != null) {
  12. IDMUserListAccess list = (IDMUserListAccess) node.get(NODE_OBJECT_KEY);
  13. if (log.isTraceEnabled() && list != null) {
  14. log.trace(this.toString() + "GateIn user query list found in cache. Query: " + getQueryKey(query, userStatus)
  15. + ";namespace=" + ns);
  16. }
  17. return list;
  18. }
  19. return null;
  20. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void endRequest(ExoContainer container) {
  2. if (!acceptComponentRequestCall)
  3. return;
  4. if (configuration.isUseJTA()) {
  5. if (traceLoggingEnabled) {
  6. log.trace("Finishing UserTransaction in method endRequest");
  7. }
  8. try {
  9. jtaTransactionLifecycleService.finishJTATransaction();
  10. } catch (Exception e) {
  11. log.error(e.getMessage(), e);
  12. }
  13. } else {
  14. try {
  15. if (idmService_.getIdentitySession().getTransaction().isActive()) {
  16. idmService_.getIdentitySession().getTransaction().commit();
  17. }
  18. } catch (Exception e) {
  19. log.error(e.getMessage(), e);
  20. recoverFromIDMError(e);
  21. }
  22. }
  23. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. /**
  2. * Used to allow nested requests (as done by the authenticator during unit tests) and avoid to commit two times the same
  3. * transaction.
  4. */
  5. /*
  6. *
  7. * private ThreadLocal<AtomicInteger> currentRequestCount = new ThreadLocal<AtomicInteger>() {
  8. *
  9. * @Override protected AtomicInteger initialValue() { return new AtomicInteger(); } };
  10. */
  11. public void startRequest(ExoContainer container) {
  12. if (!acceptComponentRequestCall)
  13. return;
  14. try {
  15. if (configuration.isUseJTA()) {
  16. if (traceLoggingEnabled) {
  17. log.trace("Starting UserTransaction in method startRequest");
  18. }
  19. jtaTransactionLifecycleService.beginJTATransaction();
  20. } else {
  21. if (!idmService_.getIdentitySession().getTransaction().isActive()) {
  22. idmService_.getIdentitySession().beginTransaction();
  23. }
  24. }
  25. } catch (Exception e) {
  26. log.error(e.getMessage(), e);
  27. }
  28. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. public void flush() {
  2. if (configuration.isUseJTA()) {
  3. if (traceLoggingEnabled) {
  4. log.trace("Flushing UserTransaction in method flush");
  5. }
  6. // Complete restart of JTA transaction don't have good performance. So we will only sync identitySession (same
  7. // as for non-jta environment)
  8. // finishJTATransaction();
  9. // beginJTATransaction();
  10. try {
  11. if (jtaTransactionLifecycleService.getUserTransaction().getStatus() == Status.STATUS_ACTIVE) {
  12. idmService_.getIdentitySession().save();
  13. }
  14. } catch (Exception e) {
  15. log.error(e.getMessage(), e);
  16. }
  17. } else {
  18. try {
  19. if (idmService_.getIdentitySession().getTransaction().isActive()) {
  20. idmService_.getIdentitySession().save();
  21. }
  22. } catch (Exception e) {
  23. log.error(e.getMessage(), e);
  24. recoverFromIDMError(e);
  25. }
  26. }
  27. }

代码示例来源:origin: exoplatform/platform

  1. @Override
  2. public void execute(Event<UIComponent> event) throws Exception {
  3. UIComponent ui = event.getSource();
  4. super.execute(event);
  5. AuthenticationRegistry authRegistry = event.getSource().getApplicationComponent(AuthenticationRegistry.class);
  6. HttpServletRequest httpRequest = Util.getPortalRequestContext().getRequest();
  7. // Clear whole context of OAuth login. See OAuthAuthenticationFilter.cleanAuthenticationContext
  8. authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_OAUTH_PRINCIPAL);
  9. authRegistry.removeAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_PORTAL_USER);
  10. authRegistry.removeAttributeOfClient(httpRequest, OAuthConst.ATTRIBUTE_AUTHENTICATED_PORTAL_USER_DETECTED);
  11. UIRegisterOAuth uiOauth = ui.getAncestorOfType(UIRegisterOAuth.class);
  12. if(uiOauth != null) {
  13. uiOauth.portalUser = null;
  14. }
  15. if (log.isTraceEnabled()) {
  16. log.trace("Registration with OAuth properties terminated. Clearing authentication context");
  17. }
  18. }
  19. }

相关文章