Fixes to persistence.xml for distribution
This commit is contained in:
parent
09d88c7065
commit
38b7dcdf7d
4 changed files with 70 additions and 80 deletions
|
@ -21,7 +21,7 @@ import java.util.Collection;
|
||||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||||
public abstract class RoleEntity {
|
public abstract class RoleEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -5,18 +5,16 @@
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RealmScopeMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmUserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.RoleEntity</class>
|
<class>org.keycloak.models.jpa.entities.ApplicationRoleEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RealmRoleEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserScopeMappingEntity</class>
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,34 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
||||||
|
|
||||||
|
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.ApplicationRoleEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RealmRoleEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserScopeMappingEntity</class>
|
||||||
|
|
||||||
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property name="hibernate.connection.url" value="jdbc:h2:mem:test"/>
|
||||||
|
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
|
||||||
|
<property name="hibernate.connection.username" value="sa"/>
|
||||||
|
<property name="hibernate.connection.password" value=""/>
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
||||||
|
<property name="hibernate.show_sql" value="false" />
|
||||||
|
<property name="hibernate.format_sql" value="true" />
|
||||||
|
</properties>
|
||||||
|
</persistence-unit>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<persistence-unit name="picketlink-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="picketlink-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
||||||
|
@ -35,35 +63,4 @@
|
||||||
</properties>
|
</properties>
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
|
||||||
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
||||||
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationRoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmRoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserScopeMappingEntity</class>
|
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<property name="hibernate.connection.url" value="jdbc:h2:mem:test"/>
|
|
||||||
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
|
|
||||||
<property name="hibernate.connection.username" value="sa"/>
|
|
||||||
<property name="hibernate.connection.password" value=""/>
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
|
||||||
<property name="hibernate.show_sql" value="false" />
|
|
||||||
<property name="hibernate.format_sql" value="true" />
|
|
||||||
</properties>
|
|
||||||
</persistence-unit>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</persistence>
|
</persistence>
|
||||||
|
|
|
@ -1,7 +1,35 @@
|
||||||
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
||||||
|
|
||||||
|
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.ApplicationRoleEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.RealmRoleEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
||||||
|
<class>org.keycloak.models.jpa.entities.UserScopeMappingEntity</class>
|
||||||
|
|
||||||
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property name="hibernate.connection.url" value="jdbc:h2:mem:test"/>
|
||||||
|
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
|
||||||
|
<property name="hibernate.connection.username" value="sa"/>
|
||||||
|
<property name="hibernate.connection.password" value=""/>
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
||||||
|
<property name="hibernate.show_sql" value="false" />
|
||||||
|
<property name="hibernate.format_sql" value="true" />
|
||||||
|
</properties>
|
||||||
|
</persistence-unit>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<persistence-unit name="picketlink-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="picketlink-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
||||||
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
||||||
|
@ -25,47 +53,14 @@
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/keycloakPerfTest"/>
|
<property name="hibernate.connection.url" value="jdbc:h2:mem:test"/>
|
||||||
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
|
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
|
||||||
<property name="hibernate.connection.username" value="portal"/>
|
<property name="hibernate.connection.username" value="sa"/>
|
||||||
<property name="hibernate.connection.password" value="portal"/>
|
<property name="hibernate.connection.password" value=""/>
|
||||||
<!--<property name="hibernate.hbm2ddl.auto" value="create" />-->
|
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
|
||||||
<!--<property name="hibernate.hbm2ddl.auto" value="update" />-->
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="${keycloak.jpa.hbm2ddl.auto}" />
|
|
||||||
<property name="hibernate.show_sql" value="false" />
|
<property name="hibernate.show_sql" value="false" />
|
||||||
<property name="hibernate.format_sql" value="true" />
|
<property name="hibernate.format_sql" value="true" />
|
||||||
</properties>
|
</properties>
|
||||||
</persistence-unit>
|
</persistence-unit>
|
||||||
-->
|
-->
|
||||||
<persistence-unit name="jpa-keycloak-identity-store" transaction-type="RESOURCE_LOCAL">
|
</persistence>
|
||||||
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
||||||
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.CredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.OAuthClientEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.ApplicationRoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.RealmRoleEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.SocialLinkEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
|
|
||||||
<class>org.keycloak.models.jpa.entities.UserScopeMappingEntity</class>
|
|
||||||
|
|
||||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/keycloakPerfTest"/>
|
|
||||||
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
|
|
||||||
<property name="hibernate.connection.username" value="portal"/>
|
|
||||||
<property name="hibernate.connection.password" value="portal"/>
|
|
||||||
<!--<property name="hibernate.hbm2ddl.auto" value="create" />-->
|
|
||||||
<!--<property name="hibernate.hbm2ddl.auto" value="update" />-->
|
|
||||||
<property name="hibernate.hbm2ddl.auto" value="${keycloak.jpa.hbm2ddl.auto}" />
|
|
||||||
<property name="hibernate.show_sql" value="false" />
|
|
||||||
<property name="hibernate.format_sql" value="true" />
|
|
||||||
</properties>
|
|
||||||
</persistence-unit>
|
|
||||||
|
|
||||||
|
|
||||||
</persistence>
|
|
||||||
|
|
Loading…
Reference in a new issue