🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #428

Re: Help with JNDI Datasource in JBuilder 2006

#428
From: Tom
Date: Wed, 07 Dec 2005 04:21
81 lines
4771 bytes
Paul Furbacher [TeamB] wrote:
> 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 - thanks for all of your help and responses.

I think I have the server8080.xml file set up correctly and took your
advice to move the project to a directory structure that does not
contain embedded spaces.

You mention "I placed the resource def
in <Context> element in the server8080.xml, and referenced
it from the Spring app context xml file."

This may be the piece I am missing.  Does this only apply to Spring 
applications (app context file)?  I am using JSF (not Spring)and am 
placing the reference within the application web.xml file?  Is this correct?

thanks
Tom  cleveland,oh
Technical Details
Message-ID: <439662f1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <438a4e03$1@newsgroups.borland.com> <438be2d7$1@newsgroups.borland.com> <43939b56$1@newsgroups.borland.com> <4394a216$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: Tue, 06 Dec 2005 23:21:26 -0500
From: Tom <tom.butler@adephia.net>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
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> <4394a216$1@newsgroups.borland.com>
In-Reply-To: <4394a216$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68.235.63.81
Message-ID: <439662f1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1133929201 68.235.63.81 (6 Dec 2005 20:20:01 -0700)
Lines: 81
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail