Sorry for that - its just that howard's name was on the article...

now it seems autowiring does not function (in my case). Where do I look?
How come that DEBUG logging in hivemind yealds that little ?

ציטוט James Carman:
Yes, provided everything is configured correctly, your dependency should be
"autowired" in.  I'm working on an HSQLDB-based version of my (by the way I
wrote that article not Howard...of course he helped me proofread).  Anyway,
I'm going to make available via my subversion repository momentarily (as
soon as I can figure out how to configure SVN-Apache to only show certain
project) and I'll send out an email showing you how to access it.  I'm not
sure if I can make it available on the Apache site given that it uses
third-party libraries.  I'm not a licensing expert, so I don't want to break
any rules.



-----Original Message-----
From: Achim Hügen [mailto:[EMAIL PROTECTED] Sent: Monday, August 08, 2005 5:11 PM
To: [email protected]
Subject: Re: Newbie question

No, actually Vinicius is right.
In this case autowiring of properties should happen.
If both of you have suffered from this problem, could you please
make a small test case and open an issue? (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10500).

Thanks
Achim


Am Mon, 8 Aug 2005 17:36:55 -0300 schrieb Vinicius Carvalho <[EMAIL PROTECTED]>:


Hello there! Yeah, unless your class has a constructor you must tell
it what setters to use, at least the same problem was happening to me
and I solved (Actually, Hugo Palma gave me the hint :D )

<service-point id="localPortals"
   interface="RLocalPortals"/>
<implementation service-id="localPortals">
     <invoke-factory>
       <construct class="impl.RLocalPortalsImpl">
<set-object property="session" value="service:sessionFactory"/>
       </construct>
     </invoke-factory>
</implementation>

Cheers


On 8/8/05, Ron Piterman <[EMAIL PROTECTED]> wrote:

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]





---------------------------------------------------------------------
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]

Reply via email to