[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-development
Subject:    Re: jndi path java:comp/env is empty on cdi extension AfterDeploymentValidation event
From:       Romain Manni-Bucau <rmannibucau () gmail ! com>
Date:       2015-09-07 20:54:54
Message-ID: CACLE=7O33p_ib5V2cUqQC6frg-Ms8p27sfGe=uVvfb3K_YaZwA () mail ! gmail ! com
[Download RAW message or body]


openejb:Resource is bound but servlet context is not setup which is normal
AFAIK
Le 7 sept. 2015 13:15, "manz" <oren.manzury@elbitsystems.com> a écrit :

> Yes it works after,
> 
> Tested using ServletContextListener like this:
> 
> @WebListener
> public class MyServletContextListener implements
> javax.servlet.ServletContextListener {
> 
> public void contextInitialized(ServletContextEvent sce) {
> // java:comp/env is populated
> Context context = new InitialContext();
> DataSource dataSource =
> (DataSource)context.lookup("java:comp/env/my_jndi_datasource");
> }
> 
> public void contextDestroyed(ServletContextEvent sce) {
> 
> }
> }
> 
> I am aware to the difference in jndi names between TomEE and JBoss , I am
> using the correct jndi name for each environment.
> 
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/jndi-path-java-comp-env-is-empty-on-cdi-extension-AfterDeploymentValidation-event-tp4676136p4676140.html
>  Sent from the TomEE Dev mailing list archive at Nabble.com.
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic