public void testRebuildFactory() {
File targetDir = TestConstants.getTargetDir( MutableSearchFactoryAndJMXTest.class );
File simpleJndiDir = new File( targetDir, "simpleJndi" );
simpleJndiDir.mkdir();
SearchConfigurationForTest configuration = new HibernateManualConfiguration()
.addProperty( "hibernate.session_factory_name", "java:comp/SessionFactory" )
.addProperty( "hibernate.jndi.class", "org.osjava.sj.SimpleContextFactory" )
.addProperty( "hibernate.jndi.org.osjava.sj.root", simpleJndiDir.getAbsolutePath() )
.addProperty( "hibernate.jndi.org.osjava.sj.jndi.shared", "true" )
.addProperty( Environment.JMX_ENABLED, "true" );