]
Hardy Ferentschik commented on HSEARCH-802:
-------------------------------------------
There is actually a shared moded (set by hibernate.jndi.org.osjava.sj.jndi.shared = true)
which uses a static hashmap to share state. The problem is that the
_AbstractContext#close_ implementation of simple-jndi removed all bound instances. The
latest implementation of Hibernate Core's _JndiService_ calls the _close_ method in
its finally block (probably has not done this before) in order to clean up resources.
The question is what the real intention of _javax.naming.Context#close()_ is. The docs are
arguably vague. For now I use a custom _MemoryContext_ in the test which does a noop on
_close()_.
See also
IndexControlMBeanTest fails with NPE because Hibernate Core closes
the JNDI context
-----------------------------------------------------------------------------------
Key: HSEARCH-802
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-802
Project: Hibernate Search
Issue Type: Bug
Reporter: Emmanuel Bernard
Assignee: Hardy Ferentschik
Fix For: 4.0.0.Alpha1
(first analysis)
The library used to simulate JNDI seems to be purely in memory and do not have the notion
of singleton.
Therefore, the SessionFactory is bound to the JNDI context but the context is discarded.
When later the IndexController tries to reach the SessionFActory via JNDI, it creates a
new context instead of sharing one with Hibernate Core.
=> investigate further and fix
--
This message is automatically generated by JIRA.
For more information on JIRA, see: