Hi,

Can’t say much about Java EE usage exactly but overall the idea is
1) Start an Ignite node named “foo”, in the same JVM as the application, before 
Hibernate is initialized
2) Specify `org.apache.ignite.hibernate.ignite_instance_name=foo` in the 
Hibernate session properties
3) Do NOT specify ` org.apache.ignite.hibernate.grid_config` - if you do, the 
framework will try to start Ignite automatically, and you’ve already done it 

If it still complains about an already started instance, please share the logs.

Thanks,
Stan

From: yarden
Sent: 7 октября 2018 г. 16:12
To: user@ignite.apache.org
Subject: Ignite as Hibernate L2 Cache

Hi all,
I am trying to configure Ignite as second-level cache in Hibernate.
I followed the instructions on this link:
https://apacheignite-mix.readme.io/docs/hibernate-l2-cache
<https://apacheignite-mix.readme.io/docs/hibernate-l2-cache>  
But it seems that the example is for Hibernate with Spring.
I am using Hibernate 5.2.5 with Java Enterprise Edition.

So I am configuring the second level cache on the persistence.xml, but I
have two persistence units.
For both I defined the same factory class and instance name.
Then I get an error on server startup that Ignite instance already exist.
Is there anyway to create the Ignite instance as a singleton? 

Anyway, any example of Ignite as Hibernate L2 Cache for JEE will be a great
help.
Thanks!



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

Reply via email to