I recall reading about a month ago that setting up of data-sources in
struts-config was purely for some backwards-compatability issue, and was no
longer advised.
I haven't bothered to do it.
I set up my data source in a server.xml context, and it works fine.
Like you I'd prefer to have server-wide scope on the data-source rather
than context scope, but I haven't spent any time on it yet.
One option may be to configure the data-source as part of the
DefaultContext. I believe all other contexts inherit from a DefaultContext
if one is configured - but like I said, I haven't tried it yet.
Regards,
John
[EMAIL PROTECTED]
Ph (09) 372-5010
|---------+---------------------------->
| | Koon Yue Lam |
| | <[EMAIL PROTECTED]|
| | om> |
| | |
| | 20/07/2004 01:54 |
| | PM |
| | Please respond to|
| | "Struts Users |
| | Mailing List" |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: Struts Users Mailing List <[EMAIL PROTECTED]>, Asif Rahman <[EMAIL
PROTECTED]> |
| cc:
|
| Subject: Re: Datasource problem again..
|
>--------------------------------------------------------------------------------------------------------------|
Yes, it helps and I know I can get it done if I set the context
element in server.xml,
but if I set the datasource in server.xml, do I need to set the
<datasource> in struts-config.xml again??
If I am right, I think if datasource is setup in server.xml, it has
the scope of entire Tomcat, that means all webapps can use that
datasource. Also it can be retrieved by JNDI.
If the datasource is setup in struts-config.xml, the scope becomes
struts only and is specific to only one webapp, and it can't be
retrieved by JNDI.
So I can setup datasource in both ways, setup in server.xml has much
more flexibilty and benifit from JNDI, why do I need to setup in
struts-config.xml??
once again, thanks, ^^
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]