hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <knut.wannhe...@gmail.com>
Subject Re: Autowire Question
Date Wed, 04 May 2005 06:51:03 GMT
Richard,

This looks like a bug to me. Could you please open an issue in JIRA
and attach the involved Java classes and HiveMind module descriptor
snippet? A JUnit test would be even better :-)

I think you forgot to mention the actual chunk of documentation you
were talking about. But here a clarification: Constructor parameters
will not turn off autowire-services, it will merely restrict it to
setter based injection.

--knut

On 5/4/05, Hensley, Richard <Richard.Hensley@mckesson.com> wrote:
> I found the following chunk of documentation that leads me to believe that
> autowire-services is turned off when constructor parameter elements are
> used. However, I get the following exception when I use constructor
> elements, but do not use autowire-services="false". When I add
> autowire-services="false", the service constructs correctly.
> 
> I have the following service-point element:
> 
>     <service-point id="Updater" interface="java.lang.Runnable">
>         <invoke-factory>
>             <construct class="sync.Updater">
>                 <service>com.mckesson.starteam.ChangeRequestSearch</service>
>                 <int>${starteam.index.sync.interval}</int>
>             </construct>
>         </invoke-factory>
>     </service-point>
> 
> When I construct it, I get the following.
> 
> ERROR HiveMindFilter:93 - Unable to construct service
> com.mckesson.starteam.web.Updater: Error building service
> com.mckesson.startea
> m.web.Updater: Unable to find constructor applicable for autowiring. Use
> explicit constructor parameters.
> org.apache.hivemind.ApplicationRuntimeException: Unable to construct service
> com.mckesson.starteam.web.Updater: Error building servi
> ce com.mckesson.starteam.web.Updater: Unable to find constructor applicable
> for autowiring. Use explicit constructor parameters. [fi
> le:/C:/devlabtip/java/starteamcrweb/eclipse-target/META-INF/hivemodule.xml,
> line 4, column 25]
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewS
> erviceImplementation(AbstractServiceModelImpl.java:1
> 65)
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServ
> iceImplementation(AbstractServiceModelImpl.java:139)
>         at
> org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualService
> Implementation(SingletonServiceModel.java:68)
>         at $Runnable_103a4b68467._service($Runnable_103a4b68467.java)
>         at
> $Runnable_103a4b68467._instantiateServiceImplementation($Runnable_103a4b6846
> 7.java)
>         at
> org.apache.hivemind.impl.servicemodel.SingletonServiceModel.instantiateServi
> ce(SingletonServiceModel.java:272)
>         at
> org.apache.hivemind.impl.ServicePointImpl.forceServiceInstantiation(ServiceP
> ointImpl.java:309)
>         at
> org.apache.hivemind.service.impl.EagerLoader.run(EagerLoader.java:39)
>         at org.apache.hivemind.impl.StartupImpl.run(StartupImpl.java:38)
>         at $Runnable_103a4b68455.run($Runnable_103a4b68455.java)
>         at $Runnable_103a4b68454.run($Runnable_103a4b68454.java)
>         at
> org.apache.hivemind.impl.RegistryInfrastructureImpl.startup(RegistryInfrastr
> uctureImpl.java:420)
>         at
> org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.j
> ava:154)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message