keycloak
静的公開メンバ関数 | 全メンバ一覧
org.keycloak.connections.jpa.JndiEntityManagerLookup クラス
org.keycloak.connections.jpa.JndiEntityManagerLookup 連携図
Collaboration graph

静的公開メンバ関数

static EntityManager getSessionEntityManager (KeycloakSession session, String entityManagerFactoryJndiName)
 

詳解

著者
Bill Burke
バージョン
Revision
1

関数詳解

◆ getSessionEntityManager()

static EntityManager org.keycloak.connections.jpa.JndiEntityManagerLookup.getSessionEntityManager ( KeycloakSession  session,
String  entityManagerFactoryJndiName 
)
inlinestatic
31  {
32  EntityManagerFactory factory = null;
33  try {
34  factory = (EntityManagerFactory)new InitialContext().lookup(entityManagerFactoryJndiName);
35  } catch (NamingException e) {
36  throw new RuntimeException(e);
37  }
38  EntityManager em = factory.createEntityManager();
39  session.getTransactionManager().enlist(new JpaKeycloakTransaction(em));
40  return em;
41  }

このクラス詳解は次のファイルから抽出されました: