users@glassfish.java.net

Re: How to address specific PostgreSQL Schema in Glassfish ?

From: Sven Hafner <sven.hafner_at_gmx.de>
Date: Sat, 30 Jan 2010 22:23:00 +0800

Hi !

I asked in the postgres-jdbc mailing list. The feature was planned but
never made it into the release version.
You can go back the history lane (to 2002) here:
http://archives.postgresql.org/pgsql-jdbc/2008-07/msg00012.php

only option: configure the search_path for the respective user (which
does not solve my problem though)
ALTER USER {username} SET search_path to {schema};


Sven



Dies Koper wrote:
> Hi Sven,
>
> I believe most JDBC drivers support a property called 'schema' that
> you can add to your other jdbc properties (user, password, url, etc.).
>
> So for each jdbc resource you'd create a separate JDBC connection
> pool, each with a different value for this property.
>
> Hope that helps,
> Dies
>
>
> On 28/01/2010 12:51, Sven Hafner wrote:
>> Hi !
>>
>> I create a connection pool and connection pointing to a PostgreSQL DB.
>> Is there a way to point to a specific schema inside the DB (like a
>> schema parameter) ? I need to avoid a schema annotation inside the EJB
>> code, so I can point several instances of the same application (but
>> different PU pointing to different jndi jdbc resource)
>> to different schemes in the same postgres instance.
>>
>>
>> Glassfish V3 and PostgreSQL 8.4
>>
>> Thanks for input
>> Sven
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>