Hi Denis,
        
        I try to use Ignite cache to store the service object. 
        The object use Externalizable interface and has a @Autowired field.
        
        When different node use this object, the @Autowired field will be 
null,even @SpringResources on the field.

        The field like JPA interface , it can’t be serialization.

Wei Jiang


> 在 2016年1月22日,下午2:58,Denis Magda <[email protected]> 写道:
> 
> Hi,
> 
> Spring resource injection is considered to be used only for Ignite Compute 
> Jobs.
> 
> It's quite expensive operation to inject a resource for a CacheEntry cause 
> this logic will be called for every entry stored in a cache.
> 
> Why do you need to inject the resource into a CacheEntry? What do you try to 
> achieve?
> 
> Regards,
> Denis
> 
> On 1/22/2016 6:26 AM, 姜 为 wrote:
>> Hi Igniters,
>>      
>>      I’m using Ignite cache store objects.  The object use Externalizable 
>> interface
>>         to serialization  and deserialization.
>>      When object has field use @SpringSource will not inject.
>> 
>>      Should add resource inject to Ignite cache?
>> 
>>      example :
>> 
>>      class Entey implements Externalizable {
>>           @SpringSource(“springSource")
>>            private Service service;
>>   
>>            public void read… and write...
>>        }
> 

Reply via email to