Hi Val,

Problem solved by using new class to extends from CacheJdbcPojoStoreFactory to 
solve this problem. But I think ignite should consider why the default 
CacheJdbcPojoStoreFactory not work, there might be a bug, because using default 
 CacheJdbcPojoStoreFactory even with datasource bean defined not work.

In my case, change the cachejdbcpojostorefactory bean class under 
cacheconfiguration bean to an self defined class which is extend from 
CacheJdbcPojoStoreFactory, with data source added inside the create metehod.
For example:
Change :
<property name="cacheStoreFactory">
                        <bean 
class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"> 
                        ....
To

<property name="cacheStoreFactory">
                                
                                        <bean 
class="this.is.package.CacheJdbcPojoStoreExampleFactory">

Where inside the CacheJdbcPojoStoreExampleFactory  implement create method like 
this:

//创建 oracle data source 对象
        OracleDataSource oracleDataSource;
        try
        {
            oracleDataSource = new OracleDataSource();
            oracleDataSource.setURL(IgniteMetaUtils.NEW_DB_ADDR);
            oracleDataSource.setUser(IgniteMetaUtils.NEW_USER);
            oracleDataSource.setPassword(IgniteMetaUtils.NEW_PASS);
 
            //设定data source
            setDataSource(oracleDataSource);
        }
        catch (SQLException e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

-----邮件原件-----
发件人: vkulichenko [mailto:[email protected]] 
发送时间: 2016年7月20日 7:36
收件人: [email protected]
主题: Re: ignite Spring application context resource is not injected problem

Hi Kevin,

Can you please provide the whole configuration file and also show how you start 
the node? Is it a standalone node started with ignite.sh script or an embedded 
node started in code using Ignition.start()?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/ignite-Spring-application-context-resource-is-not-injected-problem-tp6377p6397.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to