You are viewing a plain text version of this content. The canonical link for it is here.
Posted to phoenix-dev@avalon.apache.org by Andrei Ivanov <my...@surfeu.fi> on 2002/06/11 14:10:30 UTC

Using Service / Component Selector in Phoenix

Hi,
I came across with simple problem (I think it is simple for experienced
Avalon developers) with my Phoenix-based application.

The problem is as follows:
I have phoenix service which contract is defined in interface

A. ServiceInterface

I have two different block which offer service A (in other words different
implementation for the same service):

Blocks
B. offers A
C. offers A

B and C should be configured and initialized differently as well as they
will depend on different services.

I would like to be able to specify which block will be used (B or C) to
provide service A changing only configuration (config.xml) file.
Can anyone give me example how to achieve that and what is the standard
practice for Phoenix-based application for this?

Regards,
Andrei



----- Original Message -----
From: "Peter Royal" <pr...@apache.org>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Monday, June 10, 2002 5:44 PM
Subject: Re: Constraints on dependencies


> On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
> > 1. Are constraints container specific or not?
> > 2. Is there a subset of constraints that are container agnostic?
> > 3. How do we represent constraints in the system? An opaque string? A
> > Configuration tree? An XPath expression?
> > 4. Do the providers or the Kernel validate the constraints?
> > 5. Do the providers get informed that they must conform to certain
> > constraints?
> > 6. Does validation occur at initialization time or assembly time?
> >
> > My answers would be;
>
> 1. Sometimes. I haven't seen any container-specific examples yet though ;)
> 2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
assembly
> 3. XPath or other evaluated expression :)
> 4. Kernel
> 5. No, but there may be cases where they need to be queried by the kernel
for
> constraint resolution (like the ORB example. the kernel will most likely
be
> unaware that its ORB component hosts others)
> 6. Both. As much as possible should be done at assembly, but I'm sure some
> must be defered to init time.
>
> > The problem is basically that in some cases it is going to be
practically
> > impossible for kernel to validate the constraint unless the provider
> > conforms to very specific contracts or is self validating.
>
> I agree. I'd opt more for the "specific contracts" option, which could be
as
> easy as exposing MetaInfo classes.
> -pete
>
> --
> peter royal -> proyal@apache.org
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


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


Re: Doesn't work Re: Using Service / Component Selector in Phoenix

Posted by Stephen McConnell <mc...@osm.net>.

Andrei Ivanov wrote:

>Hi Steve, thanks for answer. So far I am using solution when one have to
>modify assembly to switch between implementations. As you pointed out, I am
>using the following approach (let me quote whole picture to make things
>clear):
>
>assembly.xml
>
><block class="com.xxx.Main" name="main">
>    <provide name="block1" role="com.xxx.Service"/>
></block>
>
><block class="com.xxx.DefaultService1" name="block1">
>    ...
></block>
>
><block class="com.xxx.DefaultService2" name="block2">
>    ...
></block>
>-------------------------------------------------
>Main.xinfo
><blockinfo>
>
>  <services>
>    <service name="... contract.for.Main..." version="1.0"/>
>  </services>
>
>  <dependencies>
>    ...
>    <dependency>
>      <service name="com.xxx.Service" version="1.0"/>
>    </dependency>
>  </dependencies>
></blockinfo>
>
>-------------------------------------------------
>DefaultService1.xinfo
>
><blockinfo>
>
>  <services>
>    <service name="com.xxx.Service" version="1.0"/>
>  </services>
>
>  <dependencies>
>    ...
>  </dependencies>
></blockinfo>
>-------------------------------------------------
>DefaultService2.xinfo
><blockinfo>
>
>  <services>
>    <service name="com.xxx.Service" version="1.0"/>
>  </services>
>
>  <dependencies>
>    ...
>  </dependencies>
></blockinfo>
>-------------------------------------------------
>config.xml
><block1>...</block1>
><block2>...</block2>
>
>As you pointed, in this case to switch from "block1" to "block2" to be used
>by "main", one have to simply replace word "block1" with word  "block2" in
>provide clause of "main". So far so good.
>
>Two drawbacks:
>1. if there are many blocks which require "com.xxx.Service" to function, one
>have to replace block1 with block2 in every place in assembly. This is where
>mistakes can happen
>

Yep.

>2. someone who is implementing new block then must have some idea about how
>assembly.xml is constructed and this is bad (requires extra documentation
>and so on).
>

Yep.

>
>Therefore, it will not be bad if only changes in config will be necessary to
>add and select new block which provides com.xxx.Service. Then about second
>approach proposed in your reply:
>
>  
>
>>If you want to do this a composition time, then you would need to
>>declare "top-block" as dependent on two services (using different
>>role names) and during your initialization, your implementation
>>    
>>
>
>Let me "redraw" above, so that you may point if I am mistaken or not:
>
>top-block:
>assembly.xml
>
><block class="com.xxx.Main" name="main">
>    <provide name="top-block" role="com.xxx.TopBlock"/>
></block>
>
><block class="com.xxx.DefaultTopBlock" name="top-block">
>    <provide name="block1" role="role1"/>
>    <provide name="block2" role="role2"/>
></block>
>
>rest of assembly is the same, is it?
>

Correct.

>-------------------------------------------------
>Main.xinfo
>...
>    <dependency>
>      <service name="com.xxx.TopBlock" version="1.0"/>
>    </dependency>
>
>I think I may stop here since, as I see it already, it will not work.
>Because there is no way to fetch block1 or block2 inside Main, simply
>because it's component / service manger will not contain block1 or block2...
>

Phoenix can establish block1 and block2 and provide these to top-block. 
 The top-block implementation is basically acting as a proxy and 
directing requests to either block12 or block2 based on the 
configuration supplied policy.  As far as Phoenix is concerning, 
top-block is a perfectly valid cvandidate for supply the service to Main.

I don't see an issue (but I'm working on other things at the same time 
and my have just missing simothing important).

Cheers, Steve.

>
>Andrei
>
>----- Original Message -----
>From: "Stephen McConnell" <mc...@osm.net>
>To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
>Sent: Wednesday, June 12, 2002 12:59 AM
>Subject: Re: Doesn't work Re: Using Service / Component Selector in Phoenix
>
>
>  
>
>>Andrei Ivanov wrote:
>>
>>    
>>
>>>Hm, after closer look I see that this solution doesn't work.
>>>It just shows how to use other role names (that class name) but it
>>>      
>>>
>doesn't
>  
>
>>>tell how to select implementations :-(
>>>
>>>      
>>>
>>If I understand you correctly, you want to be able to select which block
>>implementation is going to provide a service to a dependent block.  The
>>routing of the provider to the dependent is declared in the assembly.xml
>>file.
>>
>>  <block class="myDependentBlockClassName" name="top-block" >
>>    <provide name="block-b" role="the-role-for-service-A"/>
>>  </block>
>>
>>This is telling Phoenix to use a block you have named as "blockB"
>>as the component provider of service A.  To switch between "block-a"
>>and "block-c" is basically a matter of updating the mapping in your
>>assembly.xml.
>>
>>If you want to do this a composition time, then you would need to
>>declare "top-block" as dependent on two services (using different
>>role names) and during your initialization, your implementation
>>selects which service it is going to use based on the information
>>contained in the configuration.
>>
>>Hope the helps.
>>
>>Cheers, Steve.
>>
>>
>>    
>>
>>>Andrei
>>>
>>>----- Original Message -----
>>>From: "Stephen McConnell" <mc...@osm.net>
>>>To: "Avalon-Phoenix Developers List"
>>>      
>>>
><av...@jakarta.apache.org>
>  
>
>>>Sent: Tuesday, June 11, 2002 4:03 PM
>>>Subject: Re: Using Service / Component Selector in Phoenix
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>The document
>>>>        
>>>>
>>>http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html
>>>      
>>>
>>>>contains a description of how to handle this inside Phoinix.
>>>>
>>>>Cheers, Steve.
>>>>
>>>>
>>>>Andrei Ivanov wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Hi,
>>>>>I came across with simple problem (I think it is simple for experienced
>>>>>Avalon developers) with my Phoenix-based application.
>>>>>
>>>>>The problem is as follows:
>>>>>I have phoenix service which contract is defined in interface
>>>>>
>>>>>A. ServiceInterface
>>>>>
>>>>>I have two different block which offer service A (in other words
>>>>>
>>>>>
>>>>>          
>>>>>
>>>different
>>>
>>>
>>>      
>>>
>>>>>implementation for the same service):
>>>>>
>>>>>Blocks
>>>>>B. offers A
>>>>>C. offers A
>>>>>
>>>>>B and C should be configured and initialized differently as well as
>>>>>          
>>>>>
>they
>  
>
>>>>>will depend on different services.
>>>>>
>>>>>I would like to be able to specify which block will be used (B or C) to
>>>>>provide service A changing only configuration (config.xml) file.
>>>>>Can anyone give me example how to achieve that and what is the standard
>>>>>practice for Phoenix-based application for this?
>>>>>
>>>>>Regards,
>>>>>Andrei
>>>>>
>>>>>
>>>>>
>>>>>----- Original Message -----
>>>>>From: "Peter Royal" <pr...@apache.org>
>>>>>To: "Avalon-Phoenix Developers List"
>>>>>
>>>>>
>>>>>          
>>>>>
>>><av...@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>>Sent: Monday, June 10, 2002 5:44 PM
>>>>>Subject: Re: Constraints on dependencies
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>1. Are constraints container specific or not?
>>>>>>>2. Is there a subset of constraints that are container agnostic?
>>>>>>>3. How do we represent constraints in the system? An opaque string? A
>>>>>>>Configuration tree? An XPath expression?
>>>>>>>4. Do the providers or the Kernel validate the constraints?
>>>>>>>5. Do the providers get informed that they must conform to certain
>>>>>>>constraints?
>>>>>>>6. Does validation occur at initialization time or assembly time?
>>>>>>>
>>>>>>>My answers would be;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>1. Sometimes. I haven't seen any container-specific examples yet
>>>>>>            
>>>>>>
>though
>  
>
>>>>>>            
>>>>>>
>>>;)
>>>
>>>
>>>      
>>>
>>>>>>2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>assembly
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>3. XPath or other evaluated expression :)
>>>>>>4. Kernel
>>>>>>5. No, but there may be cases where they need to be queried by the
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>kernel
>>>
>>>
>>>      
>>>
>>>>>>            
>>>>>>
>>>>>for
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>constraint resolution (like the ORB example. the kernel will most
>>>>>>            
>>>>>>
>likely
>  
>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>be
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>unaware that its ORB component hosts others)
>>>>>>6. Both. As much as possible should be done at assembly, but I'm sure
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>some
>>>
>>>
>>>      
>>>
>>>>>>must be defered to init time.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>The problem is basically that in some cases it is going to be
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>practically
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>>impossible for kernel to validate the constraint unless the provider
>>>>>>>conforms to very specific contracts or is self validating.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>I agree. I'd opt more for the "specific contracts" option, which could
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>be
>>>
>>>
>>>      
>>>
>>>>>>            
>>>>>>
>>>>>as
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>easy as exposing MetaInfo classes.
>>>>>>-pete
>>>>>>
>>>>>>--
>>>>>>peter royal -> proyal@apache.org
>>>>>>
>>>>>>--
>>>>>>To unsubscribe, e-mail:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>><ma...@jakarta.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>For additional commands, e-mail:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>><ma...@jakarta.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>To unsubscribe, e-mail:
>>>>>
>>>>>
>>>>>          
>>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>>For additional commands, e-mail:
>>>>>
>>>>>
>>>>>          
>>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>>
>>>>>          
>>>>>
>>>>--
>>>>
>>>>Stephen J. McConnell
>>>>
>>>>OSM SARL
>>>>digital products for a global economy
>>>>mailto:mcconnell@osm.net
>>>>http://www.osm.net
>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>For additional commands, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>For additional commands, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>
>>>      
>>>
>>--
>>
>>Stephen J. McConnell
>>
>>OSM SARL
>>digital products for a global economy
>>mailto:mcconnell@osm.net
>>http://www.osm.net
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


Re: Doesn't work Re: Using Service / Component Selector in Phoenix

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi Steve, thanks for answer. So far I am using solution when one have to
modify assembly to switch between implementations. As you pointed out, I am
using the following approach (let me quote whole picture to make things
clear):

assembly.xml

<block class="com.xxx.Main" name="main">
    <provide name="block1" role="com.xxx.Service"/>
</block>

<block class="com.xxx.DefaultService1" name="block1">
    ...
</block>

<block class="com.xxx.DefaultService2" name="block2">
    ...
</block>
-------------------------------------------------
Main.xinfo
<blockinfo>

  <services>
    <service name="... contract.for.Main..." version="1.0"/>
  </services>

  <dependencies>
    ...
    <dependency>
      <service name="com.xxx.Service" version="1.0"/>
    </dependency>
  </dependencies>
</blockinfo>

-------------------------------------------------
DefaultService1.xinfo

<blockinfo>

  <services>
    <service name="com.xxx.Service" version="1.0"/>
  </services>

  <dependencies>
    ...
  </dependencies>
</blockinfo>
-------------------------------------------------
DefaultService2.xinfo
<blockinfo>

  <services>
    <service name="com.xxx.Service" version="1.0"/>
  </services>

  <dependencies>
    ...
  </dependencies>
</blockinfo>
-------------------------------------------------
config.xml
<block1>...</block1>
<block2>...</block2>

As you pointed, in this case to switch from "block1" to "block2" to be used
by "main", one have to simply replace word "block1" with word  "block2" in
provide clause of "main". So far so good.

Two drawbacks:
1. if there are many blocks which require "com.xxx.Service" to function, one
have to replace block1 with block2 in every place in assembly. This is where
mistakes can happen
2. someone who is implementing new block then must have some idea about how
assembly.xml is constructed and this is bad (requires extra documentation
and so on).

Therefore, it will not be bad if only changes in config will be necessary to
add and select new block which provides com.xxx.Service. Then about second
approach proposed in your reply:

> If you want to do this a composition time, then you would need to
> declare "top-block" as dependent on two services (using different
> role names) and during your initialization, your implementation

Let me "redraw" above, so that you may point if I am mistaken or not:

top-block:
assembly.xml

<block class="com.xxx.Main" name="main">
    <provide name="top-block" role="com.xxx.TopBlock"/>
</block>

<block class="com.xxx.DefaultTopBlock" name="top-block">
    <provide name="block1" role="role1"/>
    <provide name="block2" role="role2"/>
</block>

rest of assembly is the same, is it?
-------------------------------------------------
Main.xinfo
...
    <dependency>
      <service name="com.xxx.TopBlock" version="1.0"/>
    </dependency>

I think I may stop here since, as I see it already, it will not work.
Because there is no way to fetch block1 or block2 inside Main, simply
because it's component / service manger will not contain block1 or block2...

Andrei

----- Original Message -----
From: "Stephen McConnell" <mc...@osm.net>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Wednesday, June 12, 2002 12:59 AM
Subject: Re: Doesn't work Re: Using Service / Component Selector in Phoenix


>
>
> Andrei Ivanov wrote:
>
> >Hm, after closer look I see that this solution doesn't work.
> >It just shows how to use other role names (that class name) but it
doesn't
> >tell how to select implementations :-(
> >
>
> If I understand you correctly, you want to be able to select which block
> implementation is going to provide a service to a dependent block.  The
> routing of the provider to the dependent is declared in the assembly.xml
> file.
>
>   <block class="myDependentBlockClassName" name="top-block" >
>     <provide name="block-b" role="the-role-for-service-A"/>
>   </block>
>
> This is telling Phoenix to use a block you have named as "blockB"
> as the component provider of service A.  To switch between "block-a"
> and "block-c" is basically a matter of updating the mapping in your
> assembly.xml.
>
> If you want to do this a composition time, then you would need to
> declare "top-block" as dependent on two services (using different
> role names) and during your initialization, your implementation
> selects which service it is going to use based on the information
> contained in the configuration.
>
> Hope the helps.
>
> Cheers, Steve.
>
>
> >
> >Andrei
> >
> >----- Original Message -----
> >From: "Stephen McConnell" <mc...@osm.net>
> >To: "Avalon-Phoenix Developers List"
<av...@jakarta.apache.org>
> >Sent: Tuesday, June 11, 2002 4:03 PM
> >Subject: Re: Using Service / Component Selector in Phoenix
> >
> >
> >
> >
> >>The document
>
>>http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html
> >>contains a description of how to handle this inside Phoinix.
> >>
> >>Cheers, Steve.
> >>
> >>
> >>Andrei Ivanov wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>I came across with simple problem (I think it is simple for experienced
> >>>Avalon developers) with my Phoenix-based application.
> >>>
> >>>The problem is as follows:
> >>>I have phoenix service which contract is defined in interface
> >>>
> >>>A. ServiceInterface
> >>>
> >>>I have two different block which offer service A (in other words
> >>>
> >>>
> >different
> >
> >
> >>>implementation for the same service):
> >>>
> >>>Blocks
> >>>B. offers A
> >>>C. offers A
> >>>
> >>>B and C should be configured and initialized differently as well as
they
> >>>will depend on different services.
> >>>
> >>>I would like to be able to specify which block will be used (B or C) to
> >>>provide service A changing only configuration (config.xml) file.
> >>>Can anyone give me example how to achieve that and what is the standard
> >>>practice for Phoenix-based application for this?
> >>>
> >>>Regards,
> >>>Andrei
> >>>
> >>>
> >>>
> >>>----- Original Message -----
> >>>From: "Peter Royal" <pr...@apache.org>
> >>>To: "Avalon-Phoenix Developers List"
> >>>
> >>>
> ><av...@jakarta.apache.org>
> >
> >
> >>>Sent: Monday, June 10, 2002 5:44 PM
> >>>Subject: Re: Constraints on dependencies
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>1. Are constraints container specific or not?
> >>>>>2. Is there a subset of constraints that are container agnostic?
> >>>>>3. How do we represent constraints in the system? An opaque string? A
> >>>>>Configuration tree? An XPath expression?
> >>>>>4. Do the providers or the Kernel validate the constraints?
> >>>>>5. Do the providers get informed that they must conform to certain
> >>>>>constraints?
> >>>>>6. Does validation occur at initialization time or assembly time?
> >>>>>
> >>>>>My answers would be;
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>1. Sometimes. I haven't seen any container-specific examples yet
though
> >>>>
> >>>>
> >;)
> >
> >
> >>>>2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
> >>>>
> >>>>
> >>>>
> >>>>
> >>>assembly
> >>>
> >>>
> >>>
> >>>
> >>>>3. XPath or other evaluated expression :)
> >>>>4. Kernel
> >>>>5. No, but there may be cases where they need to be queried by the
> >>>>
> >>>>
> >kernel
> >
> >
> >>>>
> >>>>
> >>>for
> >>>
> >>>
> >>>
> >>>
> >>>>constraint resolution (like the ORB example. the kernel will most
likely
> >>>>
> >>>>
> >>>>
> >>>>
> >>>be
> >>>
> >>>
> >>>
> >>>
> >>>>unaware that its ORB component hosts others)
> >>>>6. Both. As much as possible should be done at assembly, but I'm sure
> >>>>
> >>>>
> >some
> >
> >
> >>>>must be defered to init time.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>The problem is basically that in some cases it is going to be
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>practically
> >>>
> >>>
> >>>
> >>>
> >>>>>impossible for kernel to validate the constraint unless the provider
> >>>>>conforms to very specific contracts or is self validating.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>I agree. I'd opt more for the "specific contracts" option, which could
> >>>>
> >>>>
> >be
> >
> >
> >>>>
> >>>>
> >>>as
> >>>
> >>>
> >>>
> >>>
> >>>>easy as exposing MetaInfo classes.
> >>>>-pete
> >>>>
> >>>>--
> >>>>peter royal -> proyal@apache.org
> >>>>
> >>>>--
> >>>>To unsubscribe, e-mail:
> >>>>
> >>>>
> >>>>
> >>>>
> >>><ma...@jakarta.apache.org>
> >>>
> >>>
> >>>
> >>>
> >>>>For additional commands, e-mail:
> >>>>
> >>>>
> >>>>
> >>>>
> >>><ma...@jakarta.apache.org>
> >>>
> >>>
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>>
> >>>
> ><ma...@jakarta.apache.org>
> >
> >
> >>>For additional commands, e-mail:
> >>>
> >>>
> ><ma...@jakarta.apache.org>
> >
> >
> >>>
> >>>
> >>>
> >>--
> >>
> >>Stephen J. McConnell
> >>
> >>OSM SARL
> >>digital products for a global economy
> >>mailto:mcconnell@osm.net
> >>http://www.osm.net
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
> --
>
> Stephen J. McConnell
>
> OSM SARL
> digital products for a global economy
> mailto:mcconnell@osm.net
> http://www.osm.net
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



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


Re: Doesn't work Re: Using Service / Component Selector in Phoenix

Posted by Stephen McConnell <mc...@osm.net>.

Andrei Ivanov wrote:

>Hm, after closer look I see that this solution doesn't work.
>It just shows how to use other role names (that class name) but it doesn't
>tell how to select implementations :-(
>

If I understand you correctly, you want to be able to select which block 
implementation is going to provide a service to a dependent block.  The 
routing of the provider to the dependent is declared in the assembly.xml 
file.

  <block class="myDependentBlockClassName" name="top-block" >
    <provide name="block-b" role="the-role-for-service-A"/>
  </block>

This is telling Phoenix to use a block you have named as "blockB" 
as the component provider of service A.  To switch between "block-a" 
and "block-c" is basically a matter of updating the mapping in your 
assembly.xml.

If you want to do this a composition time, then you would need to 
declare "top-block" as dependent on two services (using different 
role names) and during your initialization, your implementation 
selects which service it is going to use based on the information
contained in the configuration.

Hope the helps.

Cheers, Steve.


>
>Andrei
>
>----- Original Message -----
>From: "Stephen McConnell" <mc...@osm.net>
>To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
>Sent: Tuesday, June 11, 2002 4:03 PM
>Subject: Re: Using Service / Component Selector in Phoenix
>
>
>  
>
>>The document
>>http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html
>>contains a description of how to handle this inside Phoinix.
>>
>>Cheers, Steve.
>>
>>
>>Andrei Ivanov wrote:
>>
>>    
>>
>>>Hi,
>>>I came across with simple problem (I think it is simple for experienced
>>>Avalon developers) with my Phoenix-based application.
>>>
>>>The problem is as follows:
>>>I have phoenix service which contract is defined in interface
>>>
>>>A. ServiceInterface
>>>
>>>I have two different block which offer service A (in other words
>>>      
>>>
>different
>  
>
>>>implementation for the same service):
>>>
>>>Blocks
>>>B. offers A
>>>C. offers A
>>>
>>>B and C should be configured and initialized differently as well as they
>>>will depend on different services.
>>>
>>>I would like to be able to specify which block will be used (B or C) to
>>>provide service A changing only configuration (config.xml) file.
>>>Can anyone give me example how to achieve that and what is the standard
>>>practice for Phoenix-based application for this?
>>>
>>>Regards,
>>>Andrei
>>>
>>>
>>>
>>>----- Original Message -----
>>>From: "Peter Royal" <pr...@apache.org>
>>>To: "Avalon-Phoenix Developers List"
>>>      
>>>
><av...@jakarta.apache.org>
>  
>
>>>Sent: Monday, June 10, 2002 5:44 PM
>>>Subject: Re: Constraints on dependencies
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
>>>>
>>>>
>>>>        
>>>>
>>>>>1. Are constraints container specific or not?
>>>>>2. Is there a subset of constraints that are container agnostic?
>>>>>3. How do we represent constraints in the system? An opaque string? A
>>>>>Configuration tree? An XPath expression?
>>>>>4. Do the providers or the Kernel validate the constraints?
>>>>>5. Do the providers get informed that they must conform to certain
>>>>>constraints?
>>>>>6. Does validation occur at initialization time or assembly time?
>>>>>
>>>>>My answers would be;
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>1. Sometimes. I haven't seen any container-specific examples yet though
>>>>        
>>>>
>;)
>  
>
>>>>2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
>>>>
>>>>
>>>>        
>>>>
>>>assembly
>>>
>>>
>>>      
>>>
>>>>3. XPath or other evaluated expression :)
>>>>4. Kernel
>>>>5. No, but there may be cases where they need to be queried by the
>>>>        
>>>>
>kernel
>  
>
>>>>        
>>>>
>>>for
>>>
>>>
>>>      
>>>
>>>>constraint resolution (like the ORB example. the kernel will most likely
>>>>
>>>>
>>>>        
>>>>
>>>be
>>>
>>>
>>>      
>>>
>>>>unaware that its ORB component hosts others)
>>>>6. Both. As much as possible should be done at assembly, but I'm sure
>>>>        
>>>>
>some
>  
>
>>>>must be defered to init time.
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>The problem is basically that in some cases it is going to be
>>>>>
>>>>>
>>>>>          
>>>>>
>>>practically
>>>
>>>
>>>      
>>>
>>>>>impossible for kernel to validate the constraint unless the provider
>>>>>conforms to very specific contracts or is self validating.
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>I agree. I'd opt more for the "specific contracts" option, which could
>>>>        
>>>>
>be
>  
>
>>>>        
>>>>
>>>as
>>>
>>>
>>>      
>>>
>>>>easy as exposing MetaInfo classes.
>>>>-pete
>>>>
>>>>--
>>>>peter royal -> proyal@apache.org
>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>      
>>>
>>>>For additional commands, e-mail:
>>>>
>>>>
>>>>        
>>>>
>>><ma...@jakarta.apache.org>
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>For additional commands, e-mail:
>>>      
>>>
><ma...@jakarta.apache.org>
>  
>
>>>
>>>      
>>>
>>--
>>
>>Stephen J. McConnell
>>
>>OSM SARL
>>digital products for a global economy
>>mailto:mcconnell@osm.net
>>http://www.osm.net
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


Doesn't work Re: Using Service / Component Selector in Phoenix

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hm, after closer look I see that this solution doesn't work.
It just shows how to use other role names (that class name) but it doesn't
tell how to select implementations :-(

Andrei

----- Original Message -----
From: "Stephen McConnell" <mc...@osm.net>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Tuesday, June 11, 2002 4:03 PM
Subject: Re: Using Service / Component Selector in Phoenix


>
>
> The document
> http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html
> contains a description of how to handle this inside Phoinix.
>
> Cheers, Steve.
>
>
> Andrei Ivanov wrote:
>
> >Hi,
> >I came across with simple problem (I think it is simple for experienced
> >Avalon developers) with my Phoenix-based application.
> >
> >The problem is as follows:
> >I have phoenix service which contract is defined in interface
> >
> >A. ServiceInterface
> >
> >I have two different block which offer service A (in other words
different
> >implementation for the same service):
> >
> >Blocks
> >B. offers A
> >C. offers A
> >
> >B and C should be configured and initialized differently as well as they
> >will depend on different services.
> >
> >I would like to be able to specify which block will be used (B or C) to
> >provide service A changing only configuration (config.xml) file.
> >Can anyone give me example how to achieve that and what is the standard
> >practice for Phoenix-based application for this?
> >
> >Regards,
> >Andrei
> >
> >
> >
> >----- Original Message -----
> >From: "Peter Royal" <pr...@apache.org>
> >To: "Avalon-Phoenix Developers List"
<av...@jakarta.apache.org>
> >Sent: Monday, June 10, 2002 5:44 PM
> >Subject: Re: Constraints on dependencies
> >
> >
> >
> >
> >>On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
> >>
> >>
> >>>1. Are constraints container specific or not?
> >>>2. Is there a subset of constraints that are container agnostic?
> >>>3. How do we represent constraints in the system? An opaque string? A
> >>>Configuration tree? An XPath expression?
> >>>4. Do the providers or the Kernel validate the constraints?
> >>>5. Do the providers get informed that they must conform to certain
> >>>constraints?
> >>>6. Does validation occur at initialization time or assembly time?
> >>>
> >>>My answers would be;
> >>>
> >>>
> >>1. Sometimes. I haven't seen any container-specific examples yet though
;)
> >>2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
> >>
> >>
> >assembly
> >
> >
> >>3. XPath or other evaluated expression :)
> >>4. Kernel
> >>5. No, but there may be cases where they need to be queried by the
kernel
> >>
> >>
> >for
> >
> >
> >>constraint resolution (like the ORB example. the kernel will most likely
> >>
> >>
> >be
> >
> >
> >>unaware that its ORB component hosts others)
> >>6. Both. As much as possible should be done at assembly, but I'm sure
some
> >>must be defered to init time.
> >>
> >>
> >>
> >>>The problem is basically that in some cases it is going to be
> >>>
> >>>
> >practically
> >
> >
> >>>impossible for kernel to validate the constraint unless the provider
> >>>conforms to very specific contracts or is self validating.
> >>>
> >>>
> >>I agree. I'd opt more for the "specific contracts" option, which could
be
> >>
> >>
> >as
> >
> >
> >>easy as exposing MetaInfo classes.
> >>-pete
> >>
> >>--
> >>peter royal -> proyal@apache.org
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >>For additional commands, e-mail:
> >>
> >>
> ><ma...@jakarta.apache.org>
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> >For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
> --
>
> Stephen J. McConnell
>
> OSM SARL
> digital products for a global economy
> mailto:mcconnell@osm.net
> http://www.osm.net
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



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


Re: Installer? Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Peter Royal <pr...@apache.org>.
On Wednesday 12 June 2002 02:30 am, Andrei Ivanov wrote:
> > road at least. Its something that would be useful over here (for now our
> > installer will add the blocks and modify files as needed).
>
> What installer your referring?

InstallAnywhere. The new v5 release will allow easy modification of text and 
xml documents inside of a jar.
-pete

-- 
peter royal -> proyal@apache.org

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


Installer? Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Andrei Ivanov <my...@surfeu.fi>.
Peter, 

> road at least. Its something that would be useful over here (for now our 
> installer will add the blocks and modify files as needed).

What installer your referring?  

Andrei



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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Peter Royal <pr...@apache.org>.
On Tuesday 11 June 2002 06:14 pm, Stephen McConnell wrote:
> > If I want to augment the running .sar without messing with it?
> > IE: any proposals?
>
> Ohh ... hot blocks!
> Not available in the current Phoenix version - but very desirable.
> Someone was talking/working on that recently - could be a good idea to
> check the Phoenix mail archive.  I can't remember who it was but I'm
> sure it was sometime in the last 4-6 weeks.

I may end up implementing it in the future, but thats a month or two down the 
road at least. Its something that would be useful over here (for now our 
installer will add the blocks and modify files as needed).
-pete

-- 
peter royal -> proyal@apache.org

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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi and thanks for response.

> >>>  would normally be added to the SAR-INF/lib directory and your
application redeployed

In this case I have to teach a customer how to build sar... Requires a lot
of documentation...
What are the options of adding new block (in jar) file to already deployed
Phoenix application.
I see the following choices:
1. add it to phoenix/lib - this will not always work
2. look for some location where this jar can be found (e.g. inside SAR-INF
etc).
Other ideas?

> p.s. There is nothing to stop you putting in place a block that does
> active loading of pluggable components.

Can not say anything before I've tried this, but as I see it, this way new
components will not be phoenix blocks any more and it will not be possible
to manage them via assembly.xml and config.xml.


Andrei

----- Original Message -----
From: "Stephen McConnell" <mc...@osm.net>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Wednesday, June 12, 2002 1:30 AM
Subject: Re: How to add new blocks (jars) to existing phoenix application
(sar)


>
>
> Stephen McConnell wrote:
>
> >
> >
> > Nicola Ken Barozzi wrote:
> >
> >>
> >>
> >> Stephen McConnell wrote:
> >>
> >>>
> >>>
> >>> Andrei Ivanov wrote:
> >>>
> >>>> Hi,
> >>>> suppose I have Phoenix application in sar file. Suppose someone
> >>>> else can
> >>>> write new block for my application (and add it by modifying
> >>>> assembly.xml and
> >>>> config.xml)
> >>>> The question is: how this new block (extra jar) can be included into
> >>>> existing application (if not in sar, where new block can be placed
> >>>> under
> >>>> SAR-INF or under phoenix-lib, latter imho is not good)?
> >>>>
> >>>> Andrei
> >>>>
> >>>
> >>> The new block (preumably packaged as a jar file) would normally be
> >>> added to the SAR-INF/lib directory and your application redeployed
> >>> as a new .sar file containing the additional .jar file.
> >>
> >>
> >>
> >> Which is not really plug 'n pray...
> >>
> >> If I want to augment the running .sar without messing with it?
> >> IE: any proposals?
> >
> >
> >
> > Ohh ... hot blocks!
> > Not available in the current Phoenix version - but very desirable.
> > Someone was talking/working on that recently - could be a good idea to
> > check the Phoenix mail archive.  I can't remember who it was but I'm
> > sure it was sometime in the last 4-6 weeks.
> >
> > Cheers, Steve.
>
>
> p.s. There is nothing to stop you putting in place a block that does
> active loading of pluggable components.
>
> SJM
>
> --
>
> Stephen J. McConnell
>
> OSM SARL
> digital products for a global economy
> mailto:mcconnell@osm.net
> http://www.osm.net
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>



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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Stephen McConnell <mc...@osm.net>.

Stephen McConnell wrote:

>
>
> Nicola Ken Barozzi wrote:
>
>>
>>
>> Stephen McConnell wrote:
>>
>>>
>>>
>>> Andrei Ivanov wrote:
>>>
>>>> Hi,
>>>> suppose I have Phoenix application in sar file. Suppose someone 
>>>> else can
>>>> write new block for my application (and add it by modifying 
>>>> assembly.xml and
>>>> config.xml)
>>>> The question is: how this new block (extra jar) can be included into
>>>> existing application (if not in sar, where new block can be placed 
>>>> under
>>>> SAR-INF or under phoenix-lib, latter imho is not good)?
>>>>
>>>> Andrei
>>>>
>>>
>>> The new block (preumably packaged as a jar file) would normally be 
>>> added to the SAR-INF/lib directory and your application redeployed 
>>> as a new .sar file containing the additional .jar file.
>>
>>
>>
>> Which is not really plug 'n pray...
>>
>> If I want to augment the running .sar without messing with it?
>> IE: any proposals?
>
>
>
> Ohh ... hot blocks!
> Not available in the current Phoenix version - but very desirable.
> Someone was talking/working on that recently - could be a good idea to 
> check the Phoenix mail archive.  I can't remember who it was but I'm 
> sure it was sometime in the last 4-6 weeks.
>
> Cheers, Steve. 


p.s. There is nothing to stop you putting in place a block that does 
active loading of pluggable components.

SJM

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Stephen McConnell <mc...@osm.net>.

Nicola Ken Barozzi wrote:

>
>
> Stephen McConnell wrote:
>
>>
>>
>> Andrei Ivanov wrote:
>>
>>> Hi,
>>> suppose I have Phoenix application in sar file. Suppose someone else 
>>> can
>>> write new block for my application (and add it by modifying 
>>> assembly.xml and
>>> config.xml)
>>> The question is: how this new block (extra jar) can be included into
>>> existing application (if not in sar, where new block can be placed 
>>> under
>>> SAR-INF or under phoenix-lib, latter imho is not good)?
>>>
>>> Andrei
>>>
>>
>> The new block (preumably packaged as a jar file) would normally be 
>> added to the SAR-INF/lib directory and your application redeployed as 
>> a new .sar file containing the additional .jar file.
>
>
> Which is not really plug 'n pray...
>
> If I want to augment the running .sar without messing with it?
> IE: any proposals?


Ohh ... hot blocks!
Not available in the current Phoenix version - but very desirable.
Someone was talking/working on that recently - could be a good idea to 
check the Phoenix mail archive.  I can't remember who it was but I'm 
sure it was sometime in the last 4-6 weeks.

Cheers, Steve.

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

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Stephen McConnell wrote:
> 
> 
> Andrei Ivanov wrote:
> 
>> Hi,
>> suppose I have Phoenix application in sar file. Suppose someone else can
>> write new block for my application (and add it by modifying 
>> assembly.xml and
>> config.xml)
>> The question is: how this new block (extra jar) can be included into
>> existing application (if not in sar, where new block can be placed under
>> SAR-INF or under phoenix-lib, latter imho is not good)?
>>
>> Andrei
>>
> 
> The new block (preumably packaged as a jar file) would normally be added 
> to the SAR-INF/lib directory and your application redeployed as a new 
> .sar file containing the additional .jar file.

Which is not really plug 'n pray...

If I want to augment the running .sar without messing with it?
IE: any proposals?


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


Re: How to add new blocks (jars) to existing phoenix application (sar)

Posted by Stephen McConnell <mc...@osm.net>.

Andrei Ivanov wrote:

>Hi,
>suppose I have Phoenix application in sar file. Suppose someone else can
>write new block for my application (and add it by modifying assembly.xml and
>config.xml)
>The question is: how this new block (extra jar) can be included into
>existing application (if not in sar, where new block can be placed under
>SAR-INF or under phoenix-lib, latter imho is not good)?
>
>Andrei
>

The new block (preumably packaged as a jar file) would normally be added 
to the SAR-INF/lib directory and your application redeployed as a new 
.sar file containing the additional .jar file.

Steve.


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

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


How to add new blocks (jars) to existing phoenix application (sar)

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi,
suppose I have Phoenix application in sar file. Suppose someone else can
write new block for my application (and add it by modifying assembly.xml and
config.xml)
The question is: how this new block (extra jar) can be included into
existing application (if not in sar, where new block can be placed under
SAR-INF or under phoenix-lib, latter imho is not good)?

Andrei




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


Re: Logging (changing log level without restarting)

Posted by Peter Donald <pe...@apache.org>.
Actually it was committed - ignore me ;)

At 01:51 PM 6/13/2002 +1000, you wrote:
>Hi,
>
>I don't actually use that so I am not sure I can be much help. There is 
>extensive documentation in the api docs for exclibur.logger I believe and 
>Eung-ju has actually made some documentation for it but we never got 
>around to applying it. Heres a link for basic documentation
>
>http://nagoya.apache.org/eyebrowse/ReadMsg?listName=avalon-phoenix-dev@jakarta.apache.org&msgId=69405
>
>Hopefully that helps else ask for some more information.
>
>Could someone else (or Eung-ju) apply this patch ? TIA.
>
>At 06:29 PM 6/11/2002 +0300, you wrote:
>>Hi
>>I am currently using "standard" logging configurations for my Phoenix
>>application. I am not well familiar with log4j and logs 1.1. but I have to
>>implement "daily rotating" of log files and possibility to change log levels
>>without restarting Phoenix.
>>As I understood I have to use logs 1.1 for daily rotating. Where I can find
>>examples and documentation of logs 1.1?
>>Is it possible to change log level during run time with logs 1.1? If not,
>>where I can read find examples of how to utilize log4j wrapper for Avalon
>>logkit used in Phoenix?
>>
>>Best regards,
>>Andrei
>>
>>
>>--
>>To unsubscribe, 
>>e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: 
>><ma...@jakarta.apache.org>
>
>Cheers,
>
>Peter Donald
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>"Faced with the choice between changing one's mind,
>and proving that there is no need to do so - almost
>everyone gets busy on the proof."
>              - John Kenneth Galbraith
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>--
>To unsubscribe, 
>e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>

Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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


Re: Logging (changing log level without restarting)

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

I don't actually use that so I am not sure I can be much help. There is 
extensive documentation in the api docs for exclibur.logger I believe and 
Eung-ju has actually made some documentation for it but we never got around 
to applying it. Heres a link for basic documentation

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=avalon-phoenix-dev@jakarta.apache.org&msgId=69405

Hopefully that helps else ask for some more information.

Could someone else (or Eung-ju) apply this patch ? TIA.

At 06:29 PM 6/11/2002 +0300, you wrote:
>Hi
>I am currently using "standard" logging configurations for my Phoenix
>application. I am not well familiar with log4j and logs 1.1. but I have to
>implement "daily rotating" of log files and possibility to change log levels
>without restarting Phoenix.
>As I understood I have to use logs 1.1 for daily rotating. Where I can find
>examples and documentation of logs 1.1?
>Is it possible to change log level during run time with logs 1.1? If not,
>where I can read find examples of how to utilize log4j wrapper for Avalon
>logkit used in Phoenix?
>
>Best regards,
>Andrei
>
>
>--
>To unsubscribe, 
>e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>

Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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


Logging (changing log level without restarting)

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi
I am currently using "standard" logging configurations for my Phoenix
application. I am not well familiar with log4j and logs 1.1. but I have to
implement "daily rotating" of log files and possibility to change log levels
without restarting Phoenix.
As I understood I have to use logs 1.1 for daily rotating. Where I can find
examples and documentation of logs 1.1?
Is it possible to change log level during run time with logs 1.1? If not,
where I can read find examples of how to utilize log4j wrapper for Avalon
logkit used in Phoenix?

Best regards,
Andrei


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


Re: Using Service / Component Selector in Phoenix

Posted by Andrei Ivanov <my...@surfeu.fi>.
Thanks Steve,
I had a hazy recollection that I ve seen this somewhere. Now I see it!
Andrei

----- Original Message -----
From: "Stephen McConnell" <mc...@osm.net>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Tuesday, June 11, 2002 4:03 PM
Subject: Re: Using Service / Component Selector in Phoenix


>
>
> The document
> http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html
> contains a description of how to handle this inside Phoinix.
>
> Cheers, Steve.
>
>
> Andrei Ivanov wrote:
>
> >Hi,
> >I came across with simple problem (I think it is simple for experienced
> >Avalon developers) with my Phoenix-based application.
> >
> >The problem is as follows:
> >I have phoenix service which contract is defined in interface
> >
> >A. ServiceInterface
> >
> >I have two different block which offer service A (in other words
different
> >implementation for the same service):
> >
> >Blocks
> >B. offers A
> >C. offers A
> >
> >B and C should be configured and initialized differently as well as they
> >will depend on different services.
> >
> >I would like to be able to specify which block will be used (B or C) to
> >provide service A changing only configuration (config.xml) file.
> >Can anyone give me example how to achieve that and what is the standard
> >practice for Phoenix-based application for this?
> >
> >Regards,
> >Andrei



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


Re: Using Service / Component Selector in Phoenix

Posted by Stephen McConnell <mc...@osm.net>.

The document 
http://jakarta.apache.org/avalon/phoenix/guide-example-configuration.html 
contains a description of how to handle this inside Phoinix.

Cheers, Steve.


Andrei Ivanov wrote:

>Hi,
>I came across with simple problem (I think it is simple for experienced
>Avalon developers) with my Phoenix-based application.
>
>The problem is as follows:
>I have phoenix service which contract is defined in interface
>
>A. ServiceInterface
>
>I have two different block which offer service A (in other words different
>implementation for the same service):
>
>Blocks
>B. offers A
>C. offers A
>
>B and C should be configured and initialized differently as well as they
>will depend on different services.
>
>I would like to be able to specify which block will be used (B or C) to
>provide service A changing only configuration (config.xml) file.
>Can anyone give me example how to achieve that and what is the standard
>practice for Phoenix-based application for this?
>
>Regards,
>Andrei
>
>
>
>----- Original Message -----
>From: "Peter Royal" <pr...@apache.org>
>To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
>Sent: Monday, June 10, 2002 5:44 PM
>Subject: Re: Constraints on dependencies
>
>
>  
>
>>On Thursday 06 June 2002 07:43 pm, Peter Donald wrote:
>>    
>>
>>>1. Are constraints container specific or not?
>>>2. Is there a subset of constraints that are container agnostic?
>>>3. How do we represent constraints in the system? An opaque string? A
>>>Configuration tree? An XPath expression?
>>>4. Do the providers or the Kernel validate the constraints?
>>>5. Do the providers get informed that they must conform to certain
>>>constraints?
>>>6. Does validation occur at initialization time or assembly time?
>>>
>>>My answers would be;
>>>      
>>>
>>1. Sometimes. I haven't seen any container-specific examples yet though ;)
>>2. Yes. Mainly anything that involves lookup( ROLE ), ie. component
>>    
>>
>assembly
>  
>
>>3. XPath or other evaluated expression :)
>>4. Kernel
>>5. No, but there may be cases where they need to be queried by the kernel
>>    
>>
>for
>  
>
>>constraint resolution (like the ORB example. the kernel will most likely
>>    
>>
>be
>  
>
>>unaware that its ORB component hosts others)
>>6. Both. As much as possible should be done at assembly, but I'm sure some
>>must be defered to init time.
>>
>>    
>>
>>>The problem is basically that in some cases it is going to be
>>>      
>>>
>practically
>  
>
>>>impossible for kernel to validate the constraint unless the provider
>>>conforms to very specific contracts or is self validating.
>>>      
>>>
>>I agree. I'd opt more for the "specific contracts" option, which could be
>>    
>>
>as
>  
>
>>easy as exposing MetaInfo classes.
>>-pete
>>
>>--
>>peter royal -> proyal@apache.org
>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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