Saturday 15 January 2011

java - Connecting Postgresql running on GCE from app engine -



java - Connecting Postgresql running on GCE from app engine -

i've googled lot couldn't find answer. i'm building application android backend on google appengine, need geospatial database use. decide utilize postgis, running on google compute engine instance. it's running on own computer , visible outside (tested). connect local dev app engine server (from computer), when deploy backend couldn't.

i tied utilize simple db connection. load driver:

static{ seek { class.forname("org.postgresql.driver"); } grab (classnotfoundexception e) { e.printstacktrace(); } }

and build connection:

public connection getconnection() throws sqlexception { if(mconnection == null || mconnection.isclosed()) { mconnection = drivermanager.getconnection(connectionurl, "....", "...."); } system.out.println("gis connection alive? "+ !mconnection.isclosed()); homecoming mconnection; }

i'm using postgresql-9.3-1102.jdbc4.jar.

i found post info restrictions, can't believe there's no simple way connect outer database. nice if around socketing quotas.

please help me!

believe it. not supported utilize protocol. utilize cloud sql or build https-based service on vm.

java postgresql google-app-engine jdbc google-compute-engine

No comments:

Post a Comment