You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Greg Foulks <gf...@gmail.com> on 2007/01/09 18:19:03 UTC

JNDI example for connecting to a DB2 on OS400

I've read the JNDI docs and can't find an example as to how to configure a
connection for a DB2.

I need to be able to setup a autoreconnect and a validation query in my
server.xml but can't seem to find an example. Anyone able to help direct me
in the to right location?

Greg

Re: JNDI example for connecting to a DB2 on OS400

Posted by Greg Foulks <gf...@gmail.com>.
an actual sql query, like this...


SELECT * FROM MPLIB.VRC WHERE ( RMEMBNO = '99999999999' )



On 1/11/07, olivier nouguier <ol...@gmail.com> wrote:
>
> A query that *always* return a row ...
>
> On 1/11/07, Greg Foulks <gf...@gmail.com> wrote:
> >
> > then what would be a vaild validation query?
> >
> > On 1/11/07, olivier nouguier <ol...@gmail.com> wrote:
> > > Hi,
> > >  Nothing more than for another database.
> > >  But:
> > > - be carrefull to put a valid validationQuery ( eg: select 1; is not
> > > supported by DB2/OS400 )!
> > > the URL and drivers should look like:
> > >       <parameter>
> > >         <name>url</name>
> > >
> >
> <value>jdbc:as400://yourServerName;libraries=YOURSLIB1,YOURSLIB2;prompt=false;errors=full;trace=false</value>
> > >       </parameter>
> > >       <parameter>
> > >         <name>driverClassName</name>
> > >         <value>com.ibm.as400.access.AS400JDBCDriver</value>
> > >       </parameter>
> > >       <parameter>
> > >
> > > On 1/9/07, Greg Foulks <gf...@gmail.com> wrote:
> > > >
> > > > I've read the JNDI docs and can't find an example as to how to
> > configure a
> > > > connection for a DB2.
> > > >
> > > > I need to be able to setup a autoreconnect and a validation query in
> > my
> > > > server.xml but can't seem to find an example. Anyone able to help
> > direct
> > > > me
> > > > in the to right location?
> > > >
> > > > Greg
> > > >
> > > >
> > >
> > >
> > > --
> > > "Souviens-toi qu'au moment de ta naissance tout le monde était dans la
> > joie
> > > et toi dans les pleurs.
> > > Vis de manière qu'au moment de ta mort, tout le monde soit dans les
> > pleurs
> > > et toi dans la joie."
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> --
> "Souviens-toi qu'au moment de ta naissance tout le monde était dans la
> joie
> et toi dans les pleurs.
> Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
> et toi dans la joie."
>
>

Re: JNDI example for connecting to a DB2 on OS400

Posted by olivier nouguier <ol...@gmail.com>.
A query that *always* return a row ...

On 1/11/07, Greg Foulks <gf...@gmail.com> wrote:
>
> then what would be a vaild validation query?
>
> On 1/11/07, olivier nouguier <ol...@gmail.com> wrote:
> > Hi,
> >  Nothing more than for another database.
> >  But:
> > - be carrefull to put a valid validationQuery ( eg: select 1; is not
> > supported by DB2/OS400 )!
> > the URL and drivers should look like:
> >       <parameter>
> >         <name>url</name>
> >
> <value>jdbc:as400://yourServerName;libraries=YOURSLIB1,YOURSLIB2;prompt=false;errors=full;trace=false</value>
> >       </parameter>
> >       <parameter>
> >         <name>driverClassName</name>
> >         <value>com.ibm.as400.access.AS400JDBCDriver</value>
> >       </parameter>
> >       <parameter>
> >
> > On 1/9/07, Greg Foulks <gf...@gmail.com> wrote:
> > >
> > > I've read the JNDI docs and can't find an example as to how to
> configure a
> > > connection for a DB2.
> > >
> > > I need to be able to setup a autoreconnect and a validation query in
> my
> > > server.xml but can't seem to find an example. Anyone able to help
> direct
> > > me
> > > in the to right location?
> > >
> > > Greg
> > >
> > >
> >
> >
> > --
> > "Souviens-toi qu'au moment de ta naissance tout le monde était dans la
> joie
> > et toi dans les pleurs.
> > Vis de manière qu'au moment de ta mort, tout le monde soit dans les
> pleurs
> > et toi dans la joie."
> >
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
et toi dans les pleurs.
Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
et toi dans la joie."

Re: JNDI example for connecting to a DB2 on OS400

Posted by Greg Foulks <gf...@gmail.com>.
then what would be a vaild validation query?

On 1/11/07, olivier nouguier <ol...@gmail.com> wrote:
> Hi,
>  Nothing more than for another database.
>  But:
> - be carrefull to put a valid validationQuery ( eg: select 1; is not
> supported by DB2/OS400 )!
> the URL and drivers should look like:
>       <parameter>
>         <name>url</name>
> <value>jdbc:as400://yourServerName;libraries=YOURSLIB1,YOURSLIB2;prompt=false;errors=full;trace=false</value>
>       </parameter>
>       <parameter>
>         <name>driverClassName</name>
>         <value>com.ibm.as400.access.AS400JDBCDriver</value>
>       </parameter>
>       <parameter>
>
> On 1/9/07, Greg Foulks <gf...@gmail.com> wrote:
> >
> > I've read the JNDI docs and can't find an example as to how to configure a
> > connection for a DB2.
> >
> > I need to be able to setup a autoreconnect and a validation query in my
> > server.xml but can't seem to find an example. Anyone able to help direct
> > me
> > in the to right location?
> >
> > Greg
> >
> >
>
>
> --
> "Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
> et toi dans les pleurs.
> Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
> et toi dans la joie."
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JNDI example for connecting to a DB2 on OS400

Posted by olivier nouguier <ol...@gmail.com>.
Hi,
 Nothing more than for another database.
 But:
- be carrefull to put a valid validationQuery ( eg: select 1; is not
supported by DB2/OS400 )!
the URL and drivers should look like:
      <parameter>
        <name>url</name>
<value>jdbc:as400://yourServerName;libraries=YOURSLIB1,YOURSLIB2;prompt=false;errors=full;trace=false</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>com.ibm.as400.access.AS400JDBCDriver</value>
      </parameter>
      <parameter>

On 1/9/07, Greg Foulks <gf...@gmail.com> wrote:
>
> I've read the JNDI docs and can't find an example as to how to configure a
> connection for a DB2.
>
> I need to be able to setup a autoreconnect and a validation query in my
> server.xml but can't seem to find an example. Anyone able to help direct
> me
> in the to right location?
>
> Greg
>
>


-- 
"Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
et toi dans les pleurs.
Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
et toi dans la joie."