public void afterCompletion(final int i) { entityManager.close(); logger.debug("Closed EntityManager(unit=" + unitName + ", hashCode=" + entityManager.hashCode() + ")"); } }
@Override public boolean logout() throws LoginException { this.subject.getPrincipals().removeAll(this.principals); this.principals.clear(); log.debug("logout"); return true; }
@Override public boolean logout() throws LoginException { this.subject.getPrincipals().removeAll(this.principals); this.principals.clear(); log.debug("logout"); return true; }
private void optionalBind(final Bindings bindings, final Reference ref, final String name) throws NamingException { try { openejbContext.bind(name, ref); logger.debug("bound ejb at name: " + name + ", ref: " + ref); bindings.add(name); } catch (final NamingException okIfBindFails) { logger.debug("failed to bind ejb at name: " + name + ", ref: " + ref); } }
public static WebBeansContext enter(final WebBeansContext newOWBContext) { final WebBeansContext oldContext = contexts.get(); if (newOWBContext != null) { contexts.set(newOWBContext); } else { contexts.remove(); } if (logger.isDebugEnabled()) { logger.debug("Enter:'" + newOWBContext + "'"); } return oldContext; }
@Override public boolean abort() throws LoginException { clear(); log.debug("abort"); return true; }
@Override public boolean abort() throws LoginException { clear(); log.debug("abort"); return true; }
public boolean abort() throws LoginException { clear(); if (debug) { log.debug("abort"); } return true; }
@Override public boolean commit() throws LoginException { this.principals.add(new UserPrincipal(this.userData.user)); for (final String myGroup : this.userData.groups) { principals.add(new GroupPrincipal(myGroup)); } this.subject.getPrincipals().addAll(this.principals); clear(); log.debug("commit"); return true; }
@Override public boolean commit() throws LoginException { this.principals.add(new UserPrincipal(this.userData.user)); for (final String myGroup : this.userData.groups) { principals.add(new GroupPrincipal(myGroup)); } this.subject.getPrincipals().addAll(this.principals); clear(); log.debug("commit"); return true; }
@Override public boolean commit() throws LoginException { this.principals.add(new UserPrincipal(this.userData.user)); for (final String myGroup : this.userData.groups) { principals.add(new GroupPrincipal(myGroup)); } this.subject.getPrincipals().addAll(this.principals); clear(); log.debug("commit"); return true; }
@Override public void rollback() throws IllegalStateException, SecurityException, SystemException { if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Rolling back user transaction " + transactionManager().getTransaction()); } transactionManager().rollback(); }
@Override public void clear(final Object key) { final WebBeansContext ctx = getContext((ClassLoader) key); if (logger.isDebugEnabled()) { logger.debug("Clearing:'" + ctx + "'"); } contextByClassLoader.remove(key); ctx.clear(); }
@Override public UserTransaction getUserTransaction() { UserTransaction ut; try { ut = (UserTransaction) containerSystem.getJNDIContext().lookup("comp/UserTransaction"); } catch (final NamingException e) { logger.debug("User transaction is not bound to context, lets create it"); ut = new CoreUserTransaction(getTransactionManager()); } return ut; }
@Override public int getStatus() throws SystemException { final int status = transactionManager().getStatus(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status)); } return status; }
private void initialize() { for (final File file : list()) { if (!file.canRead()) { continue; } final FileInfo now = newInfo(file); now.setChanging(false); now.setNewFile(false); logger.debug("Auto-Deployer initialization found: " + file.getAbsolutePath()); } }
@Override public void rollback() throws IllegalStateException, SecurityException, SystemException { check(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Rolling back user transaction " + transactionManager().getTransaction()); } transactionManager().rollback(); }
@Override public void begin() throws NotSupportedException, SystemException { check(); transactionManager().begin(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Started user transaction " + transactionManager().getTransaction()); } }
@Override public void setRollbackOnly() throws SystemException { if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction()); } transactionManager().setRollbackOnly(); }