well it depends the rebind. Keep in ming this is an internal part so not respecting the rebind API contract is fine *here*.
the idea of this code is to merge tomee and tomcat JNDI models to have the lookups unified (EE and servlet integration if you want). Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> 2018-01-18 14:01 GMT+01:00 otbutz <thomas.b...@optitool.de>: > Unaltered behaviour. > > Checked the corresponding source of openejb-core 4.7.4: > > public void bindGlobals(Map<String, Object> bindings) throws > NamingException > { > Context containerSystemContext = this.containerSystem. > getJNDIContext(); > for (Map.Entry<String, Object> value : bindings.entrySet()) { > String path = (String) value.getKey(); > if ((!path.startsWith("module/")) && (!path.startsWith("app/")) && > (!path.startsWith("comp/")) > && (!path.equalsIgnoreCase("global/dummy"))) { > Context lastContext = > Contexts.createSubcontexts(containerSystemContext, path); > try { > lastContext.rebind(path.substring(path.lastIndexOf("/") + > 1, > path.length()), value.getValue()); > } catch (NameAlreadyBoundException nabe) { > nabe.printStackTrace(); // the observed output in the > console > } > containerSystemContext.rebind(path, value.getValue()); > } > } > } > > > 1. Why is my webapp even trying to rebind the JNDI entry of my beans? > 2. Shouldn't a "rebind" not fail if something is already there? > > > > -- > Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users- > f979441.html >