Regarding to 
http://groups.google.com/group/google-guice/browse_thread/thread/8ded68ad96146188?hl=en
this issue is going to be addressed in the current trunk. As far as I
see, the problem discussed in the other thread exactly deals with your
problem.

On Oct 20, 5:08 pm, Adam Ruggles <[EMAIL PROTECTED]> wrote:
> I've used the maven repository at kamalook and guiceyfruit.  Both are
> suppose to be running 2.0.
>
> On Oct 20, 2:44 am, tzwoenn <[EMAIL PROTECTED]> wrote:
>
> > Just because of curiosity: Have you tried this using the current trunk
> > (available 
> > fromhttp://www.kamalook.de:8080/hudson/job/Guice/lastBuild/com.google.inj...)
> > or Guice 1.0 ?
>
> > Regards, Sven
>
> > On Oct 19, 7:25 pm, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
> > > I don't think that will help me since guice is not able to understand
> > > that CoreDAO<T> in the abstract super class becomes CoreDAO<User> in
> > > my UserService bean.
>
> > > On Oct 19, 2:41 am, tzwoenn <[EMAIL PROTECTED]> wrote:
>
> > > > Creating bindings using TypeVariables looks like:
>
> > > > bind(new TypeLiteral<Store<Project, Query<Project>>>() {})
> > > > .toInstance(new JpaStore<Project, Query<Project>>);
>
> > > > Keep in mind, to above mentioned way manually creates a singleton; not
> > > > very guicy anyway.
>
> > > > On Oct 19, 9:53 am, Rahul <[EMAIL PROTECTED]> wrote:
>
> > > > > How are you binding using TypeLiteral instances? I have done something
> > > > > similar like this:
>
> > > > > bind(new TypeLiteral<Store<Project, Query<Project>>>() { }).to(new
> > > > > TypeLiteral<JpaStore<Project, Query<Project>>>() {   });
>
> > > > > Guice 2.0 snapshots already support binding using TypeLiteral. I
> > > > > haven't used 1.0 so can't comment on it.
>
> > > > > HTH,
>
> > > > > Rahul
>
> > > > > On Oct 19, 2:09 pm, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
> > > > > > Do you know when Guice 2.0 is suppose to be able to handle binding 
> > > > > > in
> > > > > > the way you mention.  I tried using guice 2.0 and still attempts to
> > > > > > bind to CoreDAO<T>.
>
> > > > > > On Oct 2, 7:05 am, tzwoenn <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Have you bind your DAOs?
> > > > > > > bind(new TypeLiteral<CoreDAO<User>>(){}).to(UserJPADAO.class);
> > > > > > > bind(new TypeLiteral<CoreDAO<Topic>>(){}).to(TopicJPADAO.class);
>
> > > > > > > Actually I do not know, whether Guice 1.0 is able to figure out 
> > > > > > > the
> > > > > > > generic type of inhereted injection points is. I believe this 
> > > > > > > will be
> > > > > > > implemented in Guice 2.0.
>
> > > > > > > BR, Sven
>
> > > > > > > On Oct 2, 8:29 am, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > I simplified my use of generics and I still can seem to figure 
> > > > > > > > this
> > > > > > > > one out.  Here are my test Services.
>
> > > > > > > > public abstract class AbstractService <T extends CoreEntity<?>>
> > > > > > > > implements CoreService<T> {
> > > > > > > >     protected CoreDAO<T> dao;
>
> > > > > > > >         @Inject
> > > > > > > >         public void setDao(final CoreDAO<T> dao) {
> > > > > > > >                 this.dao = dao;
> > > > > > > >         }
>
> > > > > > > >         ... Methods that use the dao ...
>
> > > > > > > > }
>
> > > > > > > > public class UserServiceImpl extends AbstractService<User> 
> > > > > > > > implements
> > > > > > > > UserService {
>
> > > > > > > > }
>
> > > > > > > > public class TopicServiceImpl extends AbstractService<Topic>
> > > > > > > > implements TopicService {
>
> > > > > > > > }
>
> > > > > > > > On Oct 1, 1:10 pm, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > I'm not seeing how to handle the following situation.
>
> > > > > > > > > I have a AbstractService bean with the following protected 
> > > > > > > > > object
>
> > > > > > > > > public abstract class AbstractService <T extends 
> > > > > > > > > CoreEntity<ID>, ID
> > > > > > > > > extends Serializable> implements CoreService<T, ID> {
> > > > > > > > >     protected CoreDAO<T, ID> dao;
>
> > > > > > > > >         @Inject
> > > > > > > > >         public void setDao(final CoreDAO<T, ID> dao) {
> > > > > > > > >                 this.dao = dao;
> > > > > > > > >         }
>
> > > > > > > > >         ... Methods that use the dao ...
>
> > > > > > > > > }
>
> > > > > > > > > public class UserServiceImpl extends AbstractService<User, 
> > > > > > > > > Integer>
> > > > > > > > > implements UserService {}
>
> > > > > > > > > public class TopicServiceImpl extends AbstractService<Topic, 
> > > > > > > > > Integer>
> > > > > > > > > implements TopicService {
>
> > > > > > > > > }
>
> > > > > > > > > Now how do I tell Guice to use UserJPADAO.class for the
> > > > > > > > > UserServiceImpl and TopicJPADAO.class for TopicServiceImpl?
--~--~---------~--~----~------------~-------~--~----~
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