Re: Hibernate L2 cache with Ignite. How?

2018-08-09 Thread ezhuravlev
Hi,

Are you sure that you access the same cache that is used for l2? Try to
invoke Ignite.cacheNames() - it will give you a list of caches in the
cluster, using that, you can check that use right cache.

Evgenii



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-14 Thread monstereo
Finally I can run the codes, and I am getting cache hits, puts or miss.

But I want to iterate all the cache, and want to see how many elements in
it.

(I could not see any configuration about cache key,value in the
ignite-configuration.xml) 
(Actually its size always showing 0) 
In ignite configuration.xml:











Here is the code that I have written:

public static void printCache(Ignite ignite){
IgniteCache igniteCache = ignite.getOrCreateCache("Person");
Iterator itr = igniteCache.iterator();
System.out.println("asdaas");
while (itr.hasNext()){
System.out.println(itr.next().getKey() + " " +
itr.next().getValue());
}
}





ezhuravlev wrote
> Why can't you add the dependency from the 3rd party repository, that was
> described on the page I've shared earlier?
> 
> Evgenii
> 
> 2018-07-12 16:22 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> I know, it is hard to answer, but I don't know what exactly I should
>> do...
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread monstereo
I couldn't find it...

ezhuravlev wrote
> Why can't you add the dependency from the 3rd party repository, that was
> described on the page I've shared earlier?
> 
> Evgenii
> 
> 2018-07-12 16:22 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> I know, it is hard to answer, but I don't know what exactly I should
>> do...
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread Evgenii Zhuravlev
Why can't you add the dependency from the 3rd party repository, that was
described on the page I've shared earlier?

Evgenii

2018-07-12 16:22 GMT+03:00 monstereo :

> I know, it is hard to answer, but I don't know what exactly I should do...
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread monstereo
I know, it is hard to answer, but I don't know what exactly I should do... 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread monstereo
?


ezhuravlev wrote
> I've added maven dependency as was described before and this problem was
> resolved.
> 
> Evgenii
> 
> 2018-07-12 15:25 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> I can not solve this error :
>>
>> *Exception in thread "main" org.hibernate.service.spi.ServiceException:
>> Unable to create requested service
>> [org.hibernate.cache.spi.RegionFactory]
>>
>> at
>> org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(
>> AbstractServiceRegistryImpl.java:244)
>> at
>> org.hibernate.service.internal.AbstractServiceRegistryImpl.
>> initializeService(AbstractServiceRegistryImpl.java:208)
>> at
>> org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(
>> AbstractServiceRegistryImpl.java:189)
>> at
>> org.hibernate.boot.internal.MetadataBuilderImpl$
>> MetadataBuildingOptionsImpl.
> 
> (MetadataBuilderImpl.java:663)
>> at
>> org.hibernate.boot.internal.MetadataBuilderImpl.
> 
> (MetadataBuilderImpl.java:127)
>>
>> at
>> org.hibernate.boot.internal.MetadataBuilderImpl.
> 
> (MetadataBuilderImpl.java:94)
>>
>> at
>> org.hibernate.boot.MetadataSources.getMetadataBuilder(MetadataSources.java:125)
>>
>> at
>> org.hibernate.boot.MetadataSources.buildMetadata(MetadataSources.java:179)
>>
>> at MainApp.createHibernateSessionFactory(MainApp.java:31)   at
>> MainApp.main(MainApp.java:65) Caused by:
>> org.hibernate.HibernateException:
>> could not instantiate RegionFactory
>> [org.apache.ignite.cache.hibernate.HibernateRegionFactory]  at
>> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
>> RegionFactoryInitiator.java:84)
>> at
>> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
>> RegionFactoryInitiator.java:29)
>> at
>> org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.
>> initiateService(StandardServiceRegistryImpl.java:88)
>> at
>> org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(
>> AbstractServiceRegistryImpl.java:234)
>> ... 9 more Caused by:
>> org.hibernate.boot.registry.selector.spi.StrategySelectionException:
>> Unable
>> to resolve name
>> [org.apache.ignite.cache.hibernate.HibernateRegionFactory]
>> as strategy [org.hibernate.cache.spi.RegionFactory] at
>> org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.
>> selectStrategyImplementor(StrategySelectorImpl.java:113)
>> at
>> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
>> RegionFactoryInitiator.java:71)
>> ... 12 more*
>>
>>
>> I have a database (postgres) which has Person table in testdb database,
>> and
>> includes id, name, age, salary columns
>>
>> Here is the my hibernate config file :  hibernate-cfg.xml
>> http://apache-ignite-users.70518.x6.nabble.com/file/
>  t1901/hibernate-cfg.xml>
>>
>> Here is the Person class  :  Person.java
>> http://apache-ignite-users.70518.x6.nabble.com/file/t1901/Person.java;
>>
>> Here is the ignite configuration:  ignite-configuration.xml
>> http://apache-ignite-users.70518.x6.nabble.com/file/
>  t1901/ignite-configuration.xml>
>>
>> Here is the IgniteFactory class(I have created) :  IgniteFactory.java
>> http://apache-ignite-users.70518.x6.nabble.com/file/
>  t1901/IgniteFactory.java>
>>
>> Finally main class :  MainApp.java
>> http://apache-ignite-users.70518.x6.nabble.com/file/t1901/MainApp.java;
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread Evgenii Zhuravlev
I've added maven dependency as was described before and this problem was
resolved.

Evgenii

2018-07-12 15:25 GMT+03:00 monstereo :

> I can not solve this error :
>
> *Exception in thread "main" org.hibernate.service.spi.ServiceException:
> Unable to create requested service [org.hibernate.cache.spi.RegionFactory]
>
> at
> org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(
> AbstractServiceRegistryImpl.java:244)
> at
> org.hibernate.service.internal.AbstractServiceRegistryImpl.
> initializeService(AbstractServiceRegistryImpl.java:208)
> at
> org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(
> AbstractServiceRegistryImpl.java:189)
> at
> org.hibernate.boot.internal.MetadataBuilderImpl$
> MetadataBuildingOptionsImpl.(MetadataBuilderImpl.java:663)
> at
> org.hibernate.boot.internal.MetadataBuilderImpl.(MetadataBuilderImpl.java:127)
>
> at
> org.hibernate.boot.internal.MetadataBuilderImpl.(MetadataBuilderImpl.java:94)
>
> at
> org.hibernate.boot.MetadataSources.getMetadataBuilder(MetadataSources.java:125)
>
> at
> org.hibernate.boot.MetadataSources.buildMetadata(MetadataSources.java:179)
>
> at MainApp.createHibernateSessionFactory(MainApp.java:31)   at
> MainApp.main(MainApp.java:65) Caused by: org.hibernate.HibernateException:
> could not instantiate RegionFactory
> [org.apache.ignite.cache.hibernate.HibernateRegionFactory]  at
> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
> RegionFactoryInitiator.java:84)
> at
> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
> RegionFactoryInitiator.java:29)
> at
> org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.
> initiateService(StandardServiceRegistryImpl.java:88)
> at
> org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(
> AbstractServiceRegistryImpl.java:234)
> ... 9 more Caused by:
> org.hibernate.boot.registry.selector.spi.StrategySelectionException:
> Unable
> to resolve name [org.apache.ignite.cache.hibernate.HibernateRegionFactory]
> as strategy [org.hibernate.cache.spi.RegionFactory] at
> org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.
> selectStrategyImplementor(StrategySelectorImpl.java:113)
> at
> org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(
> RegionFactoryInitiator.java:71)
> ... 12 more*
>
>
> I have a database (postgres) which has Person table in testdb database, and
> includes id, name, age, salary columns
>
> Here is the my hibernate config file :  hibernate-cfg.xml
>  t1901/hibernate-cfg.xml>
>
> Here is the Person class  :  Person.java
> 
>
> Here is the ignite configuration:  ignite-configuration.xml
>  t1901/ignite-configuration.xml>
>
> Here is the IgniteFactory class(I have created) :  IgniteFactory.java
>  t1901/IgniteFactory.java>
>
> Finally main class :  MainApp.java
> 
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-12 Thread monstereo
I can not solve this error : 

*Exception in thread "main" org.hibernate.service.spi.ServiceException:
Unable to create requested service [org.hibernate.cache.spi.RegionFactory] 
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:244)
 
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)
 
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)
 
at
org.hibernate.boot.internal.MetadataBuilderImpl$MetadataBuildingOptionsImpl.(MetadataBuilderImpl.java:663)
 
at
org.hibernate.boot.internal.MetadataBuilderImpl.(MetadataBuilderImpl.java:127)
 
at
org.hibernate.boot.internal.MetadataBuilderImpl.(MetadataBuilderImpl.java:94)
 
at
org.hibernate.boot.MetadataSources.getMetadataBuilder(MetadataSources.java:125) 
at
org.hibernate.boot.MetadataSources.buildMetadata(MetadataSources.java:179) 
at MainApp.createHibernateSessionFactory(MainApp.java:31)   at
MainApp.main(MainApp.java:65) Caused by: org.hibernate.HibernateException:
could not instantiate RegionFactory
[org.apache.ignite.cache.hibernate.HibernateRegionFactory]  at
org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:84)
 
at
org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:29)
 
at
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
 
at
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)
 
... 9 more Caused by:
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable
to resolve name [org.apache.ignite.cache.hibernate.HibernateRegionFactory]
as strategy [org.hibernate.cache.spi.RegionFactory] at
org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:113)
 
at
org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:71)
 
... 12 more*


I have a database (postgres) which has Person table in testdb database, and
includes id, name, age, salary columns

Here is the my hibernate config file :  hibernate-cfg.xml
  

Here is the Person class  :  Person.java
  

Here is the ignite configuration:  ignite-configuration.xml

  

Here is the IgniteFactory class(I have created) :  IgniteFactory.java
  

Finally main class :  MainApp.java
  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-11 Thread Evgenii Zhuravlev
if you enabled lgpl profile, you should have hibernate-4.2 and hibernate-5.1
modules, just choose the version that you have. Additionally, link that
I've shared contains link to the 3rd party repository, which contains these
artifacts, you can take them, if you're struggling with building it from
sources.

Evgenii

2018-07-11 11:38 GMT+03:00 monstereo :

> anyone could help me?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-11 Thread monstereo
anyone could help me?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-11 Thread monstereo
Ignite github address says that "Required libs will appear at
/target/release-package/libs/optional subfolders."

When I go to that library, I can not see ignite-hibernate or something like
that.
Here is the my path:
/Desktop/ApacheIgniteSourceFolder/apache-ignite-2.5.0-src/target/release-package-fabric/libs/optional


ezhuravlev wrote
> Hibernate is LGPL-licensed, so we stopped deploying there. To get
> artifacts
> for 2.5 version that have LGPL dependencies, you need to build them from
> the source [1] and deploy in your local repo.
> 
> [1] http://ignite.apache.org/download.cgi#build-source
> 
> 2018-07-10 21:46 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> I have create what apache ignite is said, but i got this exception:
>>
>> Exception in thread "main" org.hibernate.service.spi.ServiceException:
>> Unable to create requested service
>> [org.hibernate.cache.spi.RegionFactory]
>>
>> Unable to resolve name
>> [org.apache.ignite.cache.hibernate.HibernateRegionFactory] as strategy
>> [org.hibernate.cache.spi.RegionFactory]
>>
>>
>>
>> here is the dependencies that i am using:
>>
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-hibernate
> 
>> 
> 
> 1.2.0-incubating
> 
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-core
> 
>> 
> 
> 2.5.0
> 
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-spring
> 
>> 
> 
> 2.5.0
> 
>> 
> 
>> 
> 
>> 
> 
> postgresql
> 
>> 
> 
> postgresql
> 
>> 
> 
> 9.1-901-1.jdbc4
> 
>> 
> 
>>
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-examples
> 
>> 
> 
> 1.0.0-RC3
> 
>> 
> 
>> 
> 
>> 
> 
> org.hibernate
> 
>> 
> 
> hibernate-core
> 
>> 
> 
> 5.3.2.Final
> 
>> 
> 
>> 
> 
>> 
> 
> org.hibernate
> 
>> 
> 
> hibernate-annotations
> 
>> 
> 
> 3.5.6-Final
> 
>> 
> 
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread monstereo
I'm confused how to use these jar. I have the run the command "$ mvn clean
package -DskipTests -Prelease,lgpl"

and many things have been done successfully ignite-aws,
ignite-hibernate-core vs

now how i am going to use them:

I have added them directly but given me the same error, here is the
dependencies 


org.apache.ignite
ignite-core
2.5.0


org.apache.ignite
ignite-spring
2.5.0




org.apache.ignite
ignite-hibernate-core
2.5.0




postgresql
postgresql
9.1-901-1.jdbc4


org.apache.ignite
ignite-examples
2.5.0


org.hibernate
hibernate-core
5.3.2.Final


org.hibernate
hibernate-annotations
3.5.6-Final







ezhuravlev wrote
> Hibernate is LGPL-licensed, so we stopped deploying there. To get
> artifacts
> for 2.5 version that have LGPL dependencies, you need to build them from
> the source [1] and deploy in your local repo.
> 
> [1] http://ignite.apache.org/download.cgi#build-source
> 
> 2018-07-10 21:46 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> I have create what apache ignite is said, but i got this exception:
>>
>> Exception in thread "main" org.hibernate.service.spi.ServiceException:
>> Unable to create requested service
>> [org.hibernate.cache.spi.RegionFactory]
>>
>> Unable to resolve name
>> [org.apache.ignite.cache.hibernate.HibernateRegionFactory] as strategy
>> [org.hibernate.cache.spi.RegionFactory]
>>
>>
>>
>> here is the dependencies that i am using:
>>
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-hibernate
> 
>> 
> 
> 1.2.0-incubating
> 
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-core
> 
>> 
> 
> 2.5.0
> 
>> 
> 
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-spring
> 
>> 
> 
> 2.5.0
> 
>> 
> 
>> 
> 
>> 
> 
> postgresql
> 
>> 
> 
> postgresql
> 
>> 
> 
> 9.1-901-1.jdbc4
> 
>> 
> 
>>
>> 
> 
>> 
> 
> org.apache.ignite
> 
>> 
> 
> ignite-examples
> 
>> 
> 
> 1.0.0-RC3
> 
>> 
> 
>> 
> 
>> 
> 
> org.hibernate
> 
>> 
> 
> hibernate-core
> 
>> 
> 
> 5.3.2.Final
> 
>> 
> 
>> 
> 
>> 
> 
> org.hibernate
> 
>> 
> 
> hibernate-annotations
> 
>> 
> 
> 3.5.6-Final
> 
>> 
> 
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread Evgenii Zhuravlev
Hibernate is LGPL-licensed, so we stopped deploying there. To get artifacts
for 2.5 version that have LGPL dependencies, you need to build them from
the source [1] and deploy in your local repo.

[1] http://ignite.apache.org/download.cgi#build-source

2018-07-10 21:46 GMT+03:00 monstereo :

> I have create what apache ignite is said, but i got this exception:
>
> Exception in thread "main" org.hibernate.service.spi.ServiceException:
> Unable to create requested service [org.hibernate.cache.spi.RegionFactory]
>
> Unable to resolve name
> [org.apache.ignite.cache.hibernate.HibernateRegionFactory] as strategy
> [org.hibernate.cache.spi.RegionFactory]
>
>
>
> here is the dependencies that i am using:
>
> 
> 
> org.apache.ignite
> ignite-hibernate
> 1.2.0-incubating
> 
> 
> org.apache.ignite
> ignite-core
> 2.5.0
> 
> 
> org.apache.ignite
> ignite-spring
> 2.5.0
> 
> 
> postgresql
> postgresql
> 9.1-901-1.jdbc4
> 
>
> 
> org.apache.ignite
> ignite-examples
> 1.0.0-RC3
> 
> 
> org.hibernate
> hibernate-core
> 5.3.2.Final
> 
> 
> org.hibernate
> hibernate-annotations
> 3.5.6-Final
> 
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread monstereo
I have create what apache ignite is said, but i got this exception:

Exception in thread "main" org.hibernate.service.spi.ServiceException:
Unable to create requested service [org.hibernate.cache.spi.RegionFactory]

Unable to resolve name
[org.apache.ignite.cache.hibernate.HibernateRegionFactory] as strategy
[org.hibernate.cache.spi.RegionFactory]



here is the dependencies that i am using:



org.apache.ignite
ignite-hibernate
1.2.0-incubating


org.apache.ignite
ignite-core
2.5.0


org.apache.ignite
ignite-spring
2.5.0


postgresql
postgresql
9.1-901-1.jdbc4



org.apache.ignite
ignite-examples
1.0.0-RC3


org.hibernate
hibernate-core
5.3.2.Final


org.hibernate
hibernate-annotations
3.5.6-Final




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread Evgenii Zhuravlev
Well, you can use, for example, eviction policy:
https://apacheignite.readme.io/docs/evictions

Evgenii

2018-07-10 16:43 GMT+03:00 monstereo :

> thanks,
> then in hibernate l2 cache, we do not provide the specific data to load
> cache?(igniteCache.loadCache() )
> but then, how many data will be in l2 cache, can I limit this space?
>
>
> ilya.kasnacheev wrote
> > Hello!
> >
> > From the comments of Java file linked:
> >
> > * When running example, it's easy to notice that when an object is first
> > * put into a database, the L2 cache is not used and it's contents is
> > empty.
> > * However, *when an object is first read from the database, it is
> > immediately*
> > * *stored in L2 cache (which is Ignite In-Memory Data Ignite cluster in
> > fact)*, which can
> > * be seen in stats output. Further requests of the same object only read
> > the data
> > * from L2 cache and do not hit the database.
> >
> > Regards,
> >
> > --
> > Ilya Kasnacheev
> >
> > 2018-07-10 16:23 GMT+03:00 monstereo 
>
> > mehmetozanguven@
>
> > :
> >
> >> Thanks.
> >> I have seen this document before.
> >> However, I could not understand how datas are loading ignite cache(s)?
> >> Can you explain what is going on this .java class?
> >>
> >>
> >>
> >> ezhuravlev wrote
> >> > Looks like you read a wrong documentation, for Hibernate L2 cache you
> >> > don't
> >> > even need to implement CacheStoreAdapter - it's needed only for using
> >> 3rd
> >> > party db as a Cache Store. Here is the right documentation for using
> >> > Ignite
> >> > as L2 Hibernate cache:
> >> > https://apacheignite-mix.readme.io/docs/hibernate-l2-cache
> >> >
> >> > Also, here is the working example:
> >> > https://github.com/apache/ignite/blob/master/examples/
> >> src/main/java-lgpl/org/apache/ignite/examples/datagrid/hibernate/
> >> HibernateL2CacheExample.java
> >> >
> >> > Evgenii
> >> >
> >> > 2018-07-10 15:59 GMT+03:00 monstereo 
> >>
> >> > mehmetozanguven@
> >>
> >> > :
> >> >
> >> >> Even I am using apache ignite documentation or High Performance
> >> In-Memory
> >> >> computing book,
> >> >> I could not understand.
> >> >>
> >> >> I have created simple cache with ignite (using postgresql)
> >> (implementing
> >> >> CacheStoreAdapter vs...)
> >> >> Also I have created simple hibernate project (gets data from
> database,
> >> >> update vs...)
> >> >>
> >> >> But I can not combine them.
> >> >>
> >> >> *Could someone explain the job step by step ?*
> >> >> (In High Performance In-Memory computing book -> all xml
> configuration
> >> in
> >> >> a
> >> >> file which I could not handle at all, if possible, I want to create
> >> all
> >> >> the
> >> >> xml file seperately)
> >> >>
> >> >> thanks,
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
> >> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
> >>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread monstereo
thanks,
then in hibernate l2 cache, we do not provide the specific data to load
cache?(igniteCache.loadCache() )
but then, how many data will be in l2 cache, can I limit this space?


ilya.kasnacheev wrote
> Hello!
> 
> From the comments of Java file linked:
> 
> * When running example, it's easy to notice that when an object is first
> * put into a database, the L2 cache is not used and it's contents is
> empty.
> * However, *when an object is first read from the database, it is
> immediately*
> * *stored in L2 cache (which is Ignite In-Memory Data Ignite cluster in
> fact)*, which can
> * be seen in stats output. Further requests of the same object only read
> the data
> * from L2 cache and do not hit the database.
> 
> Regards,
> 
> -- 
> Ilya Kasnacheev
> 
> 2018-07-10 16:23 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> Thanks.
>> I have seen this document before.
>> However, I could not understand how datas are loading ignite cache(s)?
>> Can you explain what is going on this .java class?
>>
>>
>>
>> ezhuravlev wrote
>> > Looks like you read a wrong documentation, for Hibernate L2 cache you
>> > don't
>> > even need to implement CacheStoreAdapter - it's needed only for using
>> 3rd
>> > party db as a Cache Store. Here is the right documentation for using
>> > Ignite
>> > as L2 Hibernate cache:
>> > https://apacheignite-mix.readme.io/docs/hibernate-l2-cache
>> >
>> > Also, here is the working example:
>> > https://github.com/apache/ignite/blob/master/examples/
>> src/main/java-lgpl/org/apache/ignite/examples/datagrid/hibernate/
>> HibernateL2CacheExample.java
>> >
>> > Evgenii
>> >
>> > 2018-07-10 15:59 GMT+03:00 monstereo 
>>
>> > mehmetozanguven@
>>
>> > :
>> >
>> >> Even I am using apache ignite documentation or High Performance
>> In-Memory
>> >> computing book,
>> >> I could not understand.
>> >>
>> >> I have created simple cache with ignite (using postgresql)
>> (implementing
>> >> CacheStoreAdapter vs...)
>> >> Also I have created simple hibernate project (gets data from database,
>> >> update vs...)
>> >>
>> >> But I can not combine them.
>> >>
>> >> *Could someone explain the job step by step ?*
>> >> (In High Performance In-Memory computing book -> all xml configuration
>> in
>> >> a
>> >> file which I could not handle at all, if possible, I want to create
>> all
>> >> the
>> >> xml file seperately)
>> >>
>> >> thanks,
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>> >>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread Ilya Kasnacheev
Hello!

>From the comments of Java file linked:

* When running example, it's easy to notice that when an object is first
* put into a database, the L2 cache is not used and it's contents is empty.
* However, *when an object is first read from the database, it is
immediately*
* *stored in L2 cache (which is Ignite In-Memory Data Ignite cluster in
fact)*, which can
* be seen in stats output. Further requests of the same object only read
the data
* from L2 cache and do not hit the database.

Regards,

-- 
Ilya Kasnacheev

2018-07-10 16:23 GMT+03:00 monstereo :

> Thanks.
> I have seen this document before.
> However, I could not understand how datas are loading ignite cache(s)?
> Can you explain what is going on this .java class?
>
>
>
> ezhuravlev wrote
> > Looks like you read a wrong documentation, for Hibernate L2 cache you
> > don't
> > even need to implement CacheStoreAdapter - it's needed only for using 3rd
> > party db as a Cache Store. Here is the right documentation for using
> > Ignite
> > as L2 Hibernate cache:
> > https://apacheignite-mix.readme.io/docs/hibernate-l2-cache
> >
> > Also, here is the working example:
> > https://github.com/apache/ignite/blob/master/examples/
> src/main/java-lgpl/org/apache/ignite/examples/datagrid/hibernate/
> HibernateL2CacheExample.java
> >
> > Evgenii
> >
> > 2018-07-10 15:59 GMT+03:00 monstereo 
>
> > mehmetozanguven@
>
> > :
> >
> >> Even I am using apache ignite documentation or High Performance
> In-Memory
> >> computing book,
> >> I could not understand.
> >>
> >> I have created simple cache with ignite (using postgresql) (implementing
> >> CacheStoreAdapter vs...)
> >> Also I have created simple hibernate project (gets data from database,
> >> update vs...)
> >>
> >> But I can not combine them.
> >>
> >> *Could someone explain the job step by step ?*
> >> (In High Performance In-Memory computing book -> all xml configuration
> in
> >> a
> >> file which I could not handle at all, if possible, I want to create all
> >> the
> >> xml file seperately)
> >>
> >> thanks,
> >>
> >>
> >>
> >>
> >> --
> >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
> >>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread monstereo
Thanks.
I have seen this document before.
However, I could not understand how datas are loading ignite cache(s)?
Can you explain what is going on this .java class?



ezhuravlev wrote
> Looks like you read a wrong documentation, for Hibernate L2 cache you
> don't
> even need to implement CacheStoreAdapter - it's needed only for using 3rd
> party db as a Cache Store. Here is the right documentation for using
> Ignite
> as L2 Hibernate cache:
> https://apacheignite-mix.readme.io/docs/hibernate-l2-cache
> 
> Also, here is the working example:
> https://github.com/apache/ignite/blob/master/examples/src/main/java-lgpl/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
> 
> Evgenii
> 
> 2018-07-10 15:59 GMT+03:00 monstereo 

> mehmetozanguven@

> :
> 
>> Even I am using apache ignite documentation or High Performance In-Memory
>> computing book,
>> I could not understand.
>>
>> I have created simple cache with ignite (using postgresql) (implementing
>> CacheStoreAdapter vs...)
>> Also I have created simple hibernate project (gets data from database,
>> update vs...)
>>
>> But I can not combine them.
>>
>> *Could someone explain the job step by step ?*
>> (In High Performance In-Memory computing book -> all xml configuration in
>> a
>> file which I could not handle at all, if possible, I want to create all
>> the
>> xml file seperately)
>>
>> thanks,
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Hibernate L2 cache with Ignite. How?

2018-07-10 Thread Evgenii Zhuravlev
Looks like you read a wrong documentation, for Hibernate L2 cache you don't
even need to implement CacheStoreAdapter - it's needed only for using 3rd
party db as a Cache Store. Here is the right documentation for using Ignite
as L2 Hibernate cache:
https://apacheignite-mix.readme.io/docs/hibernate-l2-cache

Also, here is the working example:
https://github.com/apache/ignite/blob/master/examples/src/main/java-lgpl/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java

Evgenii

2018-07-10 15:59 GMT+03:00 monstereo :

> Even I am using apache ignite documentation or High Performance In-Memory
> computing book,
> I could not understand.
>
> I have created simple cache with ignite (using postgresql) (implementing
> CacheStoreAdapter vs...)
> Also I have created simple hibernate project (gets data from database,
> update vs...)
>
> But I can not combine them.
>
> *Could someone explain the job step by step ?*
> (In High Performance In-Memory computing book -> all xml configuration in a
> file which I could not handle at all, if possible, I want to create all the
> xml file seperately)
>
> thanks,
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Hibernate L2 cache with Ignite. How?

2018-07-10 Thread monstereo
Even I am using apache ignite documentation or High Performance In-Memory
computing book,
I could not understand.

I have created simple cache with ignite (using postgresql) (implementing
CacheStoreAdapter vs...)
Also I have created simple hibernate project (gets data from database,
update vs...)

But I can not combine them.

*Could someone explain the job step by step ?*
(In High Performance In-Memory computing book -> all xml configuration in a
file which I could not handle at all, if possible, I want to create all the
xml file seperately)

thanks,




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/