db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: running checkDataSource Client - remote server
Date Wed, 20 Sep 2006 16:22:49 GMT
On 9/20/06, Deepa Remesh <dremesh@gmail.com> wrote:
> On 9/20/06, Myrna van Lunteren <m.v.lunteren@gmail.com> wrote:
>
> > Hi Deepa,
> > When running the tests against a remote server, you pass in a property
> > 'hostName' for the server's host(-DhostName=xyz.mycompany.com) to the
> > test harness. This can be accessed through the TestUtil.getHostName()
> > method.
> > I tried to add the following to this section in the tests (note,
> > edited the spacing):
> > - - - - - - -  -
> >  private static void testClientDSConnectionAttributes() throws SQLException {
> >     ClientDataSource ds = new ClientDataSource();
> >
> >     System.out.println("DataSource - EMPTY");
> > +    String hostName=TestUtil.getHostName();
> > +    if ((hostName != null) && (!hostName.equals("localhost")))
> > +        ds.setConnectionAttributes("serverName=" + hostName);
> > - - - - - - -  -
> > But it seemed to have no effect, I must've done something wrong?
>
> "serverName" is not in the list of Derby connection attributes and
> hence cannot be specified as a connection attribute.
> http://db.apache.org/derby/docs/10.2/ref/rrefattrib24612.html#rrefattrib24612
>
> Can you try using ds.setServerName method?

code snippet in
http://db.apache.org/derby/javadoc/publishedapi/jdbc3/org/apache/derby/jdbc/ClientDataSource.html

>
> Thanks,
> Deepa
>

Mime
View raw message