Re: [hibernate-dev] 2nd level cache tuning on WildFly
by Galder Zamarreño
Hi Sanne,
By default, each entity gets its own cache in both standalone and WF. WF might only expose the configuration for "entity" cache, but internally, each entity gets a new cache that has the configuration of "entity".
If you want for a particular entity type to have different cache settings, you might be able to modify them directly in the Hibernate configuration itself via properties [1] ("hibernate.cache.infinispan.cfg" would not apply within WF)
Otherwise, right now yeah, you'd need to define a cache in the persistence cache container, and assign that cache name to your entity, again defined in [1].
For standalone envs, you can reference the XML from the Hibernate configuration, but yeah, I see your point of having an easier way to define the cache from the deployment configuration itself. This could potentially done in such way that can be used for both standalone and WF. Can you create an HHH for this?
Cheers,
[1] http://infinispan.org/docs/7.2.x/user_guide/user_guide.html#_advanced_con...
> Date: Mon, 1 Jun 2015 19:24:33 +0100
> From: Sanne Grinovero <sanne(a)hibernate.org>
> Subject: [hibernate-dev] 2nd level cache tuning on WildFly
> To: "Hibernate.org" <hibernate-dev(a)lists.jboss.org>
> Message-ID:
> <CAFm4XO29-W2bFG4k2LBpkD2Mzfv2S174hq2FY5McNhA5Q96sxg(a)mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Does someone have an example of how I could use different Infinispan
> Cache(s) for each of my Hibernate entities?
>
> The WildFly documentation doesn't get much into tuning:
> https://docs.jboss.org/author/display/WFLY9/JPA+Reference+Guide#JPARefere...
>
> I'd like to define Cache configuration in the WildFly configuration
> file and map them 1:1 to the cacheable entities.
> Which also brings up the question on why I should edit the root
> configuration for sake of app-specific details.. ideally I'd want to
> add such a configuration snippet within my application deployment.
>
> thanks in advance for any pointer,
> Sanne
>
--
Galder Zamarreño
galder(a)redhat.com
9 years, 6 months
How to run master unit test in Intellij with non-default DB
by Gail Badner
For 4.3 and before, when running a unit test in Intellij using a non-default DB, I would simply add the JDBC jar as a module dependency and then add the hibernate-specific properties (e.g., for dialect, etc) as VM options in the Run/Debug configuration.
This doesn't work for master because the added dependency is not getting picked up.
Is there some other way to do this without messing with build.gradle or libraries.gradle?
Thanks,
Gail
9 years, 6 months
Hibernate Search for Hibernate 5 - status
by Sanne Grinovero
I'm concerned about seeing issues like this one being reported:
- https://hibernate.atlassian.net/browse/HHH-9832
I don't think it's acceptable we withhold an Hibernate 5 compatible
version of Hibernate Search for much longer.
I have a working branch of Hibernate Search "on hold" since a while
which is compiling and passing all tests successfully up to the point
of WildFly integration tests, as I could not find a way yet to run the
tests using modules and override the Hibernate ORM version (see the
wildfly-dev mailing list for details).
It was not viable either to keep this Hibernate Search branch
backwards compatible with the Hibernate ORM version 4.3 as included in
available WildFly releases.
Also since I was focusing on the WildFly roadblock so far, the branch
still needs a bit of work, for example I didn't face the OSGi tests
yet.
The "theme" for current development branch - Hibernate Search 5.3 - so
far was about the great new faceting improvements. As I discussed with
Hardy, we'd like to polish that branch for a release, so include only
necessary wrap up and fixing any reported regression, but focus
aggressively already on a new minor branch so that we could release an
ORM5 compatible Alpha in short time.
We could even consider working on a 5.3 and 5.4 in parallel.
Would you all be ok in a quick release - probably named 5.4.0.Alpha1 -
of Hibernate Search to be compatible with ORM5 and omit publishing the
modules for WildFly? That would be useful for WildFly 10 too, so they
can include the new libraries and ORM 5, breaking the cycle.
As a next step we'll see also about breaking those cycles permanently;
e.g. Hardy suggested to release modules and feature packs for WildFly
as an independent cycle, and I like that although we can keep that
decision for a post 5.4.
Thanks,
Sanne
9 years, 6 months
Envers ReflectionTools
by Steve Ebersole
I am needing to change how "property access" is handled (as in the
org.hibernate.property package). I have no idea how to fit that into
Envers and specifically into its ReflectionTools class. The problems boil
down to org.hibernate.envers.internal.tools.ReflectionTools#getAccessor and
all the uses of it. Basically when resolving a "property access strategy"
I need a ServiceRegistry for class loading of custom strategies. I am lost
in hooking that into Envers.
But then I also started thinking.. doesn't Envers always just use the Map
entity mnde and access strategy? And if so, why is it trying to resolve a
named access strategy?
9 years, 6 months
PropertyAccessor -> PropertyAccessStrategy and PropertyAccess
by Steve Ebersole
I hinted at this in the 'Envers ReflectionTools' email, but wanted to
follow up with some details. Part of the work to move away from the last
bits of TCCL-based classloading was completely
redesigning PropertyAccessorFactory/PropertyAccessor (work which is long
overdue anyway). Just a heads up that this is no longer a straight-forward
migration item.
I took advantage of the opportunity to apply the package split here.
I also took this as a chance to add another strategy allowing a mix of
Field and Method based access. We talk about this strategy in
documentation and other places, so it always made sense to me to provide
it. At the moment however I am looking for names for this in terms of
specifying it in mappings/annotations. <property ... access="???"/>.
"mixed"?
9 years, 6 months
Re: [hibernate-dev] Hibernate Metrics support
by Steve Ebersole
Please keep these discussions on list. Thanks :)
We do not always know when JTA transactions have started if we are not the
ones starting them. transactionStart() isn't going to happen.
I am ok with discussing start() as an option.
On Wed, Jun 3, 2015, 2:32 AM Mihalcea Vlad <mih_vlad(a)yahoo.com> wrote:
> I tried to match the current existing methods, to help one match the pairs.
>
> But "org.hibernate.engine.transaction.spi.AbstractTransactionImpl" has a
> doBegin method.
> Isn't it called when the transaction starts?
>
>
>
>
>
> On Tuesday, June 2, 2015 5:11 PM, Steve Ebersole <steve(a)hibernate.org>
> wrote:
>
>
> start() I assume is supposed to indicate Session start? That is a
> possibility.
>
> transactionStart() is not. We do not always know when a transaction
> starts.
>
> On Tue, Jun 2, 2015 at 1:23 AM Mihalcea Vlad <mih_vlad(a)yahoo.com> wrote:
>
> Thanks. The second one is on the master branch and the 5.0 code-base.
> Can the SessionEventListener have two more methods:
>
> public void start();
> public void transactionStart();
>
> So we can monitor how long the Session (start() and end() pair) and
> Transactions take (transactionStart() and transactionCompletion()).
>
> Vlad
>
>
>
>
> On Tuesday, June 2, 2015 4:39 AM, Steve Ebersole <steve(a)hibernate.org>
> wrote:
>
>
> Hibernate already has hooks to implement all of these
> between org.hibernate.SessionEventListener
> and org.hibernate.resource.jdbc.spi.StatementInspector
>
>
> On Mon, Jun 1, 2015 at 4:12 PM Mihalcea Vlad <mih_vlad(a)yahoo.com> wrote:
>
> Hi Steve,
>
> I was thinking of having a Metrics gathering API for all sorts of
> database-related operations:
>
> - connection acquiring/lease time
> - connection wait time
> - transaction durations
> - SQL query logger
> - slow queries threshold
> - number of queries per transaction threshold
>
> Something similar to https://github.com/vladmihalcea/flexy-pool
>
> This will ease profiling a Hibernate application and we could have the
> hibernate-core define the integration hooks and
> a hibernate-metrics module to inject the metrics gathering components.
> This module could use Dropwizard Metrics, since
> it supports various Reservoir types and many reporting flavors (log, JMX,
> Graphite).
>
> Hibernate users will get an insight of what's going on in their
> application, so they can better understand what Hibernate does
> on their behalf.
>
> What do you think of this?
>
> Vlad MIhalcea
>
>
>
>
>
>
>
9 years, 6 months
Hibernate OGM 4.2 Final is out
by Davide D'Alto
Hi,
after several months of hard work, I'm happy to announce the next final
release of Hibernate OGM: 4.2.
Compared to 4.1.Final, this version includes:
- API for retrieving all executed and failed datastore operations,
- preview for Apache Cassandra support,
- Fongo support,
- new built-in types for boolean mapping,
- Support for MongoDB 3 and MongoDB replica sets
- HQL support improvements and bug fixes,
- bug fixes related to the mapping of embedded properties,
- at least JDK 7 is required.
You can find all the details in the blog post [1].
Many thanks to all the people that helped us make this release possible.
Cheers,
Davide
[1] http://in.relation.to/Bloggers/HibernateOGM42FinalIsOut
9 years, 6 months
Re: [hibernate-dev] HSearch + Tika bridge using Wildfly modules
by Sanne Grinovero
Hi Brett,
we don't include all existing analysers and extensions within the
WildFly modules. In particular the Apache Tika libraries have a huge
amount of dependencies, you should choose the ones you need depending
on what kind of media you intend to parse.
Include any extension in your "application", we use the Hibernate ORM
classloader to lookup for extensions so these should be discoverable
if they are visible to the same classloader having your entities and
other extensions.
Sanne
On 29 May 2015 at 15:28, Brett Meyer <brmeyer(a)redhat.com> wrote:
> Hey Sanne! Artificer has '<module name="org.hibernate.search.orm" services="export" />' defined in its jboss-deployment-structure dependencies. But, when we try to use it, the following happens.
>
> Caused by: java.lang.ClassNotFoundException: org.apache.tika.parser.Parser from [Module "org.hibernate.search.engine:main" from local module loader @6cf76647 (finder: local module finder @665bf734 (roots: /home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules,/home/brmeyer/IdeaProjects/artificer/installer/target/wildfly-8.2.0.Final/modules/system/layers/base))]
>
> One of our entities uses the built-in TikaBridge. I figured the search.orm module would bring the necessary Tika jars in with it. Is there something else we need to add?
9 years, 6 months
Re: [hibernate-dev] Hibernate Metrics support
by Steve Ebersole
start() I assume is supposed to indicate Session start? That is a
possibility.
transactionStart() is not. We do not always know when a transaction starts.
On Tue, Jun 2, 2015 at 1:23 AM Mihalcea Vlad <mih_vlad(a)yahoo.com> wrote:
> Thanks. The second one is on the master branch and the 5.0 code-base.
> Can the SessionEventListener have two more methods:
>
> public void start();
> public void transactionStart();
>
> So we can monitor how long the Session (start() and end() pair) and
> Transactions take (transactionStart() and transactionCompletion()).
>
> Vlad
>
>
>
>
> On Tuesday, June 2, 2015 4:39 AM, Steve Ebersole <steve(a)hibernate.org>
> wrote:
>
>
> Hibernate already has hooks to implement all of these
> between org.hibernate.SessionEventListener
> and org.hibernate.resource.jdbc.spi.StatementInspector
>
>
> On Mon, Jun 1, 2015 at 4:12 PM Mihalcea Vlad <mih_vlad(a)yahoo.com> wrote:
>
> Hi Steve,
>
> I was thinking of having a Metrics gathering API for all sorts of
> database-related operations:
>
> - connection acquiring/lease time
> - connection wait time
> - transaction durations
> - SQL query logger
> - slow queries threshold
> - number of queries per transaction threshold
>
> Something similar to https://github.com/vladmihalcea/flexy-pool
>
> This will ease profiling a Hibernate application and we could have the
> hibernate-core define the integration hooks and
> a hibernate-metrics module to inject the metrics gathering components.
> This module could use Dropwizard Metrics, since
> it supports various Reservoir types and many reporting flavors (log, JMX,
> Graphite).
>
> Hibernate users will get an insight of what's going on in their
> application, so they can better understand what Hibernate does
> on their behalf.
>
> What do you think of this?
>
> Vlad MIhalcea
>
>
>
>
>
9 years, 6 months