You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2004/11/01 20:41:39 UTC

cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java

epugh       2004/11/01 11:41:39

  Modified:    src/java/org/apache/turbine Turbine.java
  Log:
  don't read from classpath, but get real path
  
  Revision  Changes    Path
  1.50      +2 -2      jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java
  
  Index: Turbine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Turbine.java	1 Nov 2004 19:10:15 -0000	1.49
  +++ Turbine.java	1 Nov 2004 19:41:39 -0000	1.50
  @@ -758,7 +758,7 @@
               // descriptors to define what Valves are attached to it.
               String descriptorPath = configuration.getString(
                   "pipeline.default.descriptor", TurbinePipeline.CLASSIC_PIPELINE);
  -
  +            descriptorPath = getRealPath(descriptorPath);
               log.debug("Using descriptor path: " + descriptorPath);
               Reader reader = new BufferedReader(new FileReader(descriptorPath));
               XStream pipelineMapper = new XStream(new DomDriver()); // does not require XPP3 library
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


RE: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java

Posted by Eric Pugh <ep...@upstate.com>.
Thanks for the updated patch, applied nicely.   If you ever get around do
some unit tests for ConditionalValve, I would definetly backport that into
T2.4.

If you look at T2.4 you'll notice that it has many of the architectural
ideas of T3, including the Pipeline.  The big difference is that in T3 the
template code as in Fulcrum, whereas in T2.4 it remains integral to Turbine.
There may be some differeneces in small things, but at the big level, T2.4
and T3 should be pretty swappable..

Eric

> -----Original Message-----
> From: Youngho Cho [mailto:youngho@nannet.co.kr]
> Sent: Wednesday, November 03, 2004 1:23 AM
> To: Turbine Developers List
> Subject: Re: cvs commit:
> jakarta-turbine-3/src/java/org/apache/turbine Turbine.java
>
>
> Hello Eric,
>
> > I tossed in a bit of code about ConditioalValve and xstream,
> however, Scarab
> > doesn't use it, so it didn't get tested.
> >
> ConditionalValve can give a great flexiblity for pipeline.
> I hope to see some basic sample in somewhere Turbine3 or 2.4
>
> > Is there any reason you can't go to Turbine 2.4?  I know its a
> big change at
> > the template level, but Turbine 3 is a dead end.  As soon as
> Scarab is setup
> > on Turbine 2.4, my involvement in Turbine 3 will be done, and I'll be
> > pushing to remove Turbine 3 from Gump etc.
> >
> I am far from Turbine2.4. Since Turbine 3 introduce I never used
> Turbine 2.x.
> If Turbine 3 will be gone away, I will think the next at that time.
> Maybe it is foolish but it is my best at this moment.
>
> >
> > PS, I tried applying it, and it didn't go, can you double check
> you cut the
> > patch against the latest?
> >
> Yes, But I recreate the patch file. please refer to the attached file.
>
> Thanks,
>
> Youngho
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hello Eric,

> I tossed in a bit of code about ConditioalValve and xstream, however, Scarab
> doesn't use it, so it didn't get tested.
> 
ConditionalValve can give a great flexiblity for pipeline.
I hope to see some basic sample in somewhere Turbine3 or 2.4

> Is there any reason you can't go to Turbine 2.4?  I know its a big change at
> the template level, but Turbine 3 is a dead end.  As soon as Scarab is setup
> on Turbine 2.4, my involvement in Turbine 3 will be done, and I'll be
> pushing to remove Turbine 3 from Gump etc.
> 
I am far from Turbine2.4. Since Turbine 3 introduce I never used Turbine 2.x.
If Turbine 3 will be gone away, I will think the next at that time.
Maybe it is foolish but it is my best at this moment.

> 
> PS, I tried applying it, and it didn't go, can you double check you cut the
> patch against the latest?
> 
Yes, But I recreate the patch file. please refer to the attached file.

Thanks,

Youngho

RE: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java

Posted by Eric Pugh <ep...@upstate.com>.
Humm...   Glad you spoke up!  I assumed that the ONLY user of Turbine 3 was
Scarab, and that I was free to make changes to Turbine 3 to suit moving
Scarab to Turbine 2.4.

I tossed in a bit of code about ConditioalValve and xstream, however, Scarab
doesn't use it, so it didn't get tested.

Is there any reason you can't go to Turbine 2.4?  I know its a big change at
the template level, but Turbine 3 is a dead end.  As soon as Scarab is setup
on Turbine 2.4, my involvement in Turbine 3 will be done, and I'll be
pushing to remove Turbine 3 from Gump etc.

I personally would appreciate your coding skills helping me on T2.4!

Eric

PS, I tried applying it, and it didn't go, can you double check you cut the
patch against the latest?

> -----Original Message-----
> From: Youngho Cho [mailto:youngho@nannet.co.kr]
> Sent: Tuesday, November 02, 2004 3:29 AM
> To: Turbine Developers List
> Subject: Re: cvs commit:
> jakarta-turbine-3/src/java/org/apache/turbine Turbine.java
>
>
> Hi,
> I am very happy if we can get the pipeline descriptor from class loader.
> please look at the following patch.
>
> And, Does the xstream change support ConditionalValve ?
> I used the ConditionalValve extensively..
> But I am not sure how do I change to.
>
> Is there any pipeline sample using ConditionalValve  ?
>
>
> Thanks,
>
> Youngho
>
>
> Index: src/java/org/apache/turbine/Turbine.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-turbine-3/src/java/org/apache/turbine/Turb
> ine.java,v
> retrieving revision 1.50
> diff -r1.50 Turbine.java
> 61a62,63
> > import java.io.InputStream;
> > import java.io.InputStreamReader;
> 758a761
> >                       Reader reader =null;
> 761,763c764,774
> <             descriptorPath = getRealPath(descriptorPath);
> <             log.debug("Using descriptor path: " + descriptorPath);
> <             Reader reader = new BufferedReader(new
> FileReader(descriptorPath));
> ---
> >             InputStream inputStream =
> Turbine.class.getClassLoader().getResourceAsStream(descriptorPath);
> >             if(inputStream != null)
> >             {
> >                     reader = new BufferedReader(new
> InputStreamReader(inputStream));
> >             }
> >             else
> >             {
> >                 descriptorPath = getRealPath(descriptorPath);
> >                 reader = new BufferedReader(new
> FileReader(descriptorPath));
> >             }
> >             log.debug("Using descriptor path: " + descriptorPath)
>
> ----- Original Message -----
> From: <ep...@apache.org>
> To: <ja...@apache.org>
> Sent: Tuesday, November 02, 2004 4:41 AM
> Subject: cvs commit:
> jakarta-turbine-3/src/java/org/apache/turbine Turbine.java
>
>
> > epugh       2004/11/01 11:41:39
> >
> >   Modified:    src/java/org/apache/turbine Turbine.java
> >   Log:
> >   don't read from classpath, but get real path
> >
> >   Revision  Changes    Path
> >   1.50      +2 -2
> jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java
> >
> >   Index: Turbine.java
> >   ===================================================================
> >   RCS file:
> /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v
> >   retrieving revision 1.49
> >   retrieving revision 1.50
> >   diff -u -r1.49 -r1.50
> >   --- Turbine.java 1 Nov 2004 19:10:15 -0000 1.49
> >   +++ Turbine.java 1 Nov 2004 19:41:39 -0000 1.50
> >   @@ -758,7 +758,7 @@
> >                // descriptors to define what Valves are attached to it.
> >                String descriptorPath = configuration.getString(
> >                    "pipeline.default.descriptor",
> TurbinePipeline.CLASSIC_PIPELINE);
> >   -
> >   +            descriptorPath = getRealPath(descriptorPath);
> >                log.debug("Using descriptor path: " + descriptorPath);
> >                Reader reader = new BufferedReader(new
> FileReader(descriptorPath));
> >                XStream pipelineMapper = new XStream(new
> DomDriver()); // does not require XPP3 library
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java

Posted by Youngho Cho <yo...@nannet.co.kr>.
Hi,
I am very happy if we can get the pipeline descriptor from class loader.
please look at the following patch.

And, Does the xstream change support ConditionalValve ?
I used the ConditionalValve extensively.. 
But I am not sure how do I change to.

Is there any pipeline sample using ConditionalValve  ?


Thanks,

Youngho


Index: src/java/org/apache/turbine/Turbine.java
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.50
diff -r1.50 Turbine.java
61a62,63
> import java.io.InputStream;
> import java.io.InputStreamReader;
758a761
>                       Reader reader =null;
761,763c764,774
<             descriptorPath = getRealPath(descriptorPath);
<             log.debug("Using descriptor path: " + descriptorPath);
<             Reader reader = new BufferedReader(new FileReader(descriptorPath));
---
>             InputStream inputStream = Turbine.class.getClassLoader().getResourceAsStream(descriptorPath);
>             if(inputStream != null)
>             {
>                     reader = new BufferedReader(new InputStreamReader(inputStream));
>             }
>             else
>             {
>                 descriptorPath = getRealPath(descriptorPath);
>                 reader = new BufferedReader(new FileReader(descriptorPath));
>             }
>             log.debug("Using descriptor path: " + descriptorPath)

----- Original Message ----- 
From: <ep...@apache.org>
To: <ja...@apache.org>
Sent: Tuesday, November 02, 2004 4:41 AM
Subject: cvs commit: jakarta-turbine-3/src/java/org/apache/turbine Turbine.java


> epugh       2004/11/01 11:41:39
> 
>   Modified:    src/java/org/apache/turbine Turbine.java
>   Log:
>   don't read from classpath, but get real path
>   
>   Revision  Changes    Path
>   1.50      +2 -2      jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java
>   
>   Index: Turbine.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v
>   retrieving revision 1.49
>   retrieving revision 1.50
>   diff -u -r1.49 -r1.50
>   --- Turbine.java 1 Nov 2004 19:10:15 -0000 1.49
>   +++ Turbine.java 1 Nov 2004 19:41:39 -0000 1.50
>   @@ -758,7 +758,7 @@
>                // descriptors to define what Valves are attached to it.
>                String descriptorPath = configuration.getString(
>                    "pipeline.default.descriptor", TurbinePipeline.CLASSIC_PIPELINE);
>   -
>   +            descriptorPath = getRealPath(descriptorPath);
>                log.debug("Using descriptor path: " + descriptorPath);
>                Reader reader = new BufferedReader(new FileReader(descriptorPath));
>                XStream pipelineMapper = new XStream(new DomDriver()); // does not require XPP3 library
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org