JBoss AS7 - Failed to process phase POST_MODULE of deployment

半世苍凉 提交于 2019-12-06 11:18:18

Finally I've the answer to my question. I had to edit the jboss/standalone/configuration/standalone.xml file and add the following content (add a datasource):

    <subsystem xmlns="urn:jboss:domain:datasources:1.0">
        <datasources>
            <datasource jndi-name="java:jboss/datasources/myDatasource" pool-name="myDatasource" enabled="true" use-java-context="true">
                <connection-url>jdbc:postgresql://localhost/mydatabase</connection-url>
                <driver>org.postgresql</driver>
                <pool>
                    <min-pool-size>2</min-pool-size>
                    <max-pool-size>50</max-pool-size>
                    <prefill>false</prefill>
                    <use-strict-min>false</use-strict-min>
                    <flush-strategy>FailingConnectionOnly</flush-strategy>
                </pool>
                <security>
                    <user-name>myUser</user-name>
                </security>
                <validation>
                    <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
                    <validate-on-match>false</validate-on-match>
                    <background-validation>false</background-validation>
                </validation>
            </datasource>
            <drivers>
                <driver name="org.postgresql" module="org.postgresql">
                    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>
    </subsystem>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!