Thread: pg73jdbc3.jar and Connection Pool properties

pg73jdbc3.jar and Connection Pool properties

From
Moreno Mauri
Date:
Hi all,
I 'm working on a server linux with installed postgresql version 7.2.1.
For my Java code I used (till now) pgjdbc2.jar: everything was ok.

Now I need to use Connection Pool and so I downloaded
pg73jdbc3.jar (pgjdbc2.jar doesn't contain Connection Pool
classes).

Can I use pg73jdbc3.jar for postgresql 7.2.1 without any problem ?
(I did a little test and it seems to be ok)

------------------

Another question.
Connection Pooling is required by Sun One Application Server
(I'm facing with an EJB based application).
I didn't find clear examples about Connection Pool's properties that I
have
to indicate to the Application Server.
I tried with:

Datasource Classname: org.postgresql.jdbc3.PoolingDataSource
serverName:                 localhost
user:                            <my user>
password:                   <my password>
database Name:          <my db name>

but it doesn't work :-(

Can anybody help me ?

Many thanks in advance,
Moreno


Re: pg73jdbc3.jar and Connection Pool properties

From
Paul Thomas
Date:
On 06/10/2003 08:51 Moreno Mauri wrote:
> Hi all,
> I 'm working on a server linux with installed postgresql version 7.2.1.
> For my Java code I used (till now) pgjdbc2.jar: everything was ok.
>
> Now I need to use Connection Pool and so I downloaded
> pg73jdbc3.jar (pgjdbc2.jar doesn't contain Connection Pool
> classes).

The Connection pool should be provided by the application container.

>
> Can I use pg73jdbc3.jar for postgresql 7.2.1 without any problem ?
> (I did a little test and it seems to be ok)


It will work fine.

>
> ------------------
>
> Another question.
> Connection Pooling is required by Sun One Application Server
> (I'm facing with an EJB based application).
> I didn't find clear examples about Connection Pool's properties that I
> have
> to indicate to the Application Server.
> I tried with:
>
> Datasource Classname: org.postgresql.jdbc3.PoolingDataSource
> serverName:                 localhost
> user:                            <my user>
> password:                   <my password>
> database Name:          <my db name>
>
> but it doesn't work :-(
>
> Can anybody help me ?

There's no such class or interface as
org.postgresql.jdbc3.PoolingDataSource. Have you tried
org.postgresql.Driver?
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

Re: pg73jdbc3.jar and Connection Pool properties

From
Moreno Mauri
Date:
Hi Paul,

> There's no such class or interface as
> org.postgresql.jdbc3.PoolingDataSource. Have you tried
> org.postgresql.Driver?

The first time I tried with org.postgresql.Driver and it didn't work.

Then I used org.postgresql.jdcb2.optional.PoolingDataSource and it was
the same.

The last attempt was org.postgresql.jdbc3.PoolingDataSource but nothing
changed
:-(

Perhaps I need to create a Persistence Manager in my App.Server's
instance if I
need
to use Entity Beans ?

Thanks
Moreno


Re: pg73jdbc3.jar and Connection Pool properties

From
Paul Thomas
Date:
On 06/10/2003 13:21 Moreno Mauri wrote:
> Hi Paul,
>
> > There's no such class or interface as
> > org.postgresql.jdbc3.PoolingDataSource. Have you tried
> > org.postgresql.Driver?
>
> The first time I tried with org.postgresql.Driver and it didn't work.
>
> Then I used org.postgresql.jdcb2.optional.PoolingDataSource and it was
> the same.
>
> The last attempt was org.postgresql.jdbc3.PoolingDataSource but nothing
> changed
> :-(

Without knowing what your app server needs, have you tried either
org.postgresql.jdcb2.optional.ConnectionPool or
org.postgresql.jdcb3.Jdbc3ConnectionPool?

>
> Perhaps I need to create a Persistence Manager in my App.Server's
> instance if I
> need
> to use Entity Beans ?

I've never used your particular app server so I've no idea. I found this
in the archives:

http://archives.postgresql.org/pgsql-jdbc/2003-03/msg00031.php

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

Re: pg73jdbc3.jar and Connection Pool properties

From
Moreno Mauri
Date:
>Without knowing what your app server needs, have you tried either
org.postgresql.jdcb2.optional.ConnectionPool or
org.postgresql.jdcb3.Jdbc3ConnectionPool?

I read  (I don't remember in which of the various forum I found the
suggest)
that in Connection Pool's properties for Sun One Application Server
I have to indicate not org.postgresql.Driver but directly
the class org.postgresql.jdcb3.Jdbc3ConnectionPool (or the
jdbc2.optional
class ... I think it depends from which version of jdbc, 2 or 3, you are
using).

Now everything runs: I was wrong when I set the resource references
for my entity beans (I had to indicate the JNDI name for the persistence
manager).

>I've never used your particular app server so I've no idea. I found
this
in the archives:

http://archives.postgresql.org/pgsql-jdbc/2003-03/msg00031.php

Thanks Paul, I'll have it a look !

Moreno