You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Daniel Krieg <dk...@kc.rr.com> on 2002/10/17 00:19:26 UTC

Service Dependencies and qdox

If I have written an Abstract base class that a Phoenix Block will extend, and this base class depends on another service, will I need to place the @phoenix:dependency name=... in the base class or the subclass?

Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
On Thu, 17 Oct 2002 08:19, Daniel Krieg wrote:
> If I have written an Abstract base class that a Phoenix Block will extend,
> and this base class depends on another service, will I need to place the
> @phoenix:dependency name=... in the base class or the subclass?

The subclass. Cocoon had some problems wrt inherited metadata so we decided to 
avoid it when using xdoclet/qdox - at least for now.

-- 
Cheers,

Peter Donald
*------------------------------------------------*
| The student who is never required to do what   |
|  he cannot do never does what he can do.       |
|                       - John Stuart Mill       |
*------------------------------------------------*


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
*crack* goes the whip!

:)

On Mon, 21 Oct 2002 01:34, Paul Hammant wrote:
> Blimey,  burning hoops after hurdles after burning hoops after moving
> goalposts ;-)
>
> I'll see what I can do :-)
>
> -ph
>
>  --- Peter Donald <pe...@apache.org> wrote: > Paul,
>
> > Another thing I would love to see and have recently had the need for is a
> > slight refactoring of the QDox tasks. I would love to see that the QDox
> > tasks instead build a BlockInfo object and then a BlockInfoWriter is used
> > to write out the BlockInfo.
> >
> > That would be great and helpeful for the stuff I am working on ;)
> >
> > --
> > Cheers,
> >
> > Peter Donald
> > ----------------------------------------
> > Whatever you do will be insignificant,
> > but it is very important that you do it.
> >                               --Gandhi
> > ----------------------------------------
> >
> >
> > --
> > To unsubscribe, e-mail:  
> > <ma...@jakarta.apache.org> For additional
> > commands, e-mail: <ma...@jakarta.apache.org>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com

-- 
Cheers,

Peter Donald
Duct tape is like the force.  It has a light side, and a dark side, and
it binds the universe together ...
                -- Carl Zwanzig 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Paul Hammant <pa...@yahoo.com>.
Blimey,  burning hoops after hurdles after burning hoops after moving goalposts ;-)

I'll see what I can do :-)

-ph

 --- Peter Donald <pe...@apache.org> wrote: > Paul,
> 
> Another thing I would love to see and have recently had the need for is a 
> slight refactoring of the QDox tasks. I would love to see that the QDox tasks 
> instead build a BlockInfo object and then a BlockInfoWriter is used to write 
> out the BlockInfo. 
> 
> That would be great and helpeful for the stuff I am working on ;)
> 
> -- 
> Cheers,
> 
> Peter Donald
> ----------------------------------------
> Whatever you do will be insignificant, 
> but it is very important that you do it. 
>                               --Gandhi
> ---------------------------------------- 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
Paul,

Another thing I would love to see and have recently had the need for is a 
slight refactoring of the QDox tasks. I would love to see that the QDox tasks 
instead build a BlockInfo object and then a BlockInfoWriter is used to write 
out the BlockInfo. 

That would be great and helpeful for the stuff I am working on ;)

-- 
Cheers,

Peter Donald
----------------------------------------
Whatever you do will be insignificant, 
but it is very important that you do it. 
                              --Gandhi
---------------------------------------- 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
On Sat, 19 Oct 2002 19:06, Paul Hammant wrote:
> >@avalon.dependency role="my-service" name="o.a.a.MyService"
> >
> >does not seem to work anymore ...
>
> No probs.  I had not seen any use of it, so this a diff comparison
> between xdoclet /mategenerate generated files passed.
>
> Can you point me to some examples or email me Java and xinfo ?

Here are some snippets.

@avalon.dependency role="my-service" name="o.a.a.MyService" version="1.2"

should produce

<dependency>
  <role>my-service</role>
  <service name="o.a.a.MyService" version="1.2"/>
</dependency>

while 

@avalon.service name="o.a.a.MyService" version="1.2"

should produce

  <service name="o.a.a.MyService" version="1.2"/>

-- 
Cheers,

Peter Donald
-----------------------------------------------------------------------
|  I thought there was a knob on the TV to turn up the intelligence.  |
|      There's a knob called "brightness", but it doesn't work.       |
----------------------------------------------------------------------- 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Paul Hammant <Pa...@yahoo.com>.
Peter,

>>>So I guess drilling down for dependencies (and maybe services) is a
>>>good
>>>thing after all.
>>>      
>>>
>>this is about the use-case that i had. i think the main situations
>>where it may be useful will involve the block being a container
>>itself...
>>
>>paul, is that feasible with qdox?
>>    
>>
Yes.  I'll make it a taskdef attibute, inheritance="true" etc.

>While you are at it Paul ... ;)
>
>Previously with XDoclet it was possible to set the version of 
>service/dependency in doclet tags. So you could do something like
>
>@avalon.service name="o.a.a.MyService" version="1.2"
>
>But this seems to be have lost for both service and dependency stuff. If that 
>could be readded with unit tests that would be great ;)
>
>Also specifying an alternative role/lookup key like following
>
>@avalon.dependency role="my-service" name="o.a.a.MyService" 
>
>does not seem to work anymore ... 
>
No probs.  I had not seen any use of it, so this a diff comparison 
between xdoclet /mategenerate generated files passed.

Can you point me to some examples or email me Java and xinfo ?

Cheers,

- Paul

>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
On Sat, 19 Oct 2002 10:03, Peter Royal wrote:
> > So I guess drilling down for dependencies (and maybe services) is a
> > good
> > thing after all.
>
> this is about the use-case that i had. i think the main situations
> where it may be useful will involve the block being a container
> itself...
>
> paul, is that feasible with qdox?

While you are at it Paul ... ;)

Previously with XDoclet it was possible to set the version of 
service/dependency in doclet tags. So you could do something like

@avalon.service name="o.a.a.MyService" version="1.2"

But this seems to be have lost for both service and dependency stuff. If that 
could be readded with unit tests that would be great ;)

Also specifying an alternative role/lookup key like following

@avalon.dependency role="my-service" name="o.a.a.MyService" 

does not seem to work anymore ... 

-- 
Cheers,

Peter Donald
"All my life I wanted to be someone; I guess I should have been more 
specific."
-- Jane Wagner


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Royal <pr...@apache.org>.
On Friday, October 18, 2002, at 07:22  PM, Greg Steuck wrote:
>     Paul> It /could/ be recoded slightly to drill into parent classes
>     Paul> (qdox makes that easy), but I suspect there are more reasons
>     Paul> against than for.
>
> Hmm, I just found a good reason for:
>
> class AbstractFoo {
>       /**
>        * @phoenix:dependency name="MyService"
>        */
>       public void service(ServiceManager manager) {
>         // does everything service() needs to do for
>         // all extending classes
>       }
> }
>
> /**
>  * @phoenix:block
>  */
> class BlockFoo {
>    // No way I could find to specify dependencies here
>    // short of overriding service with a dummy one calling
>    // super.service()
> }
>
> So I guess drilling down for dependencies (and maybe services) is a 
> good
> thing after all.

this is about the use-case that i had. i think the main situations 
where it may be useful will involve the block being a container 
itself...

paul, is that feasible with qdox?
-pete


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Greg Steuck <gr...@nest.cx>.
>>>>> "Paul" == Paul Hammant <Pa...@yahoo.com> writes:

    Paul> Correct.  MetaGenerate (which uses QDox) will only process the
    Paul> service declarations etc from classes that are marked
    Paul> @phoenix:block.  In essence that means the subclasses only.


    Paul> It /could/ be recoded slightly to drill into parent classes
    Paul> (qdox makes that easy), but I suspect there are more reasons
    Paul> against than for.

Hmm, I just found a good reason for:

class AbstractFoo {
      /**
       * @phoenix:dependency name="MyService"
       */
      public void service(ServiceManager manager) {
        // does everything service() needs to do for
        // all extending classes
      }
}

/**
 * @phoenix:block
 */
class BlockFoo {
   // No way I could find to specify dependencies here
   // short of overriding service with a dummy one calling
   // super.service()
}

So I guess drilling down for dependencies (and maybe services) is a good
thing after all.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Royal <pr...@apache.org>.
On Thursday, October 17, 2002, at 02:12  AM, Paul Hammant wrote:
> It /could/ be recoded slightly to drill into parent classes (qdox 
> makes that easy), but I suspect there are more reasons against than 
> for.

It would be nice to have a @qdox:inherit value="true" or such tag that 
would control that behavior... Generally I wouldn't want such a thing, 
but sometimes...
-pete
-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Paul Hammant <Pa...@yahoo.com>.
Greg,

>>>>>>"Daniel" == Daniel Krieg <dk...@kc.rr.com> writes:
>>>>>>            
>>>>>>
>
>    Daniel> If I have written an Abstract base class that a Phoenix Block will extend, and this base class depends on another service, will I need to place the @phoenix:dependency name=... in the base class or the subclass?
>
>In my experience, the subclass (i.e. the one that will be referenced in
>block:class attribute). The real question is: will xdoclet (qdox now?)
>go hunting for @phoenix:dependency into parent classes? I believe the
>answer is "No".
>  
>
Correct.  MetaGenerate (which uses QDox) will only process the service 
declarations etc from classes that are marked @phoenix:block.  In 
essence that means the subclasses only.

It /could/ be recoded slightly to drill into parent classes (qdox makes 
that easy), but I suspect there are more reasons against than for.

-ph




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Peter Donald <pe...@apache.org>.
On Thu, 17 Oct 2002 11:34, Greg Steuck wrote:
> >>>>> "Daniel" == Daniel Krieg <dk...@kc.rr.com> writes:
>
>     Daniel> If I have written an Abstract base class that a Phoenix Block
> will extend, and this base class depends on another service, will I need to
> place the @phoenix:dependency name=... in the base class or the subclass?
>
> In my experience, the subclass (i.e. the one that will be referenced in
> block:class attribute). The real question is: will xdoclet (qdox now?)
> go hunting for @phoenix:dependency into parent classes? I believe the
> answer is "No".

Actually the answer is ... maybe ;) XDoclet used to but it relied on having 
the source for whole hierarchy and I believe QDox did to. It would be nice to 
have a binary format for metadata that sat next the files and thus make it 
always work. however I am not sure we actually need it ;)


-- 
Cheers,

Peter Donald
Doubt is not a pleasant condition, but certainty is absurd.
                -- Voltaire 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Greg Steuck <gr...@nest.cx>.
>>>>> "Daniel" == Daniel Krieg <dk...@kc.rr.com> writes:

    Daniel> If I have written an Abstract base class that a Phoenix Block will extend, and this base class depends on another service, will I need to place the @phoenix:dependency name=... in the base class or the subclass?

In my experience, the subclass (i.e. the one that will be referenced in
block:class attribute). The real question is: will xdoclet (qdox now?)
go hunting for @phoenix:dependency into parent classes? I believe the
answer is "No".

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Service Dependencies and qdox

Posted by Greg Steuck <gr...@nest.cx>.
>>>>> "Daniel" == Daniel Krieg <dk...@kc.rr.com> writes:

    Daniel> If I have written an Abstract base class that a Phoenix Block will extend, and this base class depends on another service, will I need to place the @phoenix:dependency name=... in the base class or the subclass?

In my experience, the subclass (i.e. the one that will be referenced in
block:class attribute). The real question is: will xdoclet (qdox now?)
go hunting for @phoenix:dependency into parent classes? I believe the
answer is "No".

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>