Hi.
I am not sure if I understood your question, but you can create inject
objects annotated with parameters. See
http://code.google.com/p/google-guice/wiki/BindingAnnotations

So you can for example do things like this:

@EntityManager("EntityManger")
EntityManager em;
@EntityManager("EntityManger2")
EntityManager em2;

2010/10/25 Josh Kamau <[email protected]>

> Hi Team;
>
> I am trying to do domain driven development. I would like my domain model
> objects to have all their behaviour methods. Previously i have been using
> dao's and managers to hold the behavior methods for the domain classes (i
> hope its clear). My question is, How do i inject services into my domain
> objects? is it a good idea? i would like to for example inject the entity
> manager to a domain class so that i can call save from the domain object its
> self.
>
> Kind regards.
> Josh
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-guice%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to