How to make external DB connection on PostgreSQL?

How to make external DB connection on PostgreSQL?

Here is MySQL conection XML:

<Resource
name="jdbc/agileapplicationstack"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/timesheet?autoReconnect=true"
username="timesheet"
password="password"
maxActive="25"
maxIdle="5"
maxWait="10000"
/>

I just need this XML code to PostgreSQL.

Must be a:

<Resource
name="jdbc/agileapplicationstack"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/timesheet?autoReconnect=true"
username="timesheet"
password="password"
maxActive="20"
maxIdle="10"
maxWait="-1"
/>