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
: 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
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
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
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,
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
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
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
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
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
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
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
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
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
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'
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
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
://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
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.
, 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
/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
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
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
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
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
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
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
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
, 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
: 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
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
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
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
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,
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
]
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
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
37 matches
Mail list logo