HHH-9993 - IsolationDelegate + no-Connection
by Steve Ebersole
HHH-9993[1] is a request to extend IsolationDelegate to cater for
transaction hooks which do not need access to a JDBC Connection.
A quick primer for those unfamiliar, IsolationDelegate is a contract to
allow work to be done in a fashion that makes sure it is isolated from the
main Session transaction. We have implementations of this to fit JTA and
JDBC scenarios. Additionally, it allows to indicate that the isolated work
should itself be transacted or not. In the JDBC-transaction scenario
(which HHH-9993 deals with) transacted-isolated work is achieved by passing
in a separate Connection to use since that is the only way to achieve a new
transaction in JDBC (JDBC has no "suspend/resume" transaction
functionality).
HHH-9993 is again about this isolated, transacted scenario under the
JDBC-transaction handling. Specifically for hibernate-infinispan call
backs there is no need to obtain the second Connection. So HHH-9993 is
about reducing the overhead of this call by allowing it a way to say "I
need to do some isolated, transacted work but I do not need the Connection".
For this particular use case that is fine: hibernate-infinispan will never
access the Connection. I do worry however about this general use-case. My
concern is specifically that some use cases will attempt to call back into
the Session. At the moment we do not "protect" against that.
I'd like to get some opinions on this.
[1] https://hibernate.atlassian.net/browse/HHH-9993
10 years, 2 months
Statements issued for unidirectional one-to-many with @JoinColumn
by Gunnar Morling
Steve, all,
I have a model with two entities, Parent and Child, and an
unidirectional one-to-many association from the former to the latter.
Via @JoinColumn on the association it is ensured that the Parent FK is
stored in the Child table, i.e. without a separate join table. When
inserting a Parent and several Child entities, I see the following
statements:
INSERT INTO parent (id, name) VALUES (?,?)
INSERT INTO child (id, childname) VALUES (?,?)
INSERT INTO child (id, childname) values (?,?)
UPDATE CHILD SET Parent_id=? WHERE id=?
UPDATE CHILD SET Parent_id=? WHERE id=?
Why is it that the FK is propagated through separate updates instead
of doing it as part of the Child insert?
Thanks,
--Gunnar
10 years, 2 months
[OGM] How to get the transaction id
by Davide D'Alto
Hi,
for the implementation of the Neo4j remote dialect I need to get the
identifier of the transaction.
I suppose this is something that we will need for other dialect as well in
the future.
What's the proper way to get the transaction id or the transaction? Is it
via the TransactionDriver?
Once I have the transaction id, one possible solution is to pass it to the
method of the GridDialect interface using an addtional parameter,
TransactionContext, that could contain information about the running
transaction.
Thanks,
Davide
10 years, 2 months
hbm mapping files and EntityManager
by Gail Badner
By default, hbm mapping files are detected when building Hibernate
EntityManager.
Is that expected?
I see that it is possible to override this behavior by setting
hibernate.archive.autodetection="".
I was surprised by the default. I would have thought that an application
using EntityManager would need to explicitly opt-in to use hbm files.
Thanks,
Gail
10 years, 2 months
Forum database banned emails issue
by Vlad Mihalcea
Hi,
I tried to import the last 24 hour forum spam emails form
https://www.stopforumspam.com/, which is around 50k email entries.
The email were imported, but now the banned email page of the forum doesn't
load anymore.
The problem is related to how phpBB renders the page since there's a
dropdown where all emails must listed.
Could someone delete a part of those entries or give me access to the DB so
I can remove them myself?
Vlad
10 years, 2 months
Jenkins notification misfire "hibernate-orm-master-h2-infinispan8"
by Sanne Grinovero
Hello all,
today I enabled an old build job on ci.hibernate.org named
"hibernate-orm-master-h2-infinispan8" and when it failed it
automatically sent a complaint to many, many of you.
Apologies, that was not intentional but a misconfiguration of the job.
It shouldn't happen again, or if it happens it should be for good
reason like a failure of a patch you contributed, or because you're
responsible for the component's quality.
That wasn't the case today, so please ignore that single but annoying
notification.
Thanks,
Sanne
10 years, 2 months