I have a third party object that is not serializable and I'll like to bind it to JNDI, preferably in contextInitialized() of a ServletContextListener. I see that one can do it by using MBean. Such an approach uses a NonSerializableFactory. But when I try to use this in the contextInitialized() method, Eclipse IDE red-lines it, complaining:
"org.jboss.util.naming.NonSerializableFactory cannot be resolved. It is indirectly referenced from required .class files."
It's interesting that import statement refers to the class in slightly different package where "util" is not part of the package name!