1 Reply Latest reply on Jul 23, 2003 7:02 PM by jonlee

    connecting to PostgreSQL

    tj


      I'm new to JBoss. I have a PostgreSQL in another server. Can JBoss be configured on my PC to access the database remotely?

      Thanks.

        • 1. Re: connecting to PostgreSQL
          jonlee

          Thta is dependent on the capabilitiy of your database to support a network-capable JDBC connection. Luckily, Postgresql is network-capable.

          The template for the JBoss datasource configuration for Postgresql can be found in the docs/examples/jca section of your JBoss distribution. You will need to modify it for your needs - including JDBC URL configuration to point to your JBoss instance. You will also need to place the Postgresql JDBC driver in the JBoss distribution's server/instance/lib directory where instance is the JBoss instance you are running. This is normally default.

          Make sure your Postgresql listener is configured for network operation. In 7.3.2 and 7.3.3 you can do this by editing postgresql.conf and pg_hba.conf to ensure that network listening is on (tcp_ip=true) and that it accepts requests from your machine. Once configured, you can pg_ctl start/pg_ctl restart to have Postgresql start with your new configuration. Read more from the Postgresql documentation. With older Postgresql distributions you will need to manually start the listener with postmaster -i. Again read from the relevant source documentation.