Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to define Sybase DataSource in IBM WebSphere Application Server

201 views
Skip to first unread message

philip_yang

unread,
Sep 23, 2003, 11:23:31 AM9/23/03
to
I have a Sybase server (Adaptive Server Enterprise V12)
configured as High Availability. The connection properties
are stored in two LDAP servers.

Currently, I am using
DriverManager.getConnection(db_url, connectionProperties) to
create database connections. And db_url is in the following
format:
jdbc:sybase:indi:ldap//LDAP_IP:port/servername=DBServer,searchBase.

To leverage the WebSphere's connection pool feature, I'd
like to define a DataSource for my server. However, I'm not
sure if WebShpere is smart enough to know that the
configuration properties are kept on the LDAP server. Please
help.

John MacEnri

unread,
Oct 1, 2003, 8:53:34 AM10/1/03
to
Sorry, forgot to add what the resultant URL looks like

jdbc:sybase:Tds:<host>:<port>/<dbname>?REQUEST_HA_SESSION=true&SECONDARY_SER
VER_HOSTPORT=<ha_host>:<ha_port>

Regards

John

"John MacEnri" <jmac...@imsmaxims.com> wrote in message
news:3f7acd72$1@forums-2-dub...
> Hi,
>
> I was recently configuring a Java Application to connect to a HA cluster
of
> 2 ASE's. I went the way of setting up the LDAP server and all that, but
then
> found it's actually not required in later EBF's of the JCOnnect 5.5
> I am using EBF 11473 which is very recent, but I think the change has been
> in for about 3 EBF's now.
>
> They now support a much simpler way of configuring the details of the
> secondary fail-over ASE.
> All you need to do is set 2 connection properties.
> REQUEST_HA_SESSION=true
> and
> SECONDARY_SERVER_HOSTPORT=<host>:<port>
>
> where host:port is the details of the fail-over server.
>
> With these connection properties set, every connection created in the
> connection pool, will have automatic connection fail-over enabled.
> The only problem you're left with is you have to code for the exception
that
> is thrown when the fail-over occurs (JZ0F2), if you want the current
> transaction automcatically re-tried.
>
> Regards
>
> John
>
> <Philip Yang> wrote in message news:3f706608.60...@sybase.com...

John MacEnri

unread,
Oct 1, 2003, 8:46:58 AM10/1/03
to
Hi,

I was recently configuring a Java Application to connect to a HA cluster of
2 ASE's. I went the way of setting up the LDAP server and all that, but then
found it's actually not required in later EBF's of the JCOnnect 5.5
I am using EBF 11473 which is very recent, but I think the change has been
in for about 3 EBF's now.

They now support a much simpler way of configuring the details of the
secondary fail-over ASE.
All you need to do is set 2 connection properties.
REQUEST_HA_SESSION=true
and
SECONDARY_SERVER_HOSTPORT=<host>:<port>

where host:port is the details of the fail-over server.

With these connection properties set, every connection created in the
connection pool, will have automatic connection fail-over enabled.
The only problem you're left with is you have to code for the exception that
is thrown when the fail-over occurs (JZ0F2), if you want the current
transaction automcatically re-tried.

Regards

John

<Philip Yang> wrote in message news:3f706608.60...@sybase.com...

lance.a...@sun.com

unread,
Nov 3, 2003, 12:29:31 PM11/3/03
to
Looks like you are not using a DataSource, but a DataSource
wrapper as for a DataSource you will not specify a URL, this
is only for DriverManager

> Sorry, forgot to add what the resultant URL looks like
>
> jdbc:sybase:Tds:<host>:<port>/<dbname>?REQUEST_HA_SESSION=

> true&SECONDARY_SER VER_HOSTPORT=<ha_host>:<ha_port>

0 new messages