@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER,entityManager); } })
@Override protected IdentityContext createIdentityContext(Partition partition, EventBridge eventBridge, IdGenerator idGenerator) { IdentityContext identityContext = super.createIdentityContext(partition, eventBridge, idGenerator); identityContext.setParameter(IDENTITY_MANAGER_CTX_PARAMETER, this); return identityContext; }
@Override public void initContextForStore(IdentityContext ctx, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { if (!ctx.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) { ctx.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, entityManager); } } } }).supportAllFeatures();
@Override protected IdentityContext createIdentityContext(Partition partition, EventBridge eventBridge, IdGenerator idGenerator) { IdentityContext identityContext = super.createIdentityContext(partition, eventBridge, idGenerator); identityContext.setParameter(IDENTITY_MANAGER_CTX_PARAMETER, this); return identityContext; }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { Identity identity = getIdentity(); if (identity != null) { context.setParameter(IdentityContext.AUTHENTICATED_ACCOUNT, identity.getAccount()); } Object credentials = getCredentials(); if (credentials != null) { context.setParameter(IdentityContext.CREDENTIALS, credentials); } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { Identity identity = getIdentity(); if (identity != null) { context.setParameter(IdentityContext.AUTHENTICATED_ACCOUNT, identity.getAccount()); } Object credentials = getCredentials(); if (credentials != null) { context.setParameter(IdentityContext.CREDENTIALS, credentials); } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { Identity identity = getIdentity(); if (identity != null) { context.setParameter(IdentityContext.AUTHENTICATED_ACCOUNT, identity.getAccount()); } Object credentials = getCredentials(); if (credentials != null) { context.setParameter(IdentityContext.CREDENTIALS, credentials); } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { if (!context.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, this.entityManagerProvider.getEntityManager()); } } } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { if (!context.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, this.entityManagerProvider.getEntityManager()); } } } }
@Override public void initializeContext(final IdentityContext context, final IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { if (!context.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, getEntityManager()); } } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { if (!context.isParameterSet(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER)) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, this.entityManagerProvider.getEntityManager()); } } } }
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { EntityManager entityManager = context.getParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER); if (entityManager == null || !entityManager.isOpen()) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, getEntityManager(ContextTransactionManager.getInstance())); } } } });
@Override public void initContextForStore(IdentityContext context, IdentityStore<?> store) { if (store instanceof JPAIdentityStore) { EntityManager entityManager = context.getParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER); if (entityManager == null || !entityManager.isOpen()) { context.setParameter(JPAIdentityStore.INVOCATION_CTX_ENTITY_MANAGER, getEntityManager(getTransactionManager().getValue())); } } } });