I am using ejb 3.0 and Jboss and during the deployment of my application(i.e. during server startup), I am regularly getting warning
"InitialContext did not implement EventContext" from SessionFactoryObjectFactory class.
I went in the source code of hibernate, there in the class I found this:
try {
Context ctx = NamingHelper.getInitialContext(properties);
NamingHelper.bind(ctx, name, instance);
log.info("Bound factory to JNDI name: " + name);
( (EventContext) ctx ).addNamingListener(name, EventContext.OBJECT_SCOPE, LISTENER);
}
catch (InvalidNameException ine) {
log.error("Invalid JNDI name: " + name, ine);
}
catch (NamingException ne) {
log.warn("Could not bind factory to JNDI", ne);
}
catch(ClassCastException cce) {
log.warn("InitialContext did not implement EventContext");
}
I cannot understand why the context is cast to Event Context.
One more thing, Seeing the log what I found that this warning is not only comming on server startup but also in between.
Can anybody suggest changes I have to make in my application.
Thanks in advance