Are you saying that it doesn't autowire dependencies of type "X"? Or, are you saying that it doesn't autowire in dependencies declared in AbstractImpl when it instantiates XImpl?
-----Original Message----- From: Ron Piterman [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 2:11 PM To: [email protected] Subject: Re: Newbie question The problem seems to be in inheritance. My RLocalPortalsImpl extends some other class, which in turn, implements an interface. -->> AbstarctImpl implements Abstract -->> XImpl extends AbstractImpl implements X (Note that "Abstarct" is not registered in hivemind) in this case, hivemind does not auto-wire the dependencies of XImpl. is this a bug? or is it ok? removing the inheritance solved the problem. Cheers, Ron Ron Piterman: > Hi, > I use the hibernate example from howards article in TSS, but I am not > sure I understand HiveMind correctly: > > When I define a service for Interface X, and in the implementation class > of some other service, I add a setter: setBla(X x), hivemind should set > an X instance to the Service implementation automatically? > > Or do I have to explicitly add <set-service... to each factory ? > > > In a repository implementation , the hibernate session is not being set. > > Nothing on the logs (DEBUG level) - how do I get to the source of the > problem? > > > Here are some files... > Thanx, Ron > > > ... > <service-point id="sessionFactory" > interface="org.apache.hivemind.ServiceImplementationFactory" > parameters-occurs="none"/> > > <service-point id="session" interface="org.hibernate.Session"/> > ... > > <service-point id="localPortals" > interface="RLocalPortals"/> > <implementation service-id="localPortals"> > <invoke-factory> > <construct class="impl.RLocalPortalsImpl"/> > </invoke-factory> > </implementation> > > --- > > public class RLocalPortalsImpl extends AbstractRepositoryImpl implements > RLocalPortals { > > public List getRegistrationCountries() { > Query q = > session.getNamedQuery("registration-countries"); // *NullPExcep* > return q.list(); > } > public void setSession(Session session) { > this.session = session; > } > } > > --- > > On the session.getNamedQuery(...) I get a null pointer exception, > meaning the session is null :-( > > Wo what did I do wrong? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
