Spring properties file hibernate prefix for org.apache.ignite properties

classic Classic list List threaded Threaded
3 messages Options
ksamborn ksamborn
Reply | Threaded
Open this post in threaded view
|

Spring properties file hibernate prefix for org.apache.ignite properties

Hi -

One other thing I found with Spring is that I needed to remove the hibernate prefix from org.apache.ignite properties.

Here's how I successfully configured my 2nd level cache:

# second level cache
spring.jpa.properties.hibernate.cache.use_second_level_cache=true
spring.jpa.properties.hibernate.generate_statistics=true  spring.jpa.properties.hibernate.cache.region.factory_class=org.apache.ignite.cache.hibernate.HibernateRegionFactory
spring.jpa.properties.org.apache.ignite.hibernate.grid_name=MyDataCacheComputeGrid
spring.jpa.properties.org.apache.ignite.hibernate.default_access_type=READ_ONLY

I would of thought it would be more appropriate to prefixed the last two with spring.jpa.properties.org.hibernate, but I found with the debugger that they weren't picked up.

From here:

Spring Boot - #boot-features-creating-and-dropping-jpa-databases

"Hibernate’s own internal property name for this (if you happen to remember it better) is hibernate.hbm2ddl.auto. You can set it, along with other Hibernate native properties, using spring.jpa.properties.* (the prefix is stripped before adding them to the entity manager). "

and in the Ignite docs L2 docs, Hibernate Configuration Example, it looks to me like these properties are like the other Hibernate properties in the example.

Thanks, and again, sorry if I'm misreading this.   Just figured it's better to post it than not.

Thanks,
Kevin
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Spring properties file hibernate prefix for org.apache.ignite properties

Kevin,

Properties that start with org.apache.ignite.hibernate are specific for Ignite's implementation of L2 cache, while others come from Hibernate itself. So I don't see any inconsistency here.

Does it make sense for you?

-Val
ksamborn ksamborn
Reply | Threaded
Open this post in threaded view
|

Re: Spring properties file hibernate prefix for org.apache.ignite properties

Hi Val -

I'm new to this, so maybe I'm just confused.  

The reason I mentioned it is that it looked to me like they were same level as the Hibernate properties in the XML configuration.

If all is well, no problem.

Thanks for looking.

Kevin