Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 2821 invoked from network); 23 Aug 2005 20:21:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2005 20:21:12 -0000 Received: (qmail 87339 invoked by uid 500); 23 Aug 2005 20:21:21 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 87324 invoked by uid 500); 23 Aug 2005 20:21:21 -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 87311 invoked by uid 99); 23 Aug 2005 20:21:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 13:21:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of avi@cherrydev.com designates 216.40.216.206 as permitted sender) Received: from [216.40.216.206] (HELO comatose.insomniaque.net) (216.40.216.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 13:21:37 -0700 Received: from [24.81.144.212] (helo=[24.81.144.212]) by comatose.insomniaque.net with asmtp (Exim 3.35 #1 (Debian)) id 1E7fGo-0005IH-00 for ; Tue, 23 Aug 2005 13:21:18 -0700 Mime-Version: 1.0 (Apple Message framework v622) In-Reply-To: <200508232004.j7NK3w2v032648@carmanconsulting.com> References: <200508232004.j7NK3w2v032648@carmanconsulting.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <27bcb76e11fb4f307eb029e687ea0689@cherrydev.com> Content-Transfer-Encoding: 7bit From: Cherry Development Subject: Re: Injecting a state object into another service? Date: Tue, 23 Aug 2005 13:21:30 -0700 To: hivemind-user@jakarta.apache.org X-Mailer: Apple Mail (2.622) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sorry, I didn't explain this particular well, I think. I was planning to get the 'final' object out of hivemind, not out of spring. I've already pulled the spring object into hivemind, and can vend the object out of hivemind this way. This already works. 'All' I need to do is to assign a hivemind 'state' object into my service before I send it out of hivemind (and into Tapestry). Here's a full example of what I want to do: I have spring services that need to interact with session-stateful object. Rather than pass the stateful object into my service from the presentation layer (Tapestry) each time I run a service method, I'd like to have my service object come pre-injected with my stateful object. I could try to do this entirely within spring, but as things are now, I have no simple way to get Spring to access the session. Therefore, I was planning to go around the other way: Inject my spring object into hivemind, set the stateful object into a property of my spring service, then inject the result (spring service object with a hivemind stateful object as a property) into my tapestry pages. I'm pretty sure this isn't difficult to do, but I simply don't know enough about how hivemind works to be able to make it happen. I guess I'm just looking for something like BuilderFactory, which will let me set arbitrary objects into services, except that I don't want to actually create a new instance of the object. I'd appreciate any advice you can offer. Thanks, Avi On Aug 23, 2005, at 1:04 PM, James Carman wrote: > That's not something you should ask us. That's something you should > ask the > Spring folks. HiveMind doesn't do the injecting into Spring-managed > objects. HiveMind can, however, use Spring-managed objects as > services (and > inject them into its own objects that it manages). How often do you > run > across this case? If it's just this once, you might create a little > bean > that's able to delegate/proxy to the service in the hivemind registry. > You > could have Spring instantiate that bean and inject it into its object. --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org