RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
I have been in learning mode about Resource/Context config for the last few weeks, mainly from the point of view of DBCP config. I did find all the alternatives confusing at first, but having read more and more docs, and getting some help from the good people on this list, I'm starting to get it

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Shapira, Yoav
: JNDI DataSource GlobalResources problem I have been in learning mode about Resource/Context config for the last few weeks, mainly from the point of view of DBCP config. I did find all the alternatives confusing at first, but having read more and more docs, and getting some help from the good

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
for me. Unless the spec changes -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday 28 October 2004 16:21 To: Tomcat Users List Subject: RE: JNDI DataSource GlobalResources problem Hi, Besides completely agreeing with Steve (so Benson, your time

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Shapira, Yoav
Hi, Don't know why I didn't think of it earlier really. I suppose it's because when you first try this, you google for something like servlet connection pooling, and get to various DBCP how-to pages, and away you go down that path, and get tied up with context.xml vs server.xml, META-INF/ vs

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Benson Margulies
I think that JNI is the only counter-example. Forgive me if the following is well know but seen as unimportant to all concerned. There is a JVM restriction: any given class with native members can only be loaded into one classloader of a JVM. So, if two webapps both try to include a native class,

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
about putting the DBCP jars in WEB-INF/lib? if so, wouldn't putting them in shared/lib instead solve it? -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Thursday 28 October 2004 20:47 To: Tomcat Users List Subject: RE: JNDI DataSource GlobalResources problem

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
28 October 2004 21:49 To: 'Tomcat Users List' Subject: RE: JNDI DataSource GlobalResources problem Benson, I read your post on classloading JNI classloading with interest. Certainly wasn't well-known to me. Only one question: counter-example to what? i.e. is there a configuration

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Benson Margulies
I'm reading this thread as the following meta-discussion. I may be confused. Steve and others: Help us, we've having trouble making global resources work due to poor documentation and problems deciding what to put in the 'common' classpath and what to put in the webapp class path. Yoav and

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Benson Margulies
Whoops, I missed a point: 'counter-example' to the general idea that anything you can do as a global resource you can do just as well as a per-web-app resource. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Ben Souther
Message- From: Steve Kirk [mailto:[EMAIL PROTECTED] Sent: Thursday 28 October 2004 21:49 To: 'Tomcat Users List' Subject: RE: JNDI DataSource GlobalResources problem Benson, I read your post on classloading JNI classloading with interest. Certainly wasn't well-known to me

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
October 2004 22:13 To: Tomcat Users List Subject: RE: JNDI DataSource GlobalResources problem There is a section in the release notes on JNI classes that are shared by multiple apps. I assume this is what he's talking about. What it boils down to is that you can't put multiple copies

RE: JNDI DataSource GlobalResources problem

2004-10-28 Thread Steve Kirk
Benson wrote: I'm reading this thread as the following meta-discussion. I may be confused. It's been a fairly long thread. You've got the jist though, except: I don't use global resources and I'm not for or against either them or per-webapp resources. I joined the thread to help someone

RE: JNDI DataSource GlobalResources problem

2004-10-27 Thread Steve Kirk
Yoav said (re: context.xml files): They're a TC-only feature. Other containers go about it different ways. and: Context.xml files are NOT designed to increase portability at all. They're a convenience feature. In fact, they're a sinkhole for beginners to REDUCE their portability in favor of

RE: JNDI DataSource GlobalResources problem

2004-10-27 Thread Benson Margulies
The specifications specify how a webapp declares the resources that it uses, but not how those resources are configured in the container and made accessible to the webapp. So, whatever we have in here is going to be tomcat-specific. The question is, are the arbiters of taste interested in

Re: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shinobu Kawai
Hi Roland, I'm trying to use the JNDI DataSource to administer my database-connections. But it seems like the DataSource doesn't get the properties I set. I get the following error: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
This type of bug crops up a lot on this list. The best answer seems to be to make sure you follow the instructions on this page _exactly_: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how to.html I assume that where you have x/y in your config file this is to hide

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
This question illustrates (IMHO) probably the biggest issue of confusion with regard to DBCP - that is, there are several XML elements that you can potentially use, and several places that you can potentially put them. Specifically, the Resource, ResourceParams and ResourceLink elements can go in

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
://www.yoavshapira.com -Original Message- From: Steve Kirk [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 8:58 AM To: 'Tomcat Users List' Subject: RE: JNDI DataSource GlobalResources problem This question illustrates (IMHO) probably the biggest issue of confusion with regard to DBCP

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread sven morales
Stever Kirk: Did I read that right, Resource nested inside GlobaNamingResource is not visible to the webapp? I thought that was the whole purpose to make it visible globally naming resources under GlobalNamingResource noh? If Im wrong I stand corrected.

RE: RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
, October 26, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: RE: JNDI DataSource GlobalResources problem Stever Kirk: Did I read that right, Resource nested inside GlobaNamingResource is not visible to the webapp? I thought that was the whole purpose to make it visible globally naming resources

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
/config/context.html#Resource %20Links -Original Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: Tuesday 26 October 2004 14:54 To: [EMAIL PROTECTED] Subject: RE: JNDI DataSource GlobalResources problem Stever Kirk: Did I read that right, Resource nested inside

Re: JNDI DataSource GlobalResources problem

2004-10-26 Thread Viorel Dragomir
Hi Review current docs from jakarta project regarding jndi config. I personally disagree with your conclusion, setting server.xml is not such a good idea. So here what I've done, maybe it will help you. First set the webapp/[your-app]/META-INF/context.xml context Resource

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
October 2004 16:18 To: Tomcat Users List Subject: Re: JNDI DataSource GlobalResources problem Hi Review current docs from jakarta project regarding jndi config. I personally disagree with your conclusion, setting server.xml is not such a good idea. So here what I've done, maybe

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
Hi, Actually I would like your approach better than mine if I could get it to work, because it would mean that the context config is located in a META-INF/context.xml only works on later versions of Tomcat. He might be using a later version than yours. Try 5.0.19 or later. I understood that

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
I'm using 5.0.28 - which I've been running for several months - but no joy. I'm getting the same SQLNestedException that Roland first reported at the start of this thread !! All I did was move my context config file from conf/Catalina/localhost/mywebapp.xml to

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
Hi, All I did was move my context config file from conf/Catalina/localhost/mywebapp.xml to webapps/mywebapp/META-INF/context.xml is there something I've missed? Yeah. The META-INF/context.xml is consulted when deploying a WAR. Just putting it there for an already deployed and

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
All I did was move my context config file from conf/Catalina/localhost/mywebapp.xml to webapps/mywebapp/META-INF/context.xml is there something I've missed? Yeah. The META-INF/context.xml is consulted when deploying a WAR. Just putting it there for an already deployed and

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
: RE: JNDI DataSource GlobalResources problem All I did was move my context config file from conf/Catalina/localhost/mywebapp.xml to webapps/mywebapp/META-INF/context.xml is there something I've missed? Yeah. The META-INF/context.xml is consulted when deploying a WAR. Just

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday 26 October 2004 17:48 To: Tomcat Users List Subject: RE: JNDI DataSource GlobalResources problem Hi, Nope, if you just use the unpacked directory structures to deploy, META-INF/context.xml will not be read. Yoav Shapira http

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Branko Peteh
: Tuesday, October 26, 2004 9:36 AM To: 'Tomcat Users List' Subject: RE: JNDI DataSource GlobalResources problem I'm using 5.0.28 - which I've been running for several months - but no joy. I'm getting the same SQLNestedException that Roland first reported at the start of this thread !! All I did

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
Hi, So, I am currently including my webapp's Context in conf/Catalina/localhost/mywebapp.xml, which is sub-optimal for 2 reasons: 1. it's outside the webapp directory 2. the path depends on the server configuration - not predictable These server-specific configuration files, unlike web.xml, are

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
to be designed to increase portability. Are they spec'd/recommended somewhere else than in the jsr154 docs, or are they in fact a TC feature? -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday 26 October 2004 18:11 To: Tomcat Users List Subject: RE: JNDI DataSource

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav
Hola, I also hadn't realised that the servlet spec does not require support for the unpacked mode that I have been using, and that only packed war files need to be supported. Where does the spec say this - I've looked at it again just now, but can't find it. It says it implicitly by only

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Benson Margulies
As a recent patcher of this document, I wish that I had made all the references to ResourceLink say 'of the Context or DefaultContext' element to stop people from accidently trying to put them into the Global... - To unsubscribe,

RE: RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Benson Margulies
Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: RE: JNDI DataSource GlobalResources problem Stever Kirk: Did I read that right, Resource nested inside GlobaNamingResource is not visible to the webapp? I thought

RE: RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
] Sent: Wednesday 27 October 2004 01:48 To: Tomcat Users List Subject: RE: RE: JNDI DataSource GlobalResources problem Webapps can only see GlobalNamingResource resources if there is a ResourceLink in the Context or DefaultContext. By default, the global context is only visible to global

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
Yoav - interesting points again. thanks :) It says it implicitly by only discussing packed WAR files as the only deployment method. Sorry if I'm being slow here, but which sections of the servlet spec talk about these deployment methods? I can't find anything on that in the spec - have