Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 15880 invoked from network); 9 Jun 2005 12:26:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 12:26:09 -0000 Received: (qmail 62581 invoked by uid 500); 9 Jun 2005 12:26:03 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 62543 invoked by uid 500); 9 Jun 2005 12:26:02 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: hivemind-user@jakarta.apache.org List-Id: Delivered-To: mailing list hivemind-user@jakarta.apache.org Received: (qmail 62521 invoked by uid 99); 9 Jun 2005 12:26:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of gstamp@gmail.com designates 64.233.170.205 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.205) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 09 Jun 2005 05:25:55 -0700 Received: by rproxy.gmail.com with SMTP id i8so132686rne for ; Thu, 09 Jun 2005 05:25:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TdpdgFNVdPrbL/GmwRqwfjBKsFC+ph/PM86d4hkUJhM2TytEv23sdvIxFjz+Tqdhd3fHYifG8NA5k8eYDEbL8ramcLDAV/Ab0mUkxctVBSOksFJF3wlmvz+2/0SCB9839wclvXHHfw2quF9rSFEcfNHt3O903BQYlMz1GFO1AQE= Received: by 10.38.78.79 with SMTP id a79mr277465rnb; Thu, 09 Jun 2005 05:25:42 -0700 (PDT) Received: by 10.38.104.5 with HTTP; Thu, 9 Jun 2005 05:25:42 -0700 (PDT) Message-ID: Date: Thu, 9 Jun 2005 22:25:42 +1000 From: Glen Stampoultzis Reply-To: Glen Stampoultzis To: hivemind-user@jakarta.apache.org Subject: Re: Debugging autowiring In-Reply-To: <999C22DD-05D8-47CA-B55B-055B9E04A1FE@vasoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <878B5D20-8BC8-475F-8CAC-AACF105047E1@vasoftware.com> <999C22DD-05D8-47CA-B55B-055B9E04A1FE@vasoftware.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I also find autowiring tough to debug. The error messages are line precise but not very helpful. On 6/9/05, Chris Conrad wrote: > So, it appears that my description of the problem from last night is > no longer correct. Autowiring now seems to be not working correctly > for multiple services in one of my modules. The module descriptor > looks like this: >=20 > >=20 > interface=3D"AuthenticationService"> > > > {sessionTimeout}"/> > id=3D"SessionRepository"/> > id=3D"SessionManager"/> > > > > >=20 > interface=3D"java.lang.Runnable" visibility=3D"private"> > > > {sessionTimeout}"/> > id=3D"SessionRepository"/> > > > > >=20 > interface=3D"impl.SessionManager" visibility=3D"private"> > > > > >=20 > interface=3D"impl.SessionRepository" visibility=3D"private"> > > > > > >=20 >=20 > If you notice, both the AuthenticationService and SessionCleanupTask > have set-service elements. Those two services are not being > autowired correctly, I need to use the set-service element to get the > services they depend on injected. The Java code seems to meet the > requirements for BuilderFactory to do the autowiring but you can > check for yourself: >=20 > public void setSessionManager(SessionManager sessionManager) { > this.sessionManager =3D sessionManager; > } >=20 > public void setSessionRepository(SessionRepository > sessionRepository) { > this.sessionRepository =3D sessionRepository; > } >=20 > setSessionRepository is identical in both of the services that aren't > getting autowired. I know this for a fact since I just cut and > pasted the code from one to the other. >=20 > Am I don't something wrong here? If not, how can I figure out why > HiveMind isn't autowiring my services? My AuthenticationService also > depends on two other services not defined in this module and those > two services are being correctly autowired. And both of the two > troublesome services are getting their Log properties autowired > correctly as well. This is doubly bothersome to me since last night > the AuthenticationService was being autowired correctly. The only > difference between last night and tonight is I added the reference to > the SessionManager service. >=20 > Thanks, > --Chris >=20 > On Jun 8, 2005, at 2:13 AM, Chris Conrad wrote: >=20 > > Hello, > > > > I have two services in the same module and both of them need to > > have a third service (also in that same module) injected. Both of > > the services are defined exactly the same and the setter is > > identical in both (I cut and pasted the code to be sure of that). > > But when I run my application, only one of the two services is > > correctly autowired. I've been trying to debug this issue myself, > > but have found the code which performs the autowiring to be > > difficult to trace through and the debug logging doesn't really say > > anything about what properties it found to be autowirable. Is > > there a simple method for figuring out why HiveMind isn't > > autowiring the one service correctly? I'm working around the issue > > right now by using set-service in the construct tag for the service > > being mis-wired, but I'd prefer to avoid the excess XML when it > > shouldn't be necessary. > > > > Thanks, > > --Chris > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org > > > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org >=20 > --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org