Article View: borland.public.jbuilder.database
Article #426Re: Help with JNDI Datasource in JBuilder 2006
From: Paul Furbacher [TeamB]
Date: Mon, 05 Dec 2005 20:25
Date: Mon, 05 Dec 2005 20:25
73 lines
4324 bytes
4324 bytes
Tom wrote:
> No luck still - note I'm working on this issue now as a separate thread
> 'JNDI Connection Problem Thread' (in this newsgroup),
Yes, I responded to that before seeing this message.
> however, I wanted
> to mention that I took a look at the Bookstore code and saw that it does
> not use JNDI / Connection Pooling:
You are right. I was looking at it as an example
of how JBuilder writes the context config. Turns
out, I was confused about that too. Too much flipping
between different Web apps (TC 4.1.x and TC 5.5.x) in
order to contrast how JBuilder 2006 handles them.
> So this is not a good representative example. I think one reason why
> others have stumbled on this issue is that in TomCat 5.5, the JNDI
> context information is suppose to be located in /META-INF/context.xml. [...]
See my response to your message in the other thread. As I
mention there, I just re-configured the Spring JPetstore
demo to lookup a JNDI datasource. I placed the resource def
in <Context> element in the server8080.xml, and referenced
it from the Spring app context xml file. I edited the
server8080.xml file as described in the archives. It works.
Spring doesn't choke (to make it choke, I changed the resource
name in the server8080.xml file but didn't in the Spring app
context file so that it wouldn't find the resource in the JNDI
context; it choked alright).
> It would be good if there was a detailed step-by-step how to for
> setting up a JNDI datasource resource to support database connection
> pooling for JBuilder 2006, or, if Borland would set up the TomCat
> configuration files using the Tomcat standards (reference
> http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html)- this
> way, when users who understand TomCat have an issue, they will no which
> files to look in to troubleshoot - with Jbuilder, its a real mystery
> since within the IDE the TomCat configuration file standards are not
> followed (i.e., placing JNDI context information in /META-INF/context.xml.)
I think that the step-by-step how-to exists in the archives.
Perhaps it would be better if there were an article
at BDN about this. As for TC 5.5. docs, they do state
that it is not prohibited to place resource defs in
the server.xml file. It's just recommended not to
do that if you want to dynamically reload your context.
For dev purposes within JBuilder, I have found no
need to worry about this. Rather, for me, the Hot Swap
feature of the debugger is far more important, but again,
if I'm doing refactoring which introduces new methods
in classes which have already been loaded, I have to
restart the server. So, there's always going to be
a time during development when you've made a significant
change in the Web app and should really just restart it.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Technical Details
Message-ID:
<4394a216$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<438a4e03$1@newsgroups.borland.com> <438be2d7$1@newsgroups.borland.com> <43939b56$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,634e789a0dc75d45 X-Google-Attributes: gid1073da,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 05 Dec 2005 15:25:50 -0500 From: "Paul Furbacher [TeamB]" <pfurbacher@mac.com> Organization: Reverse Alchemy, Inc. User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.database Subject: Re: Help with JNDI Datasource in JBuilder 2006 References: <438a4e03$1@newsgroups.borland.com> <438be2d7$1@newsgroups.borland.com> <43939b56$1@newsgroups.borland.com> In-Reply-To: <43939b56$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.142.194.228 Message-ID: <4394a216$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133814294 69.142.194.228 (5 Dec 2005 12:24:54 -0700) Lines: 73 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail