I'm trying to autowire queues and maps using spring. I'm getting the following exception on startup. Can I inject maps and queues into my app? Am i doing something wrong?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataGrid': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.altisource.real.servicing.datagrid.server.DataGrid.setQueue(com.hazelcast.core.IQueue); nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.util.HashMap$Values' to required type 'com.hazelcast.core.IQueue'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.util.HashMap$Values] to required type [com.hazelcast.core.IQueue]: no matching editors or conversion strategy found
...
<hz:hazelcast id="HazelcastInstance">
<hz:config>
<hz:instance-name>HazelcastInstance</hz:instance-name>
... other details omitted
<hz:queue name="rsJournalQueue" max-size-per-jvm="${hz.journalQueue.maxSizePerJVM}"
backing-map-ref="journalQueueBackingMap" />
<hz:map name="journalQueueBackingMap" backup-count="1">
<hz:map-store enabled="true" implementation="journalQueueBackingMapstore"
write-delay-seconds="0" />
</hz:map>
<hz:map name="workerStateMap" backup-count="1">
<hz:map-store enabled="true" implementation="workerStateMapstore"
write-delay-seconds="0" />
</hz:map>
</hz:config>
</hz:hazelcast>
<bean id="rsJournalQueue" class="com.hazelcast.core.IQueue" factory-bean="HazelcastInstance" factory-method="getQueue">
<constructor-arg value="rsJournalQueue" />
</bean>
<bean id="workerStateMap" factory-bean="HazelcastInstance" factory-method="getMap">
<constructor-arg value="workerStateMap" />
</bean>
@Autowired
@Qualifier("rsJournalQueue")
public void setQueue(IQueue<Object> queue) {
this.rsJournalQueue = queue;
}