typo correction.
Thanks Manu. > > if i understand it correctly, if connection is closed due to cluster node > failure, client will automatically recreate connection using discovery > configuration. > > and *jdbc connection does support connection pool*. > > thanks for your help. > > > > > > On 24 October 2016 at 18:12, Manu <[email protected]> wrote: > >> Hi, >> >> as you know, org.apache.ignite.internal.jdbc2.JdbcConnection is an >> implementation of java.sql.Connection, works always on client mode (this >> flag is hardcoded to true when load xml configuration passed on connection >> url) and works on read mode (only select). On same java VM instance, >> connection (ignite instance) is cached internally in JdbcConnection by >> url, >> so for same connection (type, path, collocation...) you only have (and >> need) >> one ignite instance. For more info check this >> https://apacheignite.readme.io/docs/jdbc-driver >> <https://apacheignite.readme.io/docs/jdbc-driver> >> >> As a java.sql.Connection, you could use a javax.sql.DataSource >> implementation to manage it and checks connection status (validation >> query) >> etc, but you don't need a pool, for example: >> >> <spring:bean id="collocatedDbcpIgniteDataGridDataSource" >> destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"> >> <spring:property name="driverClassName" >> value="org.apache.ignite.IgniteJdbcDriver"/> >> <spring:property name="url" >> value="jdbc:ignite:cfg://cache=default:collocated=true:local=false@ignite >> /data_grid/ignite-client.xml"/> >> <spring:property name="validationQuery" value="select >> count(*) from >> "default".string limit 1"/> >> <spring:property name="removeAbandoned" value="true"/> >> <spring:property name="removeAbandonedTimeout" >> value="300"/> >> <spring:property name="logAbandoned" value="true"/> >> </spring:bean> >> >> >> [...] >> This is client ignite configuration with default cache (dummy, without >> data, >> only used to validate client connection) used on url of >> collocatedDbcpIgniteDataGridDataSource >> >> <bean id="ignite.client.default.cfg.jdbc" >> class="org.apache.ignite.configuration.IgniteConfiguration"> >> <property name="clientMode" value="true" /> >> <property name="peerClassLoadingEnabled" value="false" /> >> <property name="metricsLogFrequency" value="0"/> >> </property> >> <property name="cacheConfiguration"> >> <list> >> <bean class="org.apache.ignite.confi >> guration.CacheConfiguration"> >> <property name="name" >> value="<b>default*" /> >> <property name="cacheMode" >> value="PARTITIONED" /> >> <property name="indexedTypes"> >> <array> >> >> <value>java.lang.String</value> >> >> <value>java.lang.String</value> >> </array> >> </property> >> </bean> >> [...] >> >> >> >> -- >> View this message in context: http://apache-ignite-users.705 >> 18.x6.nabble.com/Ignite-Jdbc-connection-tp8431p8436.html >> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >> > >
