You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <p....@albourne.com> on 2007/10/15 07:56:11 UTC

Tapestry 5 service configuration

Hi all,

Following on from a previous post on this subject I have some questions 
on Tapestry 5 IoC:

1. How do you register an ASO as a service if you have to provide 
arguments to the constructor (i.e. you cannot use @ApplicationState in 
this case).

2. How do you retrieve a service object that has been contributed to the 
framework

Thanks
Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Chris Lewis <ch...@bellsouth.net>.
An overused word it may be, but it has a fairly concrete meaning in 
Tapestry. It feels like its getting a tad warm, so please allay any 
fires brewing. I'm no expert in T5 either, but the notion of object 
persistence is /not at all/ intrinsic to what services are. A service 
may provide a mechanism for such persistence (like tapestry-hibernate), 
but services exist for a generic reason - to provide functionality to 
your application.
What parts? Pages, components, domain objects, other services, etc etc. 
tapestry-hibernate provides a direct service implementation for object 
persistence. Components  or pages may use this directly, or you may have 
an ORM abstraction layer in your app. They are simply about functionality.
The persistence I think you are talking about is application state - 
tying an object to a certain user (session). Such objects are your ASOs, 
but they are not themselves services. They are managed by a service 
(ApplicationStateManager). An ASO would be something like a User object 
that holds data you would expect (user name, real name, etc). It's a 
domain object, not a service. The object used to authenticate the user 
(and thus provide that object) might be a service.
Of course services are sometimes scoped per-thread, meaning that each 
request (and therefore each requesting client) gets a copy instantiated 
just for it. I guess its feasible that you could tie such a service to a 
specific request as an ASO, but again this isn't what services do. 
Pardon my rambling, but the real issue just became clear. In theory 
(yes, theory), application state is just that: state. State is data, not 
behavior. Services encapsulate behavior. Sure, there may be pragmatic 
reasons for blurring the lines, but that is the conceptual difference 
and is worth noting (even if sometimes violated for the sake of pragmatism).

sincerely, and hopefully not confusingly,
chris

Peter Stavrinides wrote:
> As far as I'm concerned service is an ugly word everyone likes to 
> throw around, what you are really dealing with is the concept of 
> persistence with Pojo's using Inversion of Control.
>
> Peter Stavrinides wrote:
>> A concept problem? really?? now I am curious as to what this concept 
>> problem actually, is could you explain it.
>>
>> Peter
>>
>> MavenMan wrote:
>>>
>>> Peter Stavrinides wrote:
>>>> Hi Chris
>>>> ApplicationStateManager is a service , I also think a service and 
>>>> an aso are completely different thing.
>>>>
>>>> in a word, It is a concept problem.
>>>>
>>>>> are completely different 
>>>>
>>>> I am no expert on T5, but strongly disagree with you.
>>>>
>>>> Peter
>>>>
>>>> Chris Lewis wrote:
>>>>> Hi Peter
>>>>>
>>>>> 1) I think the general opinion on this is that a service and an 
>>>>> aso are completely different animals. I can't think of a situation 
>>>>> where I'd ever want an aso to be a service (or vice versa), but 
>>>>> that's just me. If there is a way to do this, someone else will 
>>>>> need to chime in.
>>>>>
>>>>> 2) @Inject it. Assuming you bound or built your service, you can 
>>>>> simply inject it using @Inject as the general type (usually an 
>>>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>>>
>>>>> sincerely,
>>>>> chris
>>>>>
>>>>> Peter Stavrinides wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> Following on from a previous post on this subject I have some 
>>>>>> questions on Tapestry 5 IoC:
>>>>>>
>>>>>> 1. How do you register an ASO as a service if you have to provide 
>>>>>> arguments to the constructor (i.e. you cannot use 
>>>>>> @ApplicationState in this case).
>>>>>>
>>>>>> 2. How do you retrieve a service object that has been contributed 
>>>>>> to the framework
>>>>>>
>>>>>> Thanks
>>>>>> Peter
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



Re: T5: Pluggable javascript libraries?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
The conclusion was that it should be researched in a branch.

Howard wants the AJAX support to be of the same quality as the rest
of the framework, so realistically this may take a while.

Cheers,
Nick.


Chris Lewis wrote:
> Was it said that would be implemented? I mean I think it could be a good 
> idea, but I don't remember reading that it would actually be implemented.
> 
> Kristian Marinkovic wrote:
>> as i remember the postings on the mailing list from
>> 2/3 weeks ago correctly there will be a kind of abstraction
>> layer for Javascript (=adapter) in T5 with JQuery as default library
>>
>> right!? :)
>>
>> see: 
>> http://www.nabble.com/Prototype-vs.-JQuery-vs.-Dojo-0.9-vs.-----tf4559353.html#a13017828 
>>
>>
>> g,
>> kris
>>
>>
>>
>>
>> Chris Lewis <ch...@bellsouth.net> 15.10.2007 17:03
>> Bitte antworten an
>> "Tapestry users" <us...@tapestry.apache.org>
>>
>>
>> An
>> Tapestry users <us...@tapestry.apache.org>
>> Kopie
>>
>> Thema
>> Re: T5: Pluggable javascript libraries?
>>
>>
>>
>>
>>
>>
>> Unfortunately this is probably a bit of a pain to do. If you were to 
>> do this you'd probably have to do the following:
>>
>> 1) add jquery to the Tap source (easy)
>> 2) add your own PageRenderSupport implementation to use jquery (easy)
>> 3) rewrite tapestry.js so that it behaves the same but has the same 
>> interface as the original based on prototype (time consuming)
>>
>> That may be all. If you embark on this do share.
>>
>> chris
>>
>> Olivier wrote:
>>  
>>> Hi,
>>>
>>>
>>> Is it easily possible to use another javascript library in stead of
>>> prototype? Is anyone trying to do something like that? I, for one, have
>>> more experience with jQuery than Prototype (and I like it better) so it
>>> would be cool to have a tapestry with jQuery in stead of Prototype.
>>>
>>>
>>> Regards,
>>> Olivier
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>     
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>   
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Pluggable javascript libraries?

Posted by Chris Lewis <ch...@bellsouth.net>.
Was it said that would be implemented? I mean I think it could be a good 
idea, but I don't remember reading that it would actually be implemented.

Kristian Marinkovic wrote:
> as i remember the postings on the mailing list from
> 2/3 weeks ago correctly there will be a kind of abstraction
> layer for Javascript (=adapter) in T5 with JQuery as default 
> library
>
> right!? :)
>
> see: 
> http://www.nabble.com/Prototype-vs.-JQuery-vs.-Dojo-0.9-vs.-----tf4559353.html#a13017828
>
> g,
> kris
>
>
>
>
> Chris Lewis <ch...@bellsouth.net> 
> 15.10.2007 17:03
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> Tapestry users <us...@tapestry.apache.org>
> Kopie
>
> Thema
> Re: T5: Pluggable javascript libraries?
>
>
>
>
>
>
> Unfortunately this is probably a bit of a pain to do. If you were to do 
> this you'd probably have to do the following:
>
> 1) add jquery to the Tap source (easy)
> 2) add your own PageRenderSupport implementation to use jquery (easy)
> 3) rewrite tapestry.js so that it behaves the same but has the same 
> interface as the original based on prototype (time consuming)
>
> That may be all. If you embark on this do share.
>
> chris
>
> Olivier wrote:
>   
>> Hi,
>>
>>
>> Is it easily possible to use another javascript library in stead of
>> prototype? Is anyone trying to do something like that? I, for one, have
>> more experience with jQuery than Prototype (and I like it better) so it
>> would be cool to have a tapestry with jQuery in stead of Prototype.
>>
>>
>> Regards,
>> Olivier
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   


Re: Re: T5: Pluggable javascript libraries?

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
as i remember the postings on the mailing list from
2/3 weeks ago correctly there will be a kind of abstraction
layer for Javascript (=adapter) in T5 with JQuery as default 
library

right!? :)

see: 
http://www.nabble.com/Prototype-vs.-JQuery-vs.-Dojo-0.9-vs.-----tf4559353.html#a13017828

g,
kris




Chris Lewis <ch...@bellsouth.net> 
15.10.2007 17:03
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
Tapestry users <us...@tapestry.apache.org>
Kopie

Thema
Re: T5: Pluggable javascript libraries?






Unfortunately this is probably a bit of a pain to do. If you were to do 
this you'd probably have to do the following:

1) add jquery to the Tap source (easy)
2) add your own PageRenderSupport implementation to use jquery (easy)
3) rewrite tapestry.js so that it behaves the same but has the same 
interface as the original based on prototype (time consuming)

That may be all. If you embark on this do share.

chris

Olivier wrote:
> Hi,
>
>
> Is it easily possible to use another javascript library in stead of
> prototype? Is anyone trying to do something like that? I, for one, have
> more experience with jQuery than Prototype (and I like it better) so it
> would be cool to have a tapestry with jQuery in stead of Prototype.
>
>
> Regards,
> Olivier
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: T5: Pluggable javascript libraries?

Posted by Chris Lewis <ch...@bellsouth.net>.
Unfortunately this is probably a bit of a pain to do. If you were to do 
this you'd probably have to do the following:

1) add jquery to the Tap source (easy)
2) add your own PageRenderSupport implementation to use jquery (easy)
3) rewrite tapestry.js so that it behaves the same but has the same 
interface as the original based on prototype (time consuming)

That may be all. If you embark on this do share.

chris

Olivier wrote:
> Hi,
>
>
> Is it easily possible to use another javascript library in stead of
> prototype? Is anyone trying to do something like that? I, for one, have
> more experience with jQuery than Prototype (and I like it better) so it
> would be cool to have a tapestry with jQuery in stead of Prototype.
>
>
> Regards,
> Olivier
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


T5: Pluggable javascript libraries?

Posted by Olivier <ta...@jax.be>.
Hi,


Is it easily possible to use another javascript library in stead of
prototype? Is anyone trying to do something like that? I, for one, have
more experience with jQuery than Prototype (and I like it better) so it
would be cool to have a tapestry with jQuery in stead of Prototype.


Regards,
Olivier



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Chris Lewis <ch...@bellsouth.net>.
Someone correct me if I'm wrong, but you can't inject ComponentResources 
into a module because it doesn't yet exist. I believe ComponentResources 
is created when the rendering is actually underway, and modules are 
processed before this happens.

chris

Peter Stavrinides wrote:
> My previous post contained this code:
> @Inject
> private ComponentResources resources_;
>
>   public void contributeApplicationStateManager(
>            MappedConfiguration<Class, ApplicationStateContribution>
> configuration) {
>        ApplicationStateCreator<BreadCrumbs> creator = new
> ApplicationStateCreator<BreadCrumbs>() {
>            public BreadCrumbs create() {
>                return new BreadCrumbs(resources_);
>            }
>        };
>
>        configuration.add(BreadCrumbs.class, new
> ApplicationStateContribution(
>                "session", creator));
>    }
>
> I had originally tried it like this, but couldn't figure out how to 
> set service properties correctly, resources_ kept turning up null.
>
> lasitha wrote:
>> Actually, it may be easier to contribute to the
>> ApplicationStateManager instead of having it injected and
>> getting/setting from it yourself.
>>
>> See the section on 'Configuring ASOs' here:
>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html
>>
>> Cheers, lasitha.
>>
>> On 10/15/07, Peter Stavrinides <p....@albourne.com> wrote:
>>  
>>> Thanks Robert, I think I have my answer now.
>>>
>>> Robert Zeigler wrote:
>>>    
>>>> Use the ApplicationStateManager?
>>>>
>>>> @Inject
>>>> ApplicationStateManager _manager;
>>>>
>>>> MyObject foo = new MyObject(someArguments);
>>>> _manager.set(MyObject.class,foo);
>>>>
>>>> Cheers,
>>>>
>>>> Robert
>>>>
>>>> On Oct 15, 2007, at 10/156:58 AM , Peter Stavrinides wrote:
>>>>
>>>>      
>>>>> Since you are confused by the question, let me rephrase it in a
>>>>> different way then:
>>>>>
>>>>> 1. How do you register an ASO with the IoC managed container (or
>>>>> registry if you prefer that word) if you have to provide arguments in
>>>>> the constructor (i.e. you cannot use @ApplicationState in this case).
>>>>>
>>>>>
>>>>>
>>>>> MavenMan wrote:
>>>>>        
>>>>>> I just to say maybe the concept problem is you are dealing with 
>>>>>> is the
>>>>>> concept of persistence with Pojo's using Inversion of Control , so
>>>>>> you are mixed-up. many folk have
>>>>>> talk about the good of ioc .Now could you give me a explain of how
>>>>>> t5 manage the service and aso?
>>>>>> Peter Stavrinides wrote:
>>>>>>
>>>>>>          
>>>>>>> As far as I'm concerned service is an ugly word everyone likes to
>>>>>>> throw around, what you are really dealing with is the concept of
>>>>>>> persistence with Pojo's using Inversion of Control.
>>>>>>>
>>>>>>> Peter Stavrinides wrote:
>>>>>>>
>>>>>>>            
>>>>>>>> A concept problem? really?? now I am curious as to what this
>>>>>>>> concept problem actually, is could you explain it.
>>>>>>>>
>>>>>>>> Peter
>>>>>>>>
>>>>>>>> MavenMan wrote:
>>>>>>>>
>>>>>>>>              
>>>>>>>>> Peter Stavrinides wrote:
>>>>>>>>>
>>>>>>>>>                
>>>>>>>>>> Hi Chris
>>>>>>>>>> ApplicationStateManager is a service , I also think a service
>>>>>>>>>> and an aso are completely different thing.
>>>>>>>>>>
>>>>>>>>>> in a word, It is a concept problem.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                  
>>>>>>>>>>> are completely different
>>>>>>>>>>>                     
>>>>>>>>>> I am no expert on T5, but strongly disagree with you.
>>>>>>>>>>
>>>>>>>>>> Peter
>>>>>>>>>>
>>>>>>>>>> Chris Lewis wrote:
>>>>>>>>>>
>>>>>>>>>>                  
>>>>>>>>>>> Hi Peter
>>>>>>>>>>>
>>>>>>>>>>> 1) I think the general opinion on this is that a service and an
>>>>>>>>>>> aso are completely different animals. I can't think of a
>>>>>>>>>>> situation where I'd ever want an aso to be a service (or vice
>>>>>>>>>>> versa), but that's just me. If there is a way to do this,
>>>>>>>>>>> someone else will need to chime in.
>>>>>>>>>>>
>>>>>>>>>>> 2) @Inject it. Assuming you bound or built your service, you
>>>>>>>>>>> can simply inject it using @Inject as the general type (usually
>>>>>>>>>>> an interface) of object, and Tapestry IoC will resolve it 
>>>>>>>>>>> for you.
>>>>>>>>>>>
>>>>>>>>>>> sincerely,
>>>>>>>>>>> chris
>>>>>>>>>>>
>>>>>>>>>>> Peter Stavrinides wrote:
>>>>>>>>>>>
>>>>>>>>>>>                    
>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> Following on from a previous post on this subject I have some
>>>>>>>>>>>> questions on Tapestry 5 IoC:
>>>>>>>>>>>>
>>>>>>>>>>>> 1. How do you register an ASO as a service if you have to
>>>>>>>>>>>> provide arguments to the constructor (i.e. you cannot use
>>>>>>>>>>>> @ApplicationState in this case).
>>>>>>>>>>>>
>>>>>>>>>>>> 2. How do you retrieve a service object that has been
>>>>>>>>>>>> contributed to the framework
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> Peter
>>>>>>>>>>>>
>>>>>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>>>>> For additional commands, e-mail: 
>>>>>>>>>>>> users-help@tapestry.apache.org
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                       
>>>>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                     
>>>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                   
>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>               
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             
>>>>>>           
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>         
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>   
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
My previous post contained this code:
@Inject
private ComponentResources resources_;

   public void contributeApplicationStateManager(
            MappedConfiguration<Class, ApplicationStateContribution>
configuration) {
        ApplicationStateCreator<BreadCrumbs> creator = new
ApplicationStateCreator<BreadCrumbs>() {
            public BreadCrumbs create() {
                return new BreadCrumbs(resources_);
            }
        };

        configuration.add(BreadCrumbs.class, new
ApplicationStateContribution(
                "session", creator));
    }

I had originally tried it like this, but couldn't figure out how to set 
service properties correctly, resources_ kept turning up null.

lasitha wrote:
> Actually, it may be easier to contribute to the
> ApplicationStateManager instead of having it injected and
> getting/setting from it yourself.
>
> See the section on 'Configuring ASOs' here:
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html
>
> Cheers, lasitha.
>
> On 10/15/07, Peter Stavrinides <p....@albourne.com> wrote:
>   
>> Thanks Robert, I think I have my answer now.
>>
>> Robert Zeigler wrote:
>>     
>>> Use the ApplicationStateManager?
>>>
>>> @Inject
>>> ApplicationStateManager _manager;
>>>
>>> MyObject foo = new MyObject(someArguments);
>>> _manager.set(MyObject.class,foo);
>>>
>>> Cheers,
>>>
>>> Robert
>>>
>>> On Oct 15, 2007, at 10/156:58 AM , Peter Stavrinides wrote:
>>>
>>>       
>>>> Since you are confused by the question, let me rephrase it in a
>>>> different way then:
>>>>
>>>> 1. How do you register an ASO with the IoC managed container (or
>>>> registry if you prefer that word) if you have to provide arguments in
>>>> the constructor (i.e. you cannot use @ApplicationState in this case).
>>>>
>>>>
>>>>
>>>> MavenMan wrote:
>>>>         
>>>>> I just to say maybe the concept problem is you are dealing with is the
>>>>> concept of persistence with Pojo's using Inversion of Control , so
>>>>> you are mixed-up. many folk have
>>>>> talk about the good of ioc .Now could you give me a explain of how
>>>>> t5 manage the service and aso?
>>>>> Peter Stavrinides wrote:
>>>>>
>>>>>           
>>>>>> As far as I'm concerned service is an ugly word everyone likes to
>>>>>> throw around, what you are really dealing with is the concept of
>>>>>> persistence with Pojo's using Inversion of Control.
>>>>>>
>>>>>> Peter Stavrinides wrote:
>>>>>>
>>>>>>             
>>>>>>> A concept problem? really?? now I am curious as to what this
>>>>>>> concept problem actually, is could you explain it.
>>>>>>>
>>>>>>> Peter
>>>>>>>
>>>>>>> MavenMan wrote:
>>>>>>>
>>>>>>>               
>>>>>>>> Peter Stavrinides wrote:
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> Hi Chris
>>>>>>>>> ApplicationStateManager is a service , I also think a service
>>>>>>>>> and an aso are completely different thing.
>>>>>>>>>
>>>>>>>>> in a word, It is a concept problem.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>>> are completely different
>>>>>>>>>>                     
>>>>>>>>> I am no expert on T5, but strongly disagree with you.
>>>>>>>>>
>>>>>>>>> Peter
>>>>>>>>>
>>>>>>>>> Chris Lewis wrote:
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>>> Hi Peter
>>>>>>>>>>
>>>>>>>>>> 1) I think the general opinion on this is that a service and an
>>>>>>>>>> aso are completely different animals. I can't think of a
>>>>>>>>>> situation where I'd ever want an aso to be a service (or vice
>>>>>>>>>> versa), but that's just me. If there is a way to do this,
>>>>>>>>>> someone else will need to chime in.
>>>>>>>>>>
>>>>>>>>>> 2) @Inject it. Assuming you bound or built your service, you
>>>>>>>>>> can simply inject it using @Inject as the general type (usually
>>>>>>>>>> an interface) of object, and Tapestry IoC will resolve it for you.
>>>>>>>>>>
>>>>>>>>>> sincerely,
>>>>>>>>>> chris
>>>>>>>>>>
>>>>>>>>>> Peter Stavrinides wrote:
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> Following on from a previous post on this subject I have some
>>>>>>>>>>> questions on Tapestry 5 IoC:
>>>>>>>>>>>
>>>>>>>>>>> 1. How do you register an ASO as a service if you have to
>>>>>>>>>>> provide arguments to the constructor (i.e. you cannot use
>>>>>>>>>>> @ApplicationState in this case).
>>>>>>>>>>>
>>>>>>>>>>> 2. How do you retrieve a service object that has been
>>>>>>>>>>> contributed to the framework
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Peter
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>>
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                       
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by lasitha <la...@gmail.com>.
Actually, it may be easier to contribute to the
ApplicationStateManager instead of having it injected and
getting/setting from it yourself.

See the section on 'Configuring ASOs' here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html

Cheers, lasitha.

On 10/15/07, Peter Stavrinides <p....@albourne.com> wrote:
> Thanks Robert, I think I have my answer now.
>
> Robert Zeigler wrote:
> > Use the ApplicationStateManager?
> >
> > @Inject
> > ApplicationStateManager _manager;
> >
> > MyObject foo = new MyObject(someArguments);
> > _manager.set(MyObject.class,foo);
> >
> > Cheers,
> >
> > Robert
> >
> > On Oct 15, 2007, at 10/156:58 AM , Peter Stavrinides wrote:
> >
> >> Since you are confused by the question, let me rephrase it in a
> >> different way then:
> >>
> >> 1. How do you register an ASO with the IoC managed container (or
> >> registry if you prefer that word) if you have to provide arguments in
> >> the constructor (i.e. you cannot use @ApplicationState in this case).
> >>
> >>
> >>
> >> MavenMan wrote:
> >>> I just to say maybe the concept problem is you are dealing with is the
> >>> concept of persistence with Pojo's using Inversion of Control , so
> >>> you are mixed-up. many folk have
> >>> talk about the good of ioc .Now could you give me a explain of how
> >>> t5 manage the service and aso?
> >>> Peter Stavrinides wrote:
> >>>
> >>>> As far as I'm concerned service is an ugly word everyone likes to
> >>>> throw around, what you are really dealing with is the concept of
> >>>> persistence with Pojo's using Inversion of Control.
> >>>>
> >>>> Peter Stavrinides wrote:
> >>>>
> >>>>> A concept problem? really?? now I am curious as to what this
> >>>>> concept problem actually, is could you explain it.
> >>>>>
> >>>>> Peter
> >>>>>
> >>>>> MavenMan wrote:
> >>>>>
> >>>>>> Peter Stavrinides wrote:
> >>>>>>
> >>>>>>> Hi Chris
> >>>>>>> ApplicationStateManager is a service , I also think a service
> >>>>>>> and an aso are completely different thing.
> >>>>>>>
> >>>>>>> in a word, It is a concept problem.
> >>>>>>>
> >>>>>>>
> >>>>>>>> are completely different
> >>>>>>> I am no expert on T5, but strongly disagree with you.
> >>>>>>>
> >>>>>>> Peter
> >>>>>>>
> >>>>>>> Chris Lewis wrote:
> >>>>>>>
> >>>>>>>> Hi Peter
> >>>>>>>>
> >>>>>>>> 1) I think the general opinion on this is that a service and an
> >>>>>>>> aso are completely different animals. I can't think of a
> >>>>>>>> situation where I'd ever want an aso to be a service (or vice
> >>>>>>>> versa), but that's just me. If there is a way to do this,
> >>>>>>>> someone else will need to chime in.
> >>>>>>>>
> >>>>>>>> 2) @Inject it. Assuming you bound or built your service, you
> >>>>>>>> can simply inject it using @Inject as the general type (usually
> >>>>>>>> an interface) of object, and Tapestry IoC will resolve it for you.
> >>>>>>>>
> >>>>>>>> sincerely,
> >>>>>>>> chris
> >>>>>>>>
> >>>>>>>> Peter Stavrinides wrote:
> >>>>>>>>
> >>>>>>>>> Hi all,
> >>>>>>>>>
> >>>>>>>>> Following on from a previous post on this subject I have some
> >>>>>>>>> questions on Tapestry 5 IoC:
> >>>>>>>>>
> >>>>>>>>> 1. How do you register an ASO as a service if you have to
> >>>>>>>>> provide arguments to the constructor (i.e. you cannot use
> >>>>>>>>> @ApplicationState in this case).
> >>>>>>>>>
> >>>>>>>>> 2. How do you retrieve a service object that has been
> >>>>>>>>> contributed to the framework
> >>>>>>>>>
> >>>>>>>>> Thanks
> >>>>>>>>> Peter
> >>>>>>>>>
> >>>>>>>>> ---------------------------------------------------------------------
> >>>>>>>>>
> >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> ---------------------------------------------------------------------
> >>>>>>>>
> >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>> ---------------------------------------------------------------------
> >>>>>>>
> >>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>>
> >>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Thanks Robert, I think I have my answer now.

Robert Zeigler wrote:
> Use the ApplicationStateManager?
>
> @Inject
> ApplicationStateManager _manager;
>
> MyObject foo = new MyObject(someArguments);
> _manager.set(MyObject.class,foo);
>
> Cheers,
>
> Robert
>
> On Oct 15, 2007, at 10/156:58 AM , Peter Stavrinides wrote:
>
>> Since you are confused by the question, let me rephrase it in a 
>> different way then:
>>
>> 1. How do you register an ASO with the IoC managed container (or 
>> registry if you prefer that word) if you have to provide arguments in 
>> the constructor (i.e. you cannot use @ApplicationState in this case).
>>
>>
>>
>> MavenMan wrote:
>>> I just to say maybe the concept problem is you are dealing with is the
>>> concept of persistence with Pojo's using Inversion of Control , so 
>>> you are mixed-up. many folk have
>>> talk about the good of ioc .Now could you give me a explain of how 
>>> t5 manage the service and aso?
>>> Peter Stavrinides wrote:
>>>
>>>> As far as I'm concerned service is an ugly word everyone likes to 
>>>> throw around, what you are really dealing with is the concept of 
>>>> persistence with Pojo's using Inversion of Control.
>>>>
>>>> Peter Stavrinides wrote:
>>>>
>>>>> A concept problem? really?? now I am curious as to what this 
>>>>> concept problem actually, is could you explain it.
>>>>>
>>>>> Peter
>>>>>
>>>>> MavenMan wrote:
>>>>>
>>>>>> Peter Stavrinides wrote:
>>>>>>
>>>>>>> Hi Chris
>>>>>>> ApplicationStateManager is a service , I also think a service 
>>>>>>> and an aso are completely different thing.
>>>>>>>
>>>>>>> in a word, It is a concept problem.
>>>>>>>
>>>>>>>
>>>>>>>> are completely different
>>>>>>> I am no expert on T5, but strongly disagree with you.
>>>>>>>
>>>>>>> Peter
>>>>>>>
>>>>>>> Chris Lewis wrote:
>>>>>>>
>>>>>>>> Hi Peter
>>>>>>>>
>>>>>>>> 1) I think the general opinion on this is that a service and an 
>>>>>>>> aso are completely different animals. I can't think of a 
>>>>>>>> situation where I'd ever want an aso to be a service (or vice 
>>>>>>>> versa), but that's just me. If there is a way to do this, 
>>>>>>>> someone else will need to chime in.
>>>>>>>>
>>>>>>>> 2) @Inject it. Assuming you bound or built your service, you 
>>>>>>>> can simply inject it using @Inject as the general type (usually 
>>>>>>>> an interface) of object, and Tapestry IoC will resolve it for you.
>>>>>>>>
>>>>>>>> sincerely,
>>>>>>>> chris
>>>>>>>>
>>>>>>>> Peter Stavrinides wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> Following on from a previous post on this subject I have some 
>>>>>>>>> questions on Tapestry 5 IoC:
>>>>>>>>>
>>>>>>>>> 1. How do you register an ASO as a service if you have to 
>>>>>>>>> provide arguments to the constructor (i.e. you cannot use 
>>>>>>>>> @ApplicationState in this case).
>>>>>>>>>
>>>>>>>>> 2. How do you retrieve a service object that has been 
>>>>>>>>> contributed to the framework
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Peter
>>>>>>>>>
>>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Robert Zeigler <ro...@scazdl.org>.
Use the ApplicationStateManager?

@Inject
ApplicationStateManager _manager;

MyObject foo = new MyObject(someArguments);
_manager.set(MyObject.class,foo);

Cheers,

Robert

On Oct 15, 2007, at 10/156:58 AM , Peter Stavrinides wrote:

> Since you are confused by the question, let me rephrase it in a  
> different way then:
>
> 1. How do you register an ASO with the IoC managed container (or  
> registry if you prefer that word) if you have to provide arguments  
> in the constructor (i.e. you cannot use @ApplicationState in this  
> case).
>
>
>
> MavenMan wrote:
>> I just to say maybe the concept problem is you are  dealing with  
>> is the
>> concept of persistence with Pojo's using Inversion of Control , so  
>> you are mixed-up. many folk have
>> talk about the good of ioc .Now could you give me a explain of how  
>> t5 manage the service and aso?
>> Peter Stavrinides wrote:
>>
>>> As far as I'm concerned service is an ugly word everyone likes to  
>>> throw around, what you are really dealing with is the concept of  
>>> persistence with Pojo's using Inversion of Control.
>>>
>>> Peter Stavrinides wrote:
>>>
>>>> A concept problem? really?? now I am curious as to what this  
>>>> concept problem actually, is could you explain it.
>>>>
>>>> Peter
>>>>
>>>> MavenMan wrote:
>>>>
>>>>> Peter Stavrinides wrote:
>>>>>
>>>>>> Hi Chris
>>>>>> ApplicationStateManager is a service , I also think a service  
>>>>>> and an aso are completely different thing.
>>>>>>
>>>>>> in a word, It is a concept problem.
>>>>>>
>>>>>>
>>>>>>> are completely different
>>>>>> I am no expert on T5, but strongly disagree with you.
>>>>>>
>>>>>> Peter
>>>>>>
>>>>>> Chris Lewis wrote:
>>>>>>
>>>>>>> Hi Peter
>>>>>>>
>>>>>>> 1) I think the general opinion on this is that a service and  
>>>>>>> an aso are completely different animals. I can't think of a  
>>>>>>> situation where I'd ever want an aso to be a service (or vice  
>>>>>>> versa), but that's just me. If there is a way to do this,  
>>>>>>> someone else will need to chime in.
>>>>>>>
>>>>>>> 2) @Inject it. Assuming you bound or built your service, you  
>>>>>>> can simply inject it using @Inject as the general type  
>>>>>>> (usually an interface) of object, and Tapestry IoC will  
>>>>>>> resolve it for you.
>>>>>>>
>>>>>>> sincerely,
>>>>>>> chris
>>>>>>>
>>>>>>> Peter Stavrinides wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Following on from a previous post on this subject I have  
>>>>>>>> some questions on Tapestry 5 IoC:
>>>>>>>>
>>>>>>>> 1. How do you register an ASO as a service if you have to  
>>>>>>>> provide arguments to the constructor (i.e. you cannot use  
>>>>>>>> @ApplicationState in this case).
>>>>>>>>
>>>>>>>> 2. How do you retrieve a service object that has been  
>>>>>>>> contributed to the framework
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Peter
>>>>>>>>
>>>>>>>> --------------------------------------------------------------- 
>>>>>>>> ------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------- 
>>>>>>> -----
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>> ----------------------------------------------------------------- 
>>>>>> ----
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Since you are confused by the question, let me rephrase it in a 
different way then:

1. How do you register an ASO with the IoC managed container (or registry if you prefer that word) if you have to provide 
arguments in the constructor (i.e. you cannot use 
@ApplicationState in this case).



MavenMan wrote:
> I just to say maybe the concept problem is you are  dealing with is the
> concept of persistence 
> with Pojo's using Inversion of Control , so you are mixed-up. many folk have
> talk about the good of ioc 
> .Now could you give me a explain of how t5 manage the service and aso? 
>
> Peter Stavrinides wrote:
>   
>> As far as I'm concerned service is an ugly word everyone likes to throw 
>> around, what you are really dealing with is the concept of persistence 
>> with Pojo's using Inversion of Control.
>>
>> Peter Stavrinides wrote:
>>     
>>> A concept problem? really?? now I am curious as to what this concept 
>>> problem actually, is could you explain it.
>>>
>>> Peter
>>>
>>> MavenMan wrote:
>>>       
>>>> Peter Stavrinides wrote:
>>>>         
>>>>> Hi Chris
>>>>> ApplicationStateManager is a service , I also think a service and an 
>>>>> aso are completely different thing.
>>>>>
>>>>> in a word, It is a concept problem.
>>>>>
>>>>>           
>>>>>> are completely different 
>>>>>>             
>>>>> I am no expert on T5, but strongly disagree with you.
>>>>>
>>>>> Peter
>>>>>
>>>>> Chris Lewis wrote:
>>>>>           
>>>>>> Hi Peter
>>>>>>
>>>>>> 1) I think the general opinion on this is that a service and an aso 
>>>>>> are completely different animals. I can't think of a situation 
>>>>>> where I'd ever want an aso to be a service (or vice versa), but 
>>>>>> that's just me. If there is a way to do this, someone else will 
>>>>>> need to chime in.
>>>>>>
>>>>>> 2) @Inject it. Assuming you bound or built your service, you can 
>>>>>> simply inject it using @Inject as the general type (usually an 
>>>>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>>>>
>>>>>> sincerely,
>>>>>> chris
>>>>>>
>>>>>> Peter Stavrinides wrote:
>>>>>>             
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Following on from a previous post on this subject I have some 
>>>>>>> questions on Tapestry 5 IoC:
>>>>>>>
>>>>>>> 1. How do you register an ASO as a service if you have to provide 
>>>>>>> arguments to the constructor (i.e. you cannot use 
>>>>>>> @ApplicationState in this case).
>>>>>>>
>>>>>>> 2. How do you retrieve a service object that has been contributed 
>>>>>>> to the framework
>>>>>>>
>>>>>>> Thanks
>>>>>>> Peter
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>             
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by MavenMan <li...@163.com>.
I just to say maybe the concept problem is you are  dealing with is the
concept of persistence 
with Pojo's using Inversion of Control , so you are mixed-up. many folk have
talk about the good of ioc 
.Now could you give me a explain of how t5 manage the service and aso? 

Peter Stavrinides wrote:
> 
> As far as I'm concerned service is an ugly word everyone likes to throw 
> around, what you are really dealing with is the concept of persistence 
> with Pojo's using Inversion of Control.
> 
> Peter Stavrinides wrote:
>> A concept problem? really?? now I am curious as to what this concept 
>> problem actually, is could you explain it.
>>
>> Peter
>>
>> MavenMan wrote:
>>>
>>> Peter Stavrinides wrote:
>>>> Hi Chris
>>>> ApplicationStateManager is a service , I also think a service and an 
>>>> aso are completely different thing.
>>>>
>>>> in a word, It is a concept problem.
>>>>
>>>>> are completely different 
>>>>
>>>> I am no expert on T5, but strongly disagree with you.
>>>>
>>>> Peter
>>>>
>>>> Chris Lewis wrote:
>>>>> Hi Peter
>>>>>
>>>>> 1) I think the general opinion on this is that a service and an aso 
>>>>> are completely different animals. I can't think of a situation 
>>>>> where I'd ever want an aso to be a service (or vice versa), but 
>>>>> that's just me. If there is a way to do this, someone else will 
>>>>> need to chime in.
>>>>>
>>>>> 2) @Inject it. Assuming you bound or built your service, you can 
>>>>> simply inject it using @Inject as the general type (usually an 
>>>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>>>
>>>>> sincerely,
>>>>> chris
>>>>>
>>>>> Peter Stavrinides wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> Following on from a previous post on this subject I have some 
>>>>>> questions on Tapestry 5 IoC:
>>>>>>
>>>>>> 1. How do you register an ASO as a service if you have to provide 
>>>>>> arguments to the constructor (i.e. you cannot use 
>>>>>> @ApplicationState in this case).
>>>>>>
>>>>>> 2. How do you retrieve a service object that has been contributed 
>>>>>> to the framework
>>>>>>
>>>>>> Thanks
>>>>>> Peter
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tapestry-5-service-configuration-tf4624618.html#a13210596
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
As far as I'm concerned service is an ugly word everyone likes to throw 
around, what you are really dealing with is the concept of persistence 
with Pojo's using Inversion of Control.

Peter Stavrinides wrote:
> A concept problem? really?? now I am curious as to what this concept 
> problem actually, is could you explain it.
>
> Peter
>
> MavenMan wrote:
>>
>> Peter Stavrinides wrote:
>>> Hi Chris
>>> ApplicationStateManager is a service , I also think a service and an 
>>> aso are completely different thing.
>>>
>>> in a word, It is a concept problem.
>>>
>>>> are completely different 
>>>
>>> I am no expert on T5, but strongly disagree with you.
>>>
>>> Peter
>>>
>>> Chris Lewis wrote:
>>>> Hi Peter
>>>>
>>>> 1) I think the general opinion on this is that a service and an aso 
>>>> are completely different animals. I can't think of a situation 
>>>> where I'd ever want an aso to be a service (or vice versa), but 
>>>> that's just me. If there is a way to do this, someone else will 
>>>> need to chime in.
>>>>
>>>> 2) @Inject it. Assuming you bound or built your service, you can 
>>>> simply inject it using @Inject as the general type (usually an 
>>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>>
>>>> sincerely,
>>>> chris
>>>>
>>>> Peter Stavrinides wrote:
>>>>> Hi all,
>>>>>
>>>>> Following on from a previous post on this subject I have some 
>>>>> questions on Tapestry 5 IoC:
>>>>>
>>>>> 1. How do you register an ASO as a service if you have to provide 
>>>>> arguments to the constructor (i.e. you cannot use 
>>>>> @ApplicationState in this case).
>>>>>
>>>>> 2. How do you retrieve a service object that has been contributed 
>>>>> to the framework
>>>>>
>>>>> Thanks
>>>>> Peter
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
A concept problem? really?? now I am curious as to what this concept 
problem actually, is could you explain it.

Peter

MavenMan wrote:
>
> Peter Stavrinides wrote:
>   
>> Hi Chris
>> ApplicationStateManager  is a service , I also think a service and an aso 
>> are completely different thing.
>>
>> in a word, It is a concept problem. 
>>
>>
>>     
>>> are completely different 
>>>       
>>
>> I am no expert on T5, but strongly disagree with you.
>>
>> Peter
>>
>> Chris Lewis wrote:
>>     
>>> Hi Peter
>>>
>>> 1) I think the general opinion on this is that a service and an aso 
>>> are completely different animals. I can't think of a situation where 
>>> I'd ever want an aso to be a service (or vice versa), but that's just 
>>> me. If there is a way to do this, someone else will need to chime in.
>>>
>>> 2) @Inject it. Assuming you bound or built your service, you can 
>>> simply inject it using @Inject as the general type (usually an 
>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>
>>> sincerely,
>>> chris
>>>
>>> Peter Stavrinides wrote:
>>>       
>>>> Hi all,
>>>>
>>>> Following on from a previous post on this subject I have some 
>>>> questions on Tapestry 5 IoC:
>>>>
>>>> 1. How do you register an ASO as a service if you have to provide 
>>>> arguments to the constructor (i.e. you cannot use @ApplicationState 
>>>> in this case).
>>>>
>>>> 2. How do you retrieve a service object that has been contributed to 
>>>> the framework
>>>>
>>>> Thanks
>>>> Peter
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by MavenMan <li...@163.com>.


Peter Stavrinides wrote:
> 
> Hi Chris
> ApplicationStateManager  is a service , I also think a service and an aso 
> are completely different thing.
> 
> in a word, It is a concept problem. 
> 
> 
>> are completely different 
> 
> 
> 
> I am no expert on T5, but strongly disagree with you.
> 
> Peter
> 
> Chris Lewis wrote:
>> Hi Peter
>>
>> 1) I think the general opinion on this is that a service and an aso 
>> are completely different animals. I can't think of a situation where 
>> I'd ever want an aso to be a service (or vice versa), but that's just 
>> me. If there is a way to do this, someone else will need to chime in.
>>
>> 2) @Inject it. Assuming you bound or built your service, you can 
>> simply inject it using @Inject as the general type (usually an 
>> interface) of object, and Tapestry IoC will resolve it for you.
>>
>> sincerely,
>> chris
>>
>> Peter Stavrinides wrote:
>>> Hi all,
>>>
>>> Following on from a previous post on this subject I have some 
>>> questions on Tapestry 5 IoC:
>>>
>>> 1. How do you register an ASO as a service if you have to provide 
>>> arguments to the constructor (i.e. you cannot use @ApplicationState 
>>> in this case).
>>>
>>> 2. How do you retrieve a service object that has been contributed to 
>>> the framework
>>>
>>> Thanks
>>> Peter
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tapestry-5-service-configuration-tf4624618.html#a13208221
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Chris,
FYI services do not primarily exist to provide functionality to an 
application, Java code has all the mechanisms to do that. Services 
provide the decoupling and abstraction desirable to prevent dependency 
failures. The "service" aspect is the contract to reuse code. Services 
are conducive to "interoperability", so they are usually for enterprise 
environments, but we IT people love buzzwords don't we? on that note:
 >a true POJO has a public non-arguments constructor

Howard I get what you are saying, but what you are talking about is a 
bean, which has a no arg constructor.
All Java objects are POJO's... POJO's have only three "theoretical" 
restrictions:
    1. They shouldn't extend prespecified classes
    2. They shouldn't Implement prespecified interfaces 
    3. They shouldn't contain prespecified annotations

Is it fair to say ASO's were treated as services by the container in T4? 
...ASO's need to be serializable, this wasn't a big deal though in T4, I 
used transient objects where needed, worked great, plain Java code!

Peter

Howard Lewis Ship wrote:
> I have some expertise in Tapestry, and I side with Chris.
>
> An ASO is a global object that is associated with a particular user,
> typically via the user's HttpSession.  It doesn't have a service interface,
> as it is typically a POJO.  Because it doesn't have an interface, Tapesty
> doesn't create a proxy for the ASO.
>
> In most cases, the ASO is a true POJO (a true POJO has a public
> non-arguments constructor) in which case Tapestry can manage the ASO
> entirely, creating it as necessary.  To be honest, since the ASO code was
> written, Tapestry has gotten smarter, and could probably operate on a more
> complicated constructor using the normal autobuild approach.  This would
> allow injection of services into an ASO ... which is dangerous, because
> service proxies are not serializable, and an ASO typically must be.
>
> You can also explicitly define the ASO, which gives you an opportunity to
> provide the code to instantiate the ASO.  This is what you currently do if
> your ASO doesn't have a simple constructor.
>
> If you need to access an ASO from a component, you use the @ApplicationState
> annotation, which marks a field as being linked to an ASO.
>
> If a service needs access to an ASO, it must inject the ApplicationState, it
> must obtain the ASO from the ApplicationStateManager.
>
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ApplicationStateManager.html
>
>
>
> On 10/15/07, Peter Stavrinides <p....@albourne.com> wrote:
>> Hi Chris
>>
>> I am no expert on T5, but strongly disagree with you.
>>
>> Peter
>>
>> Chris Lewis wrote:
>>> Hi Peter
>>>
>>> 1) I think the general opinion on this is that a service and an aso
>>> are completely different animals. I can't think of a situation where
>>> I'd ever want an aso to be a service (or vice versa), but that's just
>>> me. If there is a way to do this, someone else will need to chime in.
>>>
>>> 2) @Inject it. Assuming you bound or built your service, you can
>>> simply inject it using @Inject as the general type (usually an
>>> interface) of object, and Tapestry IoC will resolve it for you.
>>>
>>> sincerely,
>>> chris
>>>
>>> Peter Stavrinides wrote:
>>>> Hi all,
>>>>
>>>> Following on from a previous post on this subject I have some
>>>> questions on Tapestry 5 IoC:
>>>>
>>>> 1. How do you register an ASO as a service if you have to provide
>>>> arguments to the constructor (i.e. you cannot use @ApplicationState
>>>> in this case).
>>>>
>>>> 2. How do you retrieve a service object that has been contributed to
>>>> the framework
>>>>
>>>> Thanks
>>>> Peter
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Howard Lewis Ship <hl...@gmail.com>.
I have some expertise in Tapestry, and I side with Chris.

An ASO is a global object that is associated with a particular user,
typically via the user's HttpSession.  It doesn't have a service interface,
as it is typically a POJO.  Because it doesn't have an interface, Tapesty
doesn't create a proxy for the ASO.

In most cases, the ASO is a true POJO (a true POJO has a public
non-arguments constructor) in which case Tapestry can manage the ASO
entirely, creating it as necessary.  To be honest, since the ASO code was
written, Tapestry has gotten smarter, and could probably operate on a more
complicated constructor using the normal autobuild approach.  This would
allow injection of services into an ASO ... which is dangerous, because
service proxies are not serializable, and an ASO typically must be.

You can also explicitly define the ASO, which gives you an opportunity to
provide the code to instantiate the ASO.  This is what you currently do if
your ASO doesn't have a simple constructor.

If you need to access an ASO from a component, you use the @ApplicationState
annotation, which marks a field as being linked to an ASO.

If a service needs access to an ASO, it must inject the ApplicationState, it
must obtain the ASO from the ApplicationStateManager.

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ApplicationStateManager.html



On 10/15/07, Peter Stavrinides <p....@albourne.com> wrote:
>
> Hi Chris
>
> I am no expert on T5, but strongly disagree with you.
>
> Peter
>
> Chris Lewis wrote:
> > Hi Peter
> >
> > 1) I think the general opinion on this is that a service and an aso
> > are completely different animals. I can't think of a situation where
> > I'd ever want an aso to be a service (or vice versa), but that's just
> > me. If there is a way to do this, someone else will need to chime in.
> >
> > 2) @Inject it. Assuming you bound or built your service, you can
> > simply inject it using @Inject as the general type (usually an
> > interface) of object, and Tapestry IoC will resolve it for you.
> >
> > sincerely,
> > chris
> >
> > Peter Stavrinides wrote:
> >> Hi all,
> >>
> >> Following on from a previous post on this subject I have some
> >> questions on Tapestry 5 IoC:
> >>
> >> 1. How do you register an ASO as a service if you have to provide
> >> arguments to the constructor (i.e. you cannot use @ApplicationState
> >> in this case).
> >>
> >> 2. How do you retrieve a service object that has been contributed to
> >> the framework
> >>
> >> Thanks
> >> Peter
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Hi Chris

I am no expert on T5, but strongly disagree with you.

Peter

Chris Lewis wrote:
> Hi Peter
>
> 1) I think the general opinion on this is that a service and an aso 
> are completely different animals. I can't think of a situation where 
> I'd ever want an aso to be a service (or vice versa), but that's just 
> me. If there is a way to do this, someone else will need to chime in.
>
> 2) @Inject it. Assuming you bound or built your service, you can 
> simply inject it using @Inject as the general type (usually an 
> interface) of object, and Tapestry IoC will resolve it for you.
>
> sincerely,
> chris
>
> Peter Stavrinides wrote:
>> Hi all,
>>
>> Following on from a previous post on this subject I have some 
>> questions on Tapestry 5 IoC:
>>
>> 1. How do you register an ASO as a service if you have to provide 
>> arguments to the constructor (i.e. you cannot use @ApplicationState 
>> in this case).
>>
>> 2. How do you retrieve a service object that has been contributed to 
>> the framework
>>
>> Thanks
>> Peter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Peter Stavrinides <p....@albourne.com>.
Thanks for this Kristian, exactly what I wanted!

cheers,
Peter

Kristian Marinkovic wrote:
> hi peter,
>
> ASOs that have a (non-empty) constructor can be instantiated by 
> contributing to the ApplicationStateManager service. Please see
> the thread for the source. if you contribute to this service you can 
> still use the @ApplicationState annotation.
>
> http://www.nabble.com/-T5-Question-on-ASO-configuration-tf3399851.html#a9469215
>
> g,
> kris
>
>
>
>
> Chris Lewis <ch...@bellsouth.net> 
> 15.10.2007 08:09
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> Tapestry users <us...@tapestry.apache.org>
> Kopie
>
> Thema
> Re: Tapestry 5 service configuration
>
>
>
>
>
>
> Hi Peter
>
> 1) I think the general opinion on this is that a service and an aso are 
> completely different animals. I can't think of a situation where I'd 
> ever want an aso to be a service (or vice versa), but that's just me. If 
> there is a way to do this, someone else will need to chime in.
>
> 2) @Inject it. Assuming you bound or built your service, you can simply 
> inject it using @Inject as the general type (usually an interface) of 
> object, and Tapestry IoC will resolve it for you.
>
> sincerely,
> chris
>
> Peter Stavrinides wrote:
>   
>> Hi all,
>>
>> Following on from a previous post on this subject I have some 
>> questions on Tapestry 5 IoC:
>>
>> 1. How do you register an ASO as a service if you have to provide 
>> arguments to the constructor (i.e. you cannot use @ApplicationState in 
>> this case).
>>
>> 2. How do you retrieve a service object that has been contributed to 
>> the framework
>>
>> Thanks
>> Peter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5 service configuration

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
hi peter,

ASOs that have a (non-empty) constructor can be instantiated by 
contributing to the ApplicationStateManager service. Please see
the thread for the source. if you contribute to this service you can 
still use the @ApplicationState annotation.

http://www.nabble.com/-T5-Question-on-ASO-configuration-tf3399851.html#a9469215

g,
kris




Chris Lewis <ch...@bellsouth.net> 
15.10.2007 08:09
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
Tapestry users <us...@tapestry.apache.org>
Kopie

Thema
Re: Tapestry 5 service configuration






Hi Peter

1) I think the general opinion on this is that a service and an aso are 
completely different animals. I can't think of a situation where I'd 
ever want an aso to be a service (or vice versa), but that's just me. If 
there is a way to do this, someone else will need to chime in.

2) @Inject it. Assuming you bound or built your service, you can simply 
inject it using @Inject as the general type (usually an interface) of 
object, and Tapestry IoC will resolve it for you.

sincerely,
chris

Peter Stavrinides wrote:
> Hi all,
>
> Following on from a previous post on this subject I have some 
> questions on Tapestry 5 IoC:
>
> 1. How do you register an ASO as a service if you have to provide 
> arguments to the constructor (i.e. you cannot use @ApplicationState in 
> this case).
>
> 2. How do you retrieve a service object that has been contributed to 
> the framework
>
> Thanks
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: Tapestry 5 service configuration

Posted by Chris Lewis <ch...@bellsouth.net>.
Hi Peter

1) I think the general opinion on this is that a service and an aso are 
completely different animals. I can't think of a situation where I'd 
ever want an aso to be a service (or vice versa), but that's just me. If 
there is a way to do this, someone else will need to chime in.

2) @Inject it. Assuming you bound or built your service, you can simply 
inject it using @Inject as the general type (usually an interface) of 
object, and Tapestry IoC will resolve it for you.

sincerely,
chris

Peter Stavrinides wrote:
> Hi all,
>
> Following on from a previous post on this subject I have some 
> questions on Tapestry 5 IoC:
>
> 1. How do you register an ASO as a service if you have to provide 
> arguments to the constructor (i.e. you cannot use @ApplicationState in 
> this case).
>
> 2. How do you retrieve a service object that has been contributed to 
> the framework
>
> Thanks
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]: Http Error 500

Posted by Allen Guo <el...@gmail.com>.
Again, nobody can give me some ideas?

Caused by: java.lang.NoSuchFieldError: CONTAINING_PAGE_DID_LOAD_SIGNATURE

Allen Guo 写道:
> Hi All,
>
> Everyday I build Tapestry5.0.6 then add to my project. But recently 
> when I visit the pages of my project , I always get the same error 
> like this :
>
>
> HTTP ERROR: 500
>
> java.lang.ClassNotFoundException: caught an exception while obtaining 
> a class file for org.apache.tapestry.corelib.pages.ExceptionReport
>
> RequestURI=/bogo/MediaDetail
>
> /Powered by Jetty:// <http://jetty.mortbay.org>/
>
> And the deail in console is like this:
> [SocketListener0-1] ERROR 
> org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException() 
> - Processing of request failed with uncaught exception: 
> java.lang.ClassNotFoundException: caught an exception while obtaining 
> a class file for org.opend.bogo.pages.MediaDetail
> java.lang.RuntimeException: java.lang.ClassNotFoundException: caught 
> an exception while obtaining a class file for 
> org.opend.bogo.pages.MediaDetail
> at 
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:258) 
>
> at 
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:240) 
>
> .......
> Caused by: java.lang.ClassNotFoundException: caught an exception while 
> obtaining a class file for org.opend.bogo.pages.MediaDetail
> at javassist.Loader.findClass(Loader.java:359)
> at 
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:85) 
>
> at javassist.Loader.loadClass(Loader.java:311)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at 
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:254) 
>
> ... 55 more
> Caused by: 
> org.apache.tapestry.internal.services.TransformationException: 
> CONTAINING_PAGE_DID_LOAD_SIGNATURE
> at 
> org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:137) 
>
> at 
> $ComponentClassTransformer_115a8643127.transformComponentClass($ComponentClassTransformer_115a8643127.java) 
>
> at 
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:177) 
>
> at javassist.Loader.findClass(Loader.java:340)
> ... 59 more
> Caused by: java.lang.NoSuchFieldError: CONTAINING_PAGE_DID_LOAD_SIGNATURE
> at 
> org.apache.tapestry.internal.services.UnclaimedFieldWorker.transformField(UnclaimedFieldWorker.java:58) 
>
>
>
> What's wrong with it ? Can anybody give me some ideas?
>
> Thank you in advance
>
> Allen Guo
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


[T5]: Http Error 500

Posted by Allen Guo <el...@gmail.com>.
Hi All,

Everyday I build Tapestry5.0.6 then add to my project. But recently when 
I visit the pages of my project , I always get the same error like this :


    HTTP ERROR: 500

java.lang.ClassNotFoundException: caught an exception while obtaining a class file for org.apache.tapestry.corelib.pages.ExceptionReport

RequestURI=/bogo/MediaDetail

/Powered by Jetty:// <http://jetty.mortbay.org>/

And the deail in console is like this:
[SocketListener0-1] ERROR 
org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException() 
- Processing of request failed with uncaught exception: 
java.lang.ClassNotFoundException: caught an exception while obtaining a 
class file for org.opend.bogo.pages.MediaDetail
java.lang.RuntimeException: java.lang.ClassNotFoundException: caught an 
exception while obtaining a class file for org.opend.bogo.pages.MediaDetail
    at 
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:258)
    at 
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:240)
.......
Caused by: java.lang.ClassNotFoundException: caught an exception while 
obtaining a class file for org.opend.bogo.pages.MediaDetail
    at javassist.Loader.findClass(Loader.java:359)
    at 
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:85)
    at javassist.Loader.loadClass(Loader.java:311)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at 
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:254)
    ... 55 more
Caused by: 
org.apache.tapestry.internal.services.TransformationException: 
CONTAINING_PAGE_DID_LOAD_SIGNATURE
    at 
org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:137)
    at 
$ComponentClassTransformer_115a8643127.transformComponentClass($ComponentClassTransformer_115a8643127.java)
    at 
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:177)
    at javassist.Loader.findClass(Loader.java:340)
    ... 59 more
Caused by: java.lang.NoSuchFieldError: CONTAINING_PAGE_DID_LOAD_SIGNATURE
    at 
org.apache.tapestry.internal.services.UnclaimedFieldWorker.transformField(UnclaimedFieldWorker.java:58)


What's wrong with it ?  Can anybody give me some ideas?

Thank you in advance

Allen Guo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org