This content has been marked as final.
Show 1 reply
-
1. Re: Illegal context in name: java:app/jdbc/ActionBazaarDS
jaysensharma Dec 23, 2015 8:37 AM (in response to kiranmohan)For the Deployable DataSources (*-ds.xml) You can try other names like :
java:global/jdbc/ActionBazaarDS
java:jboss/jdbc/ActionBazaarDS
java:/something/ActionBazaarDS
In Wildfly the DataSource or non EJB components the JNDI name can be described as mentioned in the following code:
public static BindInfo bindInfoFor(final String jndiName) { // TODO: handle non java: schemes String bindName; if (jndiName.startsWith("java:")) { bindName = jndiName.substring(5); } else if (!jndiName.startsWith("jboss") && !jndiName.startsWith("global") && !jndiName.startsWith("/")) { bindName = "/" + jndiName; } else { bindName = jndiName; } final ServiceName parentContextName; if(bindName.startsWith("jboss/exported/")) { parentContextName = EXPORTED_CONTEXT_SERVICE_NAME; bindName = bindName.substring(15); } else if (bindName.startsWith("jboss/")) { parentContextName = JBOSS_CONTEXT_SERVICE_NAME; bindName = bindName.substring(6); } else if (bindName.startsWith("global/")) { parentContextName = GLOBAL_CONTEXT_SERVICE_NAME; bindName = bindName.substring(7); } else if (bindName.startsWith("/")) { parentContextName = JAVA_CONTEXT_SERVICE_NAME; bindName = bindName.substring(1); } else { throw NamingLogger.ROOT_LOGGER.illegalContextInName(jndiName); } return new BindInfo(parentContextName, bindName); }
Regards
Jay SenSharma