HHH-10162 Inheritance and L2 cache
by Christian Beikov
Hey guys,
Steve said I should start a discussion about the possible solution for
HHH-10162 <https://hibernate.atlassian.net/browse/HHH-10162> so here we go.
While debugging the issue, I found out that the proxy is created at
DefaultLoadEventListener.createProxyIfNecessary() where it IMO should
consult the 2L cache first by calling existing =
loadFromSecondLevelCache( event, persister, keyToLoad );. The fix looks
easy, but I am not sure of the implications. Obviously this will affect
performance a little since it has to consult the L2 cache now.
I tried to start a discussion in the Dev room, but so far only Andrea,
Vlad and Chris have commented this. Has anyone a different idea for
implementing this?
--
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
6 years, 11 months
Getting rid of our specific JavaDoc CSS?
by Guillaume Smet
Hi,
So, apparently, our JavaDoc CSS is a bit outdated as we now have a "Skip
navigation links" link at the top of our doc that should be hidden by
default.
Frankly, I see very little value in maintaining our own JavaDoc CSS. It
requires work (see above and the future JDK 9 upgrade - Marko did a first
pass on Validator but it required some time).
Moreover, I find the new default CSS much more readable and attractive than
ours.
Compare:
https://docs.jboss.org/hibernate/stable/search/api/
with:
http://docs.jboss.org/jberet/1.3.0.Beta2/javadoc/jberet-core/
I would say a JavaDoc is a JavaDoc and I would prefer if our users just got
the standard layout they are used to on other projects.
Bonus point: when we include external projects javadoc in ours, we end up
having both layouts mixed, which is not very nice.
And if it saves us some work, it's all good, isn't it?
Thoughts?
--
Guillaume
6 years, 11 months
JDK 10 Early Access b33 and JDK 8u162 Early Access b03 are available on jdk.java.net
by Rory O'Donnell
Hi Sanne,
*JDK 10 Early Access build 33 is available at : - **jdk.java.net/10/*
Notable changes since previous email.
<http://bugs.openjdk.java.net/browse/JDK-8175094>JDK-8180019
<http://bugs.openjdk.java.net/browse/JDK-8180019> - *javadoc treats
failure to access a URL as an error , not a warning.*
If javadoc cannot access the contents of a URL provided with the -link
or -linkoffline options,the tool will now report an error.
Previously, the tool continued with a warning, producing incorrect
documentation output.
JDK-8175094 <http://bugs.openjdk.java.net/browse/JDK-8175094>*- **The
java.security.acl APIs are deprecated, for removal****
* The deprecated java.security.acl APIs are now marked with
forRemoval=true and are subject to removal in a future version of Java SE.
JDK-8175091 <http://bugs.openjdk.java.net/browse/JDK-8175091> *- The
java.security.{Certificate,Identity,IdentityScope,Signer} APIs are
deprecated, for removal*
The deprecated java.security.{Certificate, Identity, IdentityScope,
Signer} classes are now marked with forRemoval=true and are subject to
removal in a future version of Java SE.
JDK 10 Schedule, Status & Features are available [1]
Notes
* OpenJDK EA binaries will be available at a later date.
* Oracle has proposed: Newer version-string scheme for the Java SE
Platform and the JDK
o Please see Mark Reinhold's proposal [2]
*JDK 8u162 Early Access build 03 is available at :- http://jdk.java.net/8/*
<http://openjdk.java.net/projects/jdk8u/releases/8u162.html>
*Feedback* - If you have suggestions or encounter bugs, please submit
them using the usual Java SE bug-reporting channel.
Be sure to include complete version information from the output of the
|java --version| command.
Regards,
Rory
[1] http://openjdk.java.net/projects/jdk/10/
[2] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-November/000089.html
--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland
6 years, 11 months
Why does the disassembledStateText in StandardCacheEntryImpl build from the actual state[] and not from disassembledState[]?
by Vlad Mihalcea
Hi,
While working on fixing https://hibernate.atlassian.net/browse/HHH-12107,
I realized that the way we create the disassembledStateText property of the
StandardCacheEntryImpl object does not resemble the name of the attribute.
Now, I wonder why we don't build the disassembledStateText from
disassembledState?
Currently, the disassembledStateText is built from the hydrated state
instead. Is there any reason why we do that? Is it for correlating the
disassembledState Object array that's contained in the
StandardCacheEntryImpl object with the original entity hydrated state?
The problem with HHH-12107 was that, from structured 2nd-level cache where
we content is saved as a Map, when we reconstruct the
StandardCacheEntryImpl object
from the Map we get from the 2nd-level cache, we only know the
disassembledState when building the StandardCacheEntryImpl object reference.
So, we can't construct the same disassembledStateText value until we have
the actual hydrated state.
We would not have this issue if the disassembledStateText was built from
the disassembledState Object array via a call to Arrays.deepToString. But
changing the way we build the disassembledStateText is problematic if the
2nd-level cache provider relies on that property.
Vlad
6 years, 11 months
JPA Compliance
by Steve Ebersole
Part of 5.2 was merging the JPA contracts into the corresponding Hibernate
ones. So, e.g., we no longer "wrap" a SessionFactory in an impl of
EntityManagerFactory - instead, SessionFactory now extends
EntityManagerFactory.
This caused a few problems that we handled as they came up. In working on
the JPA 2.2 compatibility testing, I see that there are a few more still
that we need to resolve. Mostly they relate to JPA expecting exceptions in
certain cases where Hibernate has historically been lenient. E.g., JPA
says that calling EntityManagerFactory#close on an EMF that is already
closed should result in an exception. Historically, calling
SessionFactory#close on a SF that is already closed is simply ignored.
Philosophical debates aside[1], we need to decide how we want to handle
this situation such that we can throw the JPA-expected exceptions when
needed. Do we simply change SF#close to match the JPA expectation? Or do
we somehow
make SF#close aware of JPA versus "native" use? This latter option was the
intent of `SessionFactoryOptions#isJpaBootstrap` and we can certainly
continue to use that as the basis of the solution here for other cases.
This `#isJpaBootstrap` flag is controlled by the JPA bootstrap code. So if
the EMF is created in either of the 2 JPA-defined bootstrap mechanisms,
that flag is set to true. It's an ok solution, but it does have some
limitations - mainly, there was previously a distinction between SF#close
being called versus EMF#close being called (they were different classes, so
they could react differently). Therefore, regardless of bootstrap
mechanism, if the user unwrapped the EMF to a SF, they would always get the
legacy SF behavior.
So long story short, so we want to consider an alternative approach to
deciding what to do in "some"[2] of these cases? Again, we clearly need
these to throw the spec-mandated exceptions in certain "strict compliance"
situations. The question really is how to do that. Should we:
1. just completely change the behavior to align with the spec?
2. change the behavior to match the spec *conditionally*, where that
condition could be:
1. `#isJpaBootstrap`
2. some setting
3. some extension contract
4. something else?
Thoughts?
[1] It's not relevant e.g. that I think JPA is wrong here. We need to
comply with the spec, at least in certain cases ;)
[2] I say "some" here, because I think the spec is correct in some cases -
for example, I think its clearly correct that a closed EMF throws an
exception when `#createEntityManager` is called. Personally I think its
questionable whether closing an already closed EMF should be an exception.
6 years, 11 months
HHH-12125 - @GeneratedValue & 5.3
by Steve Ebersole
The background is all in the Jira, but the crux is this... it is better to
allow a user to do this:
@GeneratedValue( strategy=SEQUENCE, generator="my_seq")
rather than:
@GeneratedValue( strategy=SEQUENCE, generator="my_seq")
@SequenceGenerator( name="my_seq", sequenceName="my_seq" )
You can see that `SequenceGenerator` is completely unnecessary in this case
because it adds no new information beyond what is already available on the
`@GeneratedValue`.
This works great for `GeneratedValue#strategy=SEQUENCE` and
`GeneratedValue#strategy=TABLE`, however consider this mapping:
@GeneratedValue( strategy=AUTO, generator="increment" )
@GenericGenerator( name = "increment", strategy = "increment" )
Here we have the same underlying concern - the `@GenericGenerator` is just
noise, it adds no additional information. In keeping with the work done as
part of HHH-12125 it would be great to allow users to instead just say:
@GeneratedValue( strategy=AUTO, generator="increment" )
The problem here is that this last one is actually the responsibility of
`org.hibernate.boot.model.IdGeneratorStrategyInterpreter#determineGeneratorName`
to interpret, but it is not passed the `GeneratedValue#generator` value.
So the easiest solution would be to add an additional parameter to
`IdGeneratorStrategyInterpreter#determineGeneratorName` for passing in the
generator name. The concern here is that `IdGeneratorStrategyInterpreter`
is defined in the API space and could very well have custom impls.
A lesser solution wold be to add checks to the code that calls
`IdGeneratorStrategyInterpreter#determineGeneratorName` to check for
"magic" generator names before asking the
`IdGeneratorStrategyInterpreter`. This is just a very inflexible and
non-extensible solution, but maybe this works for 5.3 and we can adjust
`IdGeneratorStrategyInterpreter` as part of 6.0.
Thoughts?
6 years, 12 months
Auto run CI job
by Steve Ebersole
I am trying to set up a CI job against my personal ORM fork to
automatically trigger on push. I follow the configuration from jobs
against the main ORM repo which work, but mine does not. I assume it has
something to do with it being a personal branch. Is there something I need
to do on my repo to enable this?
7 years
Relaxing JIRA assignment restrictions
by Sanne Grinovero
Hi all,
I'm being frequently asked to add new contributors to "the right
groups" on JIRA just for the sake of being able to assign issues to
them.
I'm not sure why it's useful to prevent this for anyone to do being
able to do this, and also I suspect some people might be more inclined
to "just do it" if they had a clearer, more welcoming approach to
signal that they're looking into the issue themselves.
Any objections to relax this requirement?
Thanks,
Sanne
7 years