Thanks for the advice, I hadn't heard of tapernate. Basically, I'm trying to expose all of my spring beans to make them available for autowiring. I don't want to explicitly declare each one in my hivemodule.xml if I can avoid it. I was hoping there might be an existing module that would take a SpringBeanFactory, iterate through the beans, find the declared interfaces, and register them with the RegistryInfrastructureimpl as a ServicePoint (handwave, handwave). Customizations might include the ability to package specify what interfaces to expose, allow for logic to log.error if multiple beans from Spring support the same interface, etc. I could definitely see writing a custom SpringBeanExposer (handwave) that, given a list of spring beans, returns a map of interfaces to particular spring beans, that the end user had to implement. At the end of the day, regardless of implementation, I'm basically just trying to register the interface implemented by the Spring beans in such a way that those beans are available to the autowiring functionality of hivemind when an object with a setter matching that interface is being constructed. This seemed similar to the existing tapestry-spring exposure, where any spring bean is available through the spring: namespace, without having to individually declare each one.
James Carman wrote: > > Even Tapernate won't consider spring beans for autowiring. Spring > beans aren't "services" in the HiveMind world. That's not to say that > you can't expose them as services, but you have to explicitly set up a > service declaration and use the SpringLookupFactory as your > implementation factory. Tapestry 4.x has built-in (used to be an > external module called tapestry-autowire) support for autowiring of > HiveMind services. All you have to do is declare an abstract "getter" > of the type you need (as long as there's exactly one service in the > registry that has that service interface, which is usually the case) > on your component/page class. > > On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> have a look at tapernate (http://www.carmanconsulting.com/tapernate/) >> >> > -----Original Message----- >> > From: Ari Miller [mailto:[EMAIL PROTECTED] >> > Sent: Friday, August 31, 2007 12:35 AM >> > To: [email protected] >> > Subject: tapestry-spring autowiring >> > >> > >> > We are using hivemind 1.1. >> > Many of our services are autowired with our existing >> > persistence services. >> > We want to switch to injecting in our persistence services >> > from Spring, to take advantage of container managed transactions. >> > I can inject in spring beans using the tapestry-spring >> > functionality, but autowiring doesn't seem to be available. >> > Is there an established pattern for also considering Spring >> > beans when autowiring within hivemind? >> > >> > P.S. >> > I am aware of hivetranse, but would prefer to use Spring for >> > this purpose. >> > -- >> > View this message in context: >> > http://www.nabble.com/tapestry-spring-autowiring-tf4357304.htm >> l#a12417539 >> > Sent from the Hivemind - User mailing list archive at Nabble.com. >> > >> > >> > > -- View this message in context: http://www.nabble.com/tapestry-spring-autowiring-tf4357304.html#a12428140 Sent from the Hivemind - User mailing list archive at Nabble.com.
