Re: [INTERFACES] a JDBC applet

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: [INTERFACES] a JDBC applet
Дата
Msg-id Pine.LNX.3.96.980709175912.1647C-100000@maidast.retep.org.uk
обсуждение исходный текст
Ответ на Re: [INTERFACES] a JDBC applet  ("Andrew R. Jackson" <ajackson@dezines.com>)
Список pgsql-interfaces
On Thu, 9 Jul 1998, Andrew R. Jackson wrote:

> At 04:49 PM 09/07/98 +0200, Cyril FERRAND wrote:
> >    I look for an example of a Java applet to communicate with a
> >postgresql base via JBDC. Because I have a lot of pb with my own one.
> >A example like basic.java example is ok.
>
> I have a general question related to this connecting to the DB via
> applet: would this require the applet user's domain to be in the
> pg_hba.conf file? I couldn't successfully run basic.java (one of the
> examples) locally here and have it connect to Postgres at school without
> doing this first.

Yes, anything that connects to the server needs to be in pg_hba.conf

> If one wants an applet that can run anywhere to have access, then you'd
> have to set up Postgres not to only accept connections from certain
> domains, but all domains, right? I could be way off here since I am a
> lowly Postgres *user*, and most docs/discussion speak to people who have
> Postgres admin/config abilities, which is unfortunate.

You are correct, although you would do this at a database by database
level, rather than all databases.

> Anyway, my approach to the applet-Postgres issue is a client-server one.
> Applets are clients that connect to a server running on the same machine
> running the Postgres stuff which mediates the database connection. This
> will keep the sysadmin people happy :) At least at my school...

Personally, I work with Java applications rather than applets, because my
code isn't really suited to a browser environment. Most of the time it's
on the same machine as postgres, but a lot of the time, it's another
machine on my local network, so it's not much of a problem.

But for those who do write applets for External web use, they have to
account for it.

I think the following should work:

host    mydb    0.0.0.0    0.0.0.0    password

I'd ill advise using trust, as they could get in as the DBA, and ident
wouldn't work well with most browsers (actually I can't think of any that
would work).

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] java.lang.OutOfMemoryError
Следующее
От: "Len Morgan"
Дата:
Сообщение: ODBC Problem