Tabnine Logo
DefaultKeycloakSessionFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultKeycloakSessionFactory
in
org.keycloak.services

Best Java code snippets using org.keycloak.services.DefaultKeycloakSessionFactory (Showing top 2 results out of 315)

origin: org.keycloak/keycloak-model-jpa

@Override
public void setUp() throws SetupException {
  this.kcSession = ThreadLocalSessionContext.getCurrentSession();
  if (this.kcSession == null) {
    // Probably running Liquibase from maven plugin. Try to create kcSession programmatically
    logger.info("No KeycloakSession provided in ThreadLocal. Initializing KeycloakSessionFactory");
    try {
      DefaultKeycloakSessionFactory factory = new DefaultKeycloakSessionFactory();
      factory.init();
      this.kcSession = factory.create();
    } catch (Exception e) {
      throw new SetupException("Exception when initializing factory", e);
    }
  }
}
origin: org.keycloak/keycloak-connections-jpa-liquibase

@Override
public void setUp() throws SetupException {
  this.kcSession = ThreadLocalSessionContext.getCurrentSession();
  if (this.kcSession == null) {
    // Probably running Liquibase from maven plugin. Try to create kcSession programmatically
    logger.info("No KeycloakSession provided in ThreadLocal. Initializing KeycloakSessionFactory");
    try {
      DefaultKeycloakSessionFactory factory = new DefaultKeycloakSessionFactory();
      factory.init();
      this.kcSession = factory.create();
    } catch (Exception e) {
      throw new SetupException("Exception when initializing factory", e);
    }
  }
}
org.keycloak.servicesDefaultKeycloakSessionFactory

Most used methods

  • <init>
  • create
  • init

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now