Steve, I have created a JIRA issue
(https://hibernate.onjira.com/browse/HHH-7090) and assigned it to you. Why do
you think that we
should not fix this in the upcoming release? I have also noticed that
auto-closing feature of SharedSessionBuilder does not work
as documented in JavaDoc. Please s
Well these are the kind of details I was asking about with
transactionContext() :)
So transactionContext() is sharing too much of itself at the moment to
use it this way. Currently it just shares the entire
org.hibernate.engine.transaction.spi.TransactionContext from the
originating Session.
I totally agree with you guys :). However, when I do something like:
if (FlushMode.isManualFlushMode(session.getFlushMode())) {
Session temporarySession = null;
try {
temporarySession = ((Session)
session).sessionWithOptions().transactionContext()
Yes, I also think the session should be closed after being used, otherwise you
start wondering why it's not being closed (as I did looking at the code) :)
Adam
On Feb 13, 2012, at 9:59 PM, Steve Ebersole wrote:
> In general, yes, this is what I meant.
>
> I think on_close or after_transaction
> Probably openTemporarySession() should be deprecated. Notice it also
> says it is for HEM use, though the only current uses I see of it all
> come from envers.
Right, I was never happy using it, but I don't think there were other options
at that time. Or I just couldn't find them.
> Prett
In general, yes, this is what I meant.
I think on_close or after_transaction might be better connection
release mode here.
Also, I would personally be more inclined to close the "temp session"
manually there in that block. But that part is really just a
preference I think.
On Mon 13 Feb 201
Thanks Steve for such a descriptive replay. I have played a little with
SessionBuilder and probably solved the issue. Because of
great importance of
AuditProcess#doBeforeTransactionCompletion(SessionImplementor) method, please
verify my commit:
https://github.com/lukasz-antoniak/hibernate-core
Probably openTemporarySession() should be deprecated. Notice it also
says it is for HEM use, though the only current uses I see of it all
come from envers.
If you want to share information from the main session, then the
appropriate access would be to use org.hibernate.SharedSessionBuilder as
Hi all,
I have a question regarding SessionFactoryImplementor.openTemporarySession()
(bug HHH-7017). As observed in non JTA environment
with manual flush mode enabled, and 'hibernate.connection.autocommit' disabled,
temporary session is not getting committed.
How/when should I commit it manual