openejb:Resource is bound but servlet context is not setup which is normal
AFAIK
Le 7 sept. 2015 13:15, "manz" <oren.manz...@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.
>

Reply via email to