Ok just for memories on recent versions you can do using openejb (core and http) API: SystemInstance.get().getComponent(HttpListenerRegistry.class).addHttpFilter(new FilterListener(new MyCustomAuditFilter(), ""), "/.*");
then MyAuditFilter will see all requests. Then you have the request (so standard mecanisms like a thread local to capture what you need or any alternative will work) and you can access the socketURI (if default impl is not enough). Note that using jetty (~6.1.7) you'll get a real http server and no need to worry about which method are fully implemented or not. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-10-15 10:06 GMT+02:00 Charms Styler <[email protected]>: > Hi AndyG, this looks awesome, checked it out couldn't figure-out a > way to get the request host name. do you reckon there's any workaround > for it? > > Hi Romain , I was saying that I only have the openejb, no webserver > just openejb. client uses ejbd to access > > Thanks. > > > On Wed, Oct 15, 2014 at 1:48 AM, AndyG [via TomEE & OpenEJB] > <[email protected]> wrote: >> Try the following within the method call:i >> >> String info = >> org.apache.openejb.server.context.RequestInfos.info().toString(); >> >> Andy. >> >> On 14/10/2014 21:29, Romain Manni-Bucau wrote: >> >>> So there is a http request ;). It was in a mdc iirc but it needed log4j, >>> is >>> that what you think about? >>> >>> Le mardi 14 octobre 2014, Andy Gumbrecht <[hidden email]> a écrit : >>>> I guess Charms means they are using the EJB/TCP protocol for >>> communication - I'm sure there was a way to get the caller IP from the >>> call >>> context. >>>> Andy. >>>> >>>> On 14/10/2014 20:01, Romain Manni-Bucau wrote: >>>>> so I don't get your question sorry :s, why do you want an IP is you >>>>> have no request? >>>>> >>>>> >>>>> Romain Manni-Bucau >>>>> @rmannibucau >>>>> http://www.tomitribe.com >>>>> http://rmannibucau.wordpress.com >>>>> https://github.com/rmannibucau >>>>> >>>>> >>>>> 2014-10-14 19:35 GMT+02:00 Charms Styler <[hidden email]>: >>>>>> No http request since I am only using openejb container. any >>> workarounds ? >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>> >>> http://tomee-openejb.979440.n4.nabble.com/OpenEJB-Client-IP-HOST-tp4672259p4672275.html >>>>>> Sent from the TomEE Dev mailing list archive at Nabble.com. >>>> >> >> >> >> ________________________________ >> If you reply to this email, your message will be added to the discussion >> below: >> http://tomee-openejb.979440.n4.nabble.com/OpenEJB-Client-IP-HOST-tp4672259p4672281.html >> To unsubscribe from OpenEJB Client IP/HOST, click here. >> NAML > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/OpenEJB-Client-IP-HOST-tp4672259p4672294.html > Sent from the TomEE Dev mailing list archive at Nabble.com.
