Ejb jndi entries can be private. If you bind something different but using the same name than in the web jndi tree then you can get some surprises
Le dimanche 28 septembre 2014, Lars-Fredrik Smedberg <[email protected]> a écrit : > What does that mean? Same name? ... I not understand exactly... > > On Sun, Sep 28, 2014 at 6:27 PM, Romain Manni-Bucau <[email protected] > > wrote: > >> to the EJB jndi tree, not the web one (means can change if you bind it >> twice) but should be ok for you >> >> >> Romain Manni-Bucau >> Twitter: @rmannibucau >> Blog: http://rmannibucau.wordpress.com/ >> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> Github: https://github.com/rmannibucau >> >> >> 2014-09-26 20:56 GMT+02:00 Lars-Fredrik Smedberg <[email protected]>: >> > If I use ejb-jar.xml or web.xml, are they bound to same JNDI name? That >> is >> > java:comp/env/<env-entry-name> ? >> > >> > Regards >> > LF >> > >> > On Thu, Sep 25, 2014 at 11:14 PM, Romain Manni-Bucau < >> [email protected]> >> > wrote: >> > >> >> that's why i pointed out ejb-jar.xml and/or env-entries.properties >> >> >> >> >> >> Romain Manni-Bucau >> >> Twitter: @rmannibucau >> >> Blog: http://rmannibucau.wordpress.com/ >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> >> Github: https://github.com/rmannibucau >> >> >> >> >> >> 2014-09-25 21:49 GMT+02:00 Lars-Fredrik Smedberg <[email protected]>: >> >> > So I guess it would be better to put the configuration somewhere else >> >> > then... rather than mixing the containers and their configuration as >> you >> >> > point out. >> >> > >> >> > Thanks >> >> > LF >> >> > >> >> > On Thu, Sep 25, 2014 at 5:40 PM, Romain Manni-Bucau < >> >> [email protected]> >> >> > wrote: >> >> > >> >> >> 2014-09-25 17:03 GMT+02:00 Lars-Fredrik Smedberg < [email protected] >> >: >> >> >> > Hi >> >> >> > >> >> >> > Thanks for the quick reply... a follow up below. >> >> >> > >> >> >> > On Thu, Sep 25, 2014 at 4:41 PM, Romain Manni-Bucau < >> >> >> [email protected]> >> >> >> > wrote: >> >> >> > >> >> >> >> 2014-09-25 16:03 GMT+02:00 Lars-Fredrik Smedberg < >> [email protected] >> >> >: >> >> >> >> > Hi >> >> >> >> > >> >> >> >> > I have a context-param in my web.xml file that I access using >> >> >> >> > getInitParameter in Servlet context. >> >> >> >> > >> >> >> >> > For normal HTTP requests I have a ServletContextListener that >> >> fires an >> >> >> >> > event on contextInitialized and an @Application scoped bean that >> >> >> stores >> >> >> >> the >> >> >> >> > context so I from other places can access the context-param. >> >> >> >> > >> >> >> >> > I want to be able to access this context-param also when an >> Message >> >> >> >> Driven >> >> >> >> > Bean, MDB, is called. >> >> >> >> > >> >> >> >> > Questions: >> >> >> >> > >> >> >> >> > 1. Is there any guarantees that the ServletContextListener will >> >> >> receive >> >> >> >> an >> >> >> >> > event (containing the ServletContext) before the first MDB call >> if >> >> NO >> >> >> >> http >> >> >> >> > requests has been made? >> >> >> >> >> >> >> >> MDB is started before web container is started so no but if you >> are >> >> >> >> sure you can't get any message (JMS) that's fine >> >> >> >> >> >> >> > >> >> >> > I not need the init-parameter until the first acutal JMS message >> >> arrives. >> >> >> > Will the web container start before any actual http requests >> arrives? >> >> >> > >> >> >> >> >> >> depend you config (loadOnstartup for instance) but basically here you >> >> >> mix MDB container (no link with web container) and servlet container. >> >> >> >> >> >> > >> >> >> >> >> >> >> >> > 2. If the answer to the above is NO should I then move this >> >> parameter >> >> >> out >> >> >> >> > of web.xml and place it somewhere else? Any suggestions to >> where? >> >> >> >> > >> >> >> >> >> >> >> >> Can be in ejb-jar.xml or env-entries.properties as MDB env entry >> >> >> >> >> >> >> >> > Regards >> >> >> >> > LF >> >> >> >> > >> >> >> >> > -- >> >> >> >> > Med vänlig hälsning / Best regards >> >> >> >> > >> >> >> >> > Lars-Fredrik Smedberg >> >> >> >> > >> >> >> >> > STATEMENT OF CONFIDENTIALITY: >> >> >> >> > The information contained in this electronic message and any >> >> >> >> > attachments to this message are intended for the exclusive use >> of >> >> the >> >> >> >> > address(es) and may contain confidential or privileged >> >> information. If >> >> >> >> > you are not the intended recipient, please notify Lars-Fredrik >> >> >> Smedberg >> >> >> >> > immediately at [email protected], and destroy all copies of >> this >> >> >> >> > message and any attachments. >> >> >> >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Med vänlig hälsning / Best regards >> >> >> > >> >> >> > Lars-Fredrik Smedberg >> >> >> > >> >> >> > STATEMENT OF CONFIDENTIALITY: >> >> >> > The information contained in this electronic message and any >> >> >> > attachments to this message are intended for the exclusive use of >> the >> >> >> > address(es) and may contain confidential or privileged >> information. If >> >> >> > you are not the intended recipient, please notify Lars-Fredrik >> >> Smedberg >> >> >> > immediately at [email protected], and destroy all copies of this >> >> >> > message and any attachments. >> >> >> >> >> > >> >> > >> >> > >> >> > -- >> >> > Med vänlig hälsning / Best regards >> >> > >> >> > Lars-Fredrik Smedberg >> >> > >> >> > STATEMENT OF CONFIDENTIALITY: >> >> > The information contained in this electronic message and any >> >> > attachments to this message are intended for the exclusive use of the >> >> > address(es) and may contain confidential or privileged information. If >> >> > you are not the intended recipient, please notify Lars-Fredrik >> Smedberg >> >> > immediately at [email protected], and destroy all copies of this >> >> > message and any attachments. >> >> >> > >> > >> > >> > -- >> > Med vänlig hälsning / Best regards >> > >> > Lars-Fredrik Smedberg >> > >> > STATEMENT OF CONFIDENTIALITY: >> > The information contained in this electronic message and any >> > attachments to this message are intended for the exclusive use of the >> > address(es) and may contain confidential or privileged information. If >> > you are not the intended recipient, please notify Lars-Fredrik Smedberg >> > immediately at [email protected], and destroy all copies of this >> > message and any attachments. >> > > > > -- > Med vänlig hälsning / Best regards > > Lars-Fredrik Smedberg > > STATEMENT OF CONFIDENTIALITY: > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > address(es) and may contain confidential or privileged information. If > you are not the intended recipient, please notify Lars-Fredrik Smedberg > immediately at [email protected], and destroy all copies of this > message and any attachments. > -- Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
