0 Replies Latest reply on Mar 17, 2007 8:06 PM by Anne Forumer

    How to bind a non serializable object to JNDI

    Anne Forumer Newbie

      JBoss4.0.4.CR2 EJB3.0

      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!

      import org.jboss.naming.NonSerializableFactory;

      I'll appreciate any help with this.

      Thanks