Hello,
   I am assuming that you are trying to define this datasource in order to
do application server managed connection pooling.  The closest I have done
to what you described is declare a datasource as a global resource in the
server.xml and refer to it in context definition.  You can define a new
context in the $CATALINA_HOME/conf/Catalina/localhost/APPNAME.xml. Here is
an example:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/son">
  <ResourceLink
            name="jdbc/teamDB"
            global="jdbc/teamDB"
            type="javax.sql.DataSource"
          />
</Context>

 However, I still needed to put the jdbc jar file in the common/lib.  I am
not completely sure about this, but for application server to manage your
datasource, one needs to make the proper jar file available to the app
server by putting it in the common/lib as it will not look inside each
deployed directory to perform application independent tasks.  I am also
curious to know if someone has found a way around this.


Best Regards,
Khawaja Shams

On 12/26/05, Legolas Woodland <[EMAIL PROTECTED]> wrote:
>
> Hi
> Thank you for reading my post.
> Is it possible to make a data-source without admin console ?
> I mean by defining the data-source in web.xml or in Context.xml (i think
> i read somewhere that we could put context.xml into meta-inf folder and
> it will act like Context definition in admin console).
>
> is it mandatory that Tomcat shared library folder contain my database
> jdbc driver to have data-source ?
> I mean can we bundle , our JDBC driver inside war file and define the
> data-source in war file too ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to