-
1. Re: using postgresql driver in as7
juergen.zimmermann Jun 28, 2011 10:59 AM (in response to oourfali)I'm using PG 9.1beta2, and the driver 9.1 since 2 or 3 weeks. There are no problems. What did you exactly do:
a) Deployment of the driver or provisioning as a module?
b) What exactly are your modifications in standalone.xml?
-
2. Re: using postgresql driver in as7
oourfali Jun 28, 2011 12:52 PM (in response to juergen.zimmermann)I used provisioning.
I made the following modifications to standalone.xml:
under datasources:
<datasource jndi-name="java:/DataSource" pool-name="DataSource" enabled="true" use-java-context="true"> <connection-url> jdbc:postgresql://10.35.1.30:5432/db </connection-url> <driver-class> org.postgresql.Driver </driver-class> <driver> postgresql-9.0-801.jdbc4.jar </driver> <transaction-isolation> TRANSACTION_READ_COMMITTED </transaction-isolation> <pool> <min-pool-size> 1 </min-pool-size> <max-pool-size> 100 </max-pool-size> <prefill> true </prefill> <use-strict-min> false </use-strict-min> </pool> <security> <user-name> postgres </user-name> <password> password
</password> </security> <validation> <validate-on-match> false </validate-on-match> <background-validation> false </background-validation> <useFastFail> false </useFastFail> </validation> <statement> <prepared-statement-cache-size> 100 </prepared-statement-cache-size> <share-prepared-statements/> </statement> </datasource> and under drivers:
<driver name="postgresql-9.0-801.jdbc4.jar" module="org.postgresql.Driver"/>
-
3. Re: using postgresql driver in as7
juergen.zimmermann Jun 28, 2011 2:25 PM (in response to oourfali)This is my module.xml:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
<resources>
<resource-root path="postgresql.jar"/>
</resources><dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>This is my datasource section
<datasource jndi-name="java:/swe1DS" pool-name="swe1DS">
<connection-url>jdbc:postgresql:jbossdb</connection-url>
<driver>postgresql</driver>
<security>
<user-name>...</user-name>
<password>...</password>
</security>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>4</max-pool-size>
</pool>
<validation>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql></validation>
</datasource>...
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>I defined the XA datasource class because I also had problems before. I don't have the driver class declaration inside the datasource section.
-
4. Re: using postgresql driver in as7
oourfali Jun 29, 2011 11:15 AM (in response to juergen.zimmermann)As a module it indeed worked.
Thank you,
Oved