Persisting objects in JNDI
There is no persistent backing store to the JNDI service. It's an in memory service and bindings created are lost on server restart. You can use Alternate naming providers such as ldap, file system that support persistence and federate those. See the ExternalContextMBean for how to integrate these into the JBossNS namespace.
You can also use the JNDIBindingServiceMgr to define JNDI entries via and xml service definition.