webtier@glassfish.java.net

Connecting to a remote postgres database in GF 3.1.1

From: <forums_at_java.net>
Date: Sat, 21 Jan 2012 23:02:18 -0600 (CST)

I have run into a problem trying to connect to a postgres (8.2) data base
that is on a remote server.  I am using Glassfish 3.1.1 and have also found
the problem with Glassfish 2.1.1.  I can setup the connection pool and ping
the remote database, I can access the remote database from pgAdmin which is
on the same server that GF 3.1.1 and 2.1.1 are running and I can access the
remote database from Netbeans on the same server the GF is running.  The
code works with App Server 8.2 and Glassfish 2.1.1 but the database has alway
been local to the Application Server.  Both the database server and the
Glassfish server are Solaris 10 x86.  I looked at the server.policy file for
both Glassfish 3.1.1 and 2.1.1 and they appear to allow connections.  The
application is using EJB 2.1 technology but that does not appear to be a
problem as the connection problem occurs in a servlet or in an Enitity Bean
that is accessed through a servlet and a Session Bean.  Like I said this has
worked for years with the database local to the App Server.  What don't I
know or have forgotten about connecting to a remote database from a Java
Application Server? 


--
[Message sent by forum member 'salepointdata']
View Post: http://forums.java.net/node/882897