Re: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Ted Husted

"Craig R. McClanahan" wrote:
> Ted, we probably need to mention this in the HTML docs -- the info that is
> in the DTD file comments will answer tons of user questions, but I'd bet

Will do. The resource page is also *way* over due. Have some time block
out again this weekend. Had some technical difficulties last week, so
didn't get much done, but things seem to be humming again. 

And congrats on the Web Services. I'll looking forward to taking the EA
for a spin. With you as the implementation engineer, I'm of course
expecting it all to work flawlessly :0)

-Ted.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Anthony Martin

My example shows a jdbc:odbc driver, but we use InterBase in development and
production.  I test as many drivers as I can set up.  Maybe I should check
out PostgreSQL.

There is no stack trace because the problem I'm experiencing is that calling
servlet.getServletContext().getAttribute("xxx") returns null.  I even tried
the deprecated findDataSource("xxx") method, I get the same result.

Out of curiosity, I added a break point to the ActionServlet
initApplicationDataSources() method (thanks to JBuilder5 from Borland,
http://www.borland.com/).

I stepped through the population of the DataSourceConfig array and found
that it only went though the first datasource.  So, I tried
findDataSource(null) and it worked as expected in that it returned a
not-null datasource.

So it appears the root problem is that initApplicationDataSources is not
stepping through all of the datasources listed in my struts-config.xml and
that putting only one data-source in there is a workaround.  Using PoolMan
is another workaround if I *have* to have multiple data-sources.

Hope this helps find the problem.


Anthony

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 12:11 PM
To: Struts Developers List
Subject: RE: cvs commit:
jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java




On Fri, 25 Jan 2002, Anthony Martin wrote:

> Date: Fri, 25 Jan 2002 11:59:43 -0800
> From: Anthony Martin <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: RE: cvs commit:
> jakarta-struts/src/share/org/apache/struts/config  ConfigRuleSet.java
>
> Yes, I totally missed it.

Reviewing the HTML docs, we don't have any mention of it, so this isn't
totally unexpected :-(.

>  Anyway, changing over to the set-properties
> allows my ActionServlet to start again, but the data-sources still don't
> actually work the way they used to.  It has something to do with the
> GenericDataSource finding the driver string null.
>

I take it you are using a recent nightly build?  It's been working for me
with GenericDataSource, talking to a Postgres database.  Could you post
the stack trace that you get at startup time?

One other thing to keep in mind is that the JDBC-ODBC driver isn't really
designed to deal with web-based applications -- it has thread safety
issues.  But that's a different issue than a startup failure.

> My choices are to drop back to the build that works and loose those nifty
> DynaBeans, or to check out PoolMan.  Just not sure about the Lesser GPL.
:P
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Craig R. McClanahan



On Fri, 25 Jan 2002, Anthony Martin wrote:

> Date: Fri, 25 Jan 2002 11:59:43 -0800
> From: Anthony Martin <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: RE: cvs commit:
> jakarta-struts/src/share/org/apache/struts/config  ConfigRuleSet.java
>
> Yes, I totally missed it.

Reviewing the HTML docs, we don't have any mention of it, so this isn't
totally unexpected :-(.

>  Anyway, changing over to the set-properties
> allows my ActionServlet to start again, but the data-sources still don't
> actually work the way they used to.  It has something to do with the
> GenericDataSource finding the driver string null.
>

I take it you are using a recent nightly build?  It's been working for me
with GenericDataSource, talking to a Postgres database.  Could you post
the stack trace that you get at startup time?

One other thing to keep in mind is that the JDBC-ODBC driver isn't really
designed to deal with web-based applications -- it has thread safety
issues.  But that's a different issue than a startup failure.

> My choices are to drop back to the build that works and loose those nifty
> DynaBeans, or to check out PoolMan.  Just not sure about the Lesser GPL.  :P
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Anthony Martin

Yes, I totally missed it.  Anyway, changing over to the set-properties
allows my ActionServlet to start again, but the data-sources still don't
actually work the way they used to.  It has something to do with the
GenericDataSource finding the driver string null.

My choices are to drop back to the build that works and loose those nifty
DynaBeans, or to check out PoolMan.  Just not sure about the Lesser GPL.  :P

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 11:44 AM
To: Struts Developers List
Subject: Re: cvs commit:
jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java




On Wed, 23 Jan 2002, Anthony Martin wrote:

> Date: Wed, 23 Jan 2002 14:01:41 -0800
> From: Anthony Martin <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Re: cvs commit:
> jakarta-struts/src/share/org/apache/struts/config  ConfigRuleSet.java
>
> How can data-source properties be deprecated in 1.0?  I didn't see any
> indication of that in either the examples or documentation or source code
> for that matter.
>

The "lib/struts-config_1_0.dtd" file (used to validate the format of your
configuration file) includes the following comment just above all the old
properties in the definition of the  element:

WARNING:  The use of these attributes is deprecated.  You
should use nested  elements to configure *all*
properties of your data source implementation.

> I know these documentation is hard to maintain,

Ted, we probably need to mention this in the HTML docs -- the info that is
in the DTD file comments will answer tons of user questions, but I'd bet
most users don't even know it is there.

> so what do I do?  Here's my
> guess:
>
> 
>   
>   
>   
>value="sun.jdbc.odbc.JdbcOdbcDriver" />
>   
>   
>   
>   
>   
> 
>

You've got it right.  And this works today with 1.0 and 1.0.1.

>
> Anthony
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Craig R. McClanahan



On Wed, 23 Jan 2002, Anthony Martin wrote:

> Date: Wed, 23 Jan 2002 14:01:41 -0800
> From: Anthony Martin <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Re: cvs commit:
> jakarta-struts/src/share/org/apache/struts/config  ConfigRuleSet.java
>
> How can data-source properties be deprecated in 1.0?  I didn't see any
> indication of that in either the examples or documentation or source code
> for that matter.
>

The "lib/struts-config_1_0.dtd" file (used to validate the format of your
configuration file) includes the following comment just above all the old
properties in the definition of the  element:

WARNING:  The use of these attributes is deprecated.  You
should use nested  elements to configure *all*
properties of your data source implementation.

> I know these documentation is hard to maintain,

Ted, we probably need to mention this in the HTML docs -- the info that is
in the DTD file comments will answer tons of user questions, but I'd bet
most users don't even know it is there.

> so what do I do?  Here's my
> guess:
>
> 
>   
>   
>   
>value="sun.jdbc.odbc.JdbcOdbcDriver" />
>   
>   
>   
>   
>   
> 
>

You've got it right.  And this works today with 1.0 and 1.0.1.

>
> Anthony
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: cvs commit: jakarta-struts/src/share/org/apache/struts/config ConfigRuleSet.java

2002-01-25 Thread Anthony Martin

How can data-source properties be deprecated in 1.0?  I didn't see any
indication of that in either the examples or documentation or source code
for that matter.

I know these documentation is hard to maintain, so what do I do?  Here's my
guess:














Anthony

--- Original Message ---
List: struts-dev
Subject:  cvs commit: jakarta-struts/src/share/org/apache/struts/config
ConfigRuleSet.java DataSourceConfig.ja
From: [EMAIL PROTECTED]
Date: 2002-01-16 17:42:40
[Download message RAW]

craigmcc02/01/16 09:42:40

  Modified:conf/share struts-config_1_1.dtd
   src/share/org/apache/struts/action ActionServlet.java
   src/share/org/apache/struts/config ConfigRuleSet.java
DataSourceConfig.java
  Log:
  Repair configuration of data sources so that it works with custom
  javax.sql.DataSource implementations again.
  
  Remove the  properties that we deprecated in 1.0; now,
everything
  about a data source is configured with  elements.
  
  Restore ActionServlet.initDataSources() -- but deprecate it -- in case
  existing apps are using this as a hook to perform their own
initialization.
  
  Revision  ChangesPath
  1.9   +6 -49 jakarta-struts/conf/share/struts-config_1_1.dtd
  
  Index: struts-config_1_1.dtd
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/struts-config_1_1.dtd,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- struts-config_1_1.dtd 15 Jan 2002 20:22:20 -  1.8
  +++ struts-config_1_1.dtd 16 Jan 2002 17:42:40 -  1.9
  @@ -11,7 +11,7 @@
  "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
  "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
   
  - $Id: struts-config_1_1.dtd,v 1.8 2002/01/15 20:22:20 craigmcc Exp $
  + $Id: struts-config_1_1.dtd,v 1.9 2002/01/16 17:42:40 craigmcc Exp $
   -->
   
   
  @@ -112,60 +112,17 @@
source will be stored.  Default is the value
specified
by string constant Action.DATA_SOURCE_KEY.
   
  - typeFully qualified Java class name of the
implementation
  - class (must implement javax.sql.DataSource).
Default
  - value is 'org.apache.struts.util.GenericDataSource'.
  -
  - NOTE:  The following attributes are defined by the default data
source
  - implementation, and only take effect for that class or subclasses of
  - that class.
  -
  - WARNING:  The use of these attributes is deprecated.  You should use
  - nested  elements to configure *all* properties
of
  - your data source implementation.
  -
  - autoCommit  The default auto-commit state for newly created
  - connections.
  -
  - description The description of this data source.
  -
  - driverClass The Java class name of the JDBC driver to be used.
  - [REQUIRED]
  -
  - loginTimeoutThe maximum number of seconds to wait for a
connection
  - to be created or returned.  Default is driver
dependent.
  -
  - maxCountThe maximum number of connections to be created.
  -
  - minCountThe minimum number of connections to be created.
  -
  - passwordThe database password to use when connecting.
[REQUIRED]
  -
  - readOnlyThe default read-only state for newly created
  - connections.
  -
  - url The JDBC URL to use when connecting. [REQUIRED]
  -
  - userThe database username to use when connecting.
[REQUIRED]
  -
  + typeFully qualified Java class name of the data source
  + implementation class.  This class must implement
  + "javax.sql.DataSource" and be configurable totally
  + from JavaBeans properties.
  + [org.apache.struts.util.GenericDataSource]
   -->
   
   
   
   
   
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -