Re: [T5] injecting services into Domain Objects

2007-12-11 Thread Thiago H de Paula Figueiredo
On Mon, 10 Dec 2007 20:01:49 -0200, Kristian Marinkovic [EMAIL PROTECTED] wrote: thank you all for your input... Domain Objects sometimes (quite often:)) need other services to meet their function. In this cases, I create a controller class and put the method the implements that function

Re: [T5] injecting services into Domain Objects

2007-12-11 Thread jeffrey ai
, you might choose the 2nd or the 3rd way. In this case, I am favoring the 3rd way. P.S. We have used the combination of 1st and 3rd way in a medium-scale e-commerce software. Cheers, Jeffrey Ai -- View this message in context: http://www.nabble.com/-T5--injecting-services-into-Domain

[T5] injecting services into Domain Objects

2007-12-10 Thread Kristian Marinkovic
hi all, is it possible to use tapestry-ioc to inject services into domain objects? i'm thinking of something like @Configurable in spring. when using (build-time) AOP i need a reference to the registry, but how do i get it? preferably i'd assign the generated proxy to the fields. i'd

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread jeffrey ai
notification; } -- View this message in context: http://www.nabble.com/-T5--injecting-services-into-Domain-Objects-tp14250305p14258571.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Filip S. Adamsen
Well, having a Registry instance in some class is what you would do if you were to run Tapestry 5 IoC as part of a non-web application. I guess you could subclass TapestryFilter and override the init method to get a hold of the Registry for retrieval through a static getter, although I'm not

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Paul Cooley
It's better to have a simple singleton factory to contain the registry. Plus if you were crazy enough to put it into a domain object as a reference (or any service reference) you need to make sure it's marked as transient so it will be ignored when serialization occurs for the domain object. On

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Filip S. Adamsen
Oh, I wasn't talking about sticking it in a class. That'd be... ugh. No. I meant to have some class, presumably a singleton, hold the Registry. But certainly not a domain object. Never. Ever. -Filip Paul Cooley skrev: It's better to have a simple singleton factory to contain the registry.

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Filip S. Adamsen
I meant domain class, sorry. Filip S. Adamsen skrev: Oh, I wasn't talking about sticking it in a class. That'd be... ugh. No. I meant to have some class, presumably a singleton, hold the Registry. But certainly not a domain object. Never. Ever. -Filip Paul Cooley skrev: It's better to

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Kristian Marinkovic
thank you all for your input...Domain Objectssometimes (quite often:)) needother services to meet their function. if you retrieve your entities from sayHibernateyou can use the Tuplizer to inject any other services you need. You can also achieve this if you ALWAYS create your Domain Objects using

Re: [T5] injecting services into Domain Objects

2007-12-10 Thread Paul Cooley
. Adamsen [EMAIL PROTECTED] Datum: 10.12.2007 09:08PM Thema: Re: [T5] injecting services into Domain Objects I meant domain class, sorry. Filip S. Adamsen skrev: Oh, I wasn't talking about sticking it in a class. That'd be... ugh. No. I meant to have some class, presumably a singleton