2

This is my persistance.xml

<?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

<persistence-unit name="cframe-context-unit">

    <jta-data-source>java:jboss/datasources/ClicencePostgresDS</jta-data-source>

    <jar-file>myModel.jar</jar-file>

    <properties>
        <property name="hibernate.archive.autodetection" value="class"/>
        <property name="hibernate.format_sql" value="true"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
        <property name="hibernate.default_schema" value="dev"/>
        <property name="hibernate.hbm2ddl.auto" value="update"/> 
    </properties>

</persistence-unit>

I want to remove this line <property name="hibernate.default_schema" value="dev"/> and set it in the jboss datasource configuration. This is my current jboss datasource configuration

<datasource jta="false" jndi-name="java:jboss/datasources/ClicencePostgresDS" pool-name="ClicencePostgresDS" enabled="true" use-java-context="true" use-ccm="false">  
                <connection-url>  
                    jdbc:postgresql://127.0.0.1:5432/citech_db  
                </connection-url>
                <driver>postgresql</driver>  
                <pool>  
                    <min-pool-size>2</min-pool-size>  
                    <max-pool-size>20</max-pool-size>  
                </pool>  
                <security>  
                    <user-name>username</user-name>  
                    <password>password</password>  
                </security>  
                <validation>  
                    <validate-on-match>false </validate-on-match>  
                    <background-validation>false</background-validation>  
                    <!--background-validation-millis>0</background-validation-millis-->  
                </validation>  
                <statement>  
                    <prepared-statement-cache-size>0</prepared-statement-cache-size>  
                    <share-prepared-statements>false</share-prepared-statements>  
                </statement>  
            </datasource> 
Bigmwaj
  • 361
  • 2
  • 7

0 Answers0