Kawthar,
In my web.xml:
...
jdbc/mySQLDatabase
Does this looks correct? From the exception message, which class name
is it looking for?
It looks like I have the same stuff that you do. This is my entire
element in web.xml:
DataSource for [the] application
jdbc/[ref-name]
catch (NamingException e1) {
e1.printStackTrace();
}
This is what your code should be doing IMHO, and not creating 2
Context
objects.
Yiannis
-Original Message-----
From: Kawthar Bt M Sulaiman [mailto:[EMAIL PROTECTED]
Sent: 15 March
rintStackTrace();
}
This is what your code should be doing IMHO, and not creating 2
Context
objects.
Yiannis
-Original Message-
From: Kawthar Bt M Sulaiman [mailto:[EMAIL PROTECTED]
Sent: 15 March 2004 08:37
To: [EMAIL PROTECTED]
Subject: Re: JNDI Datasource Reference
Kawthar,
I've been trying to setup my mySQL connection to tomcat as well and
has
been reading a lot of documents on how to do this. I think I'm getting
more
confused.
Context evtCtx = (Context) ctx.lookup("java:comp/env");
DataSource ds = (DataSource) evtCtx.lookup("jdbc/mySQLDatabase");
---> in
Hi Chris
I am afraid I cannot answer most of your questions (!) but I am writing in
because a couple of my earlier postings did not make it through to this mail
list, and it looks like my original question remained unanswered.
The question was answered, and here it is again, for the record.
Basi
M Sulaiman [mailto:[EMAIL PROTECTED]
Sent: 15 March 2004 08:37
To: [EMAIL PROTECTED]
Subject: Re: JNDI Datasource Reference in DD Not Necessary?
Hi Harry,
I've been trying to setup my mySQL connection to tomcat as well and
has
been reading a lot of documents on how to do this. I think I
Hi Harry,
I've been trying to setup my mySQL connection to tomcat as well and
has
been reading a lot of documents on how to do this. I think I'm getting
more
confused.
I've setup my params as you suggested below. When I ran my sample
app, I got the following exception:
javax.naming.NoInitialCo
All,
I was just about to ask a question like this thread's today... glad I
read the archives. ;)
I have an intersting observation in Tomcat 4.1.29. I found that my
resource-ref was misnamed in web.xml, so I decided to check it out. A
long time ago, I wrote a quick-and-dirty JNDI browser to hel
Hi Yoav
I am on a 24 hour response cycle at the moment, because my ISP is saving up
all the Tomcat-User emails and giving them to me once a day somewhere
between the time I go to bed and the time I get up!
This morning I had about 160 'new' messages :-)
> It allows the container to map your por
Hi,
>What I cannot figure out is: what does the 'resource-ref' element in
the
>deployment descriptor *actually* do?
It allows the container to map your portable descriptor in web.xml to
its specific instance in the container (which is defined in server.xml).
So resource-ref is the same for your
Hi Yoav
> I'm fairly sure you'd understand them just fine ;)
Well, I read both specs, the J2EE section 5.4 being the relevant one here,
and I am sorry to say but I think I am a little more confused now than
before!
It was good to see this bit of succinct code being sanctioned:
javax.sql.
> Sorry for my long absence - I was away from my computer for while.
No worries in that time I managed to get the test one working and also
the one that I need for my app (and posted my solution to the process in
detail as a semi-definitive way of making it work in TC 5)
The problem was I'd got s
Hi Yoav
Thanks for your message.
> I'm fairly sure you'd understand them just fine ;) It's SRV.9.11 in the
> Servlet Specification 2.4 and J2EE.5 in the J2EE Specification v1.4.
Okay, I shall look at those and see what happens :-)
> Even though in tomcat's current implementation resource-re
Hi Dave
Sorry for my long absence - I was away from my computer for while.
I think Doug's last message just about says it all in respect of connection
pools. Follow his advice to use the Tomcat How-Tos exactly as they are, and
you should be okay.
I looked through your code - the stuff you origin
Ok for completeness...
This morning with a fresh start I managed to get the connection
working... this is my solution (hope it is of use to someone) thanks for
all the help and tips people gave me.
Environment :
Fedora Core 1
Tomcat 5.0.19
Apache 2.x
Java 1.4.2_03
Without using the admin tool in
> i assume you have tomcat 5 and apache 2 linked together, right? If so, what
> connector did you use to link Apache 2 and Tomcat 5?
mod_jk2 but in this instance, i'm not using Apache and i'm calling my
test code via localhost:8080
--
David Smith <[EMAIL PROTECTED]>
-
> Well in the localhost directory I have an .xml for each Web App
in
> the system, it contains a context tag (going from memory at the moment as
> I'm not in front of the server)
>
This is a new feature in TC5
> > i defined the resource in server.xml.
>
> Guess that will be something for me to tr
omcat Users List'"
<[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 3:31 PM
Subject: RE: JNDI Datasource Reference in DD Not Necessary?
> > i have never heard of this config file:
> > $CATALINA_HOME/conf/Catalina/localhost/.xml
>
> Well in the localhost directory
> i have never heard of this config file:
> $CATALINA_HOME/conf/Catalina/localhost/.xml
Well in the localhost directory I have an .xml for each Web App in
the system, it contains a context tag (going from memory at the moment as
I'm not in front of the server)
> i defined the resource in server.x
uot;Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 1:52 PM
Subject: Re: JNDI Datasource Reference in DD Not Necessary?
> > that error looks like a name is specified incorrectly in web.xml file,
> > either the global name of the datasource or the local na
> that error looks like a name is specified incorrectly in web.xml file,
> either the global name of the datasource or the local name of that
> connection to the global data source more likely.
>
> the local instance of the global data source name should be specified
> explicity in a server.xml co
explicity in the web.xml file.
-paul.
- Original Message -
From: "David Smith" <[EMAIL PROTECTED]>
To: "Mark Matthews" <[EMAIL PROTECTED]>
Cc: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 1:26 PM
Subject: Re: JNDI Dat
> You don't want to do this, as Tomcat's DBCP doesn't wrap connection pool
> data sources currently (or if they do, I can't find it documented anywhere).
>
> If you follow the example given in the Tomcat documentation
> _to_the_letter_ things work out fine. Once you have _that_ working, then
> sta
Hi,
>I use Tomcat as a stand-alone server, but in the back of my mind I know
>there are J2EE specifications that Tomcat is adhering to which I am
likely
>not to understand.
I'm fairly sure you'd understand them just fine ;) It's SRV.9.11 in the
Servlet Specification 2.4 and J2EE.5 in the J2EE S
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Smith wrote:
>>Despite my posting - and I really hope someone chips in concerning the
>>question I raised about the being redundant in the
deployment
>>descriptor (!) - the first thing to say is, have faith!
>>
>>Connection pooling works, and it
arch 09, 2004 11:25 AM
>To: Tomcat Users List
>Subject: Re: JNDI Datasource Reference in DD Not Necessary?
>
>> Despite my posting - and I really hope someone chips in concerning
the
>> question I raised about the being redundant in the
>deployment
>> descriptor (!) -
Hi Yoav
> The documentation is updated, but of course no documentation set is ever
> perfect. If you have documentation patches, please suggest them in the
> usual format (http://jakarta.apache.org/site/source.html#Patches) as all
> our docs are in CVS
> (http://cvs.apache.org/viewcvs.cgi/jakarta
> Despite my posting - and I really hope someone chips in concerning the
> question I raised about the being redundant in the deployment
> descriptor (!) - the first thing to say is, have faith!
>
> Connection pooling works, and it is actually quite simple, so do not give up
> on it.
Cheers for
Hi Dave
Despite my posting - and I really hope someone chips in concerning the
question I raised about the being redundant in the deployment
descriptor (!) - the first thing to say is, have faith!
Connection pooling works, and it is actually quite simple, so do not give up
on it.
> I've tried h
JNDI Datasource Reference in DD Not Necessary?
Hi,
>I've spent the last couple of days familiarizing myself with the new
>5.0.19,
>especially the JNDI connection pooling. I tried, unsuccessfully, to
use
>the
>admin console to set up JDNI datasources as well as editing the xml
file
Hi,
>I've spent the last couple of days familiarizing myself with the new
>5.0.19,
>especially the JNDI connection pooling. I tried, unsuccessfully, to
use
>the
>admin console to set up JDNI datasources as well as editing the xml
files
>directly following the instructions in the documentation.
aniel Savard [mailto:[EMAIL PROTECTED]
Sent: Monday, March 08, 2004 9:53 PM
To: Tomcat Users List
Subject: Re: JNDI Datasource Reference in DD Not Necessary?
Doug,
I really hope someone will shed some light on this, because I struggle
to make my JNDI DataSource definition working properly with 5
I have to say I'm having a large number of issues with JNDI and MySQL
I'm using TC 5 on Fedora Core 1 with the JDBC / MySQL 3.1.1 Alpha
Connector (after I had no luck getting the 3.0.11 Stable connector
working either)
I've been looking at various how-to's and other doco on the whole thing
but do
CTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, March 08, 2004 3:37 PM
> Subject: JNDI Datasource Reference in DD Not Necessary?
>
>
> > Hello
> >
> > For some time now I have implemented the
-
From: "Harry Mantheakis" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 08, 2004 3:37 PM
Subject: JNDI Datasource Reference in DD Not Necessary?
> Hello
>
> For some time now I have implemented the Tomcat 'JNDI DataSource&
Hello
For some time now I have implemented the Tomcat 'JNDI DataSource' How-To on
connection pooling, and everything has been fine.
I define a resource in the context fragment:
...
And a resource reference to it in the deployment descriptor:
DB Conne
36 matches
Mail list logo