On  Mar 13, 2009, at 18:45, Sanne Grinovero wrote:

I don't quite understand why, the new EventListenerREgister will be bundled with the IndexWork Listener always right? What backward compatible mode do
you have?
So I'll discard compatibility with old configurations of Search? this
means somebody
just replacing the jar but "forgetting" to read the new docs and
failing to update the
configuration will have lots of new problems... was just worried about this,
but as you say they shouldn't be using it out of transaction anyway.
What I have is just "do it immediately" as the current code in trunk does, if
we are out of transaction and I can't find the event listener to
register the sync
for later. I have to find it anyway, so it's not a big change.

ah I understand now, then you're right, if the listener is not registered raise a warning log



BTW, you should put a warning in the log when this event listener is used. "Applying change to the full-text index before transaction completion. Please use a Hibernate aware transaction (eg org.hibernate.Transaction,
javax.persistence.EntityTransaction, JTA transaction with the proper
TransactionFactory setting)"

so we're going to log that all usecases out of TX are evil?
In this case wouldn't you prefer to avoid fixing it and just log the message?

hum, here is my dilemma. Some people use it out of transaction and that's their problem. Some people believe they do it within transaction but either they don't configure Spring properly or Spring does not work properly and that's what I am more concerned about and want the warning for.

I guess we can reduce it to INFO.

I am almost thinking we should have a flag in the configuration to explicitly allow out of tx indexing but I hate configurations, so we're not going to do that.
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to