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

List:       openejb-user
Subject:    Re: get {ejbJarId} value programmatically
From:       Romain Manni-Bucau <rmannibucau () gmail ! com>
Date:       2016-03-23 14:56:59
Message-ID: CACLE=7NdV+Hgwq5hfSgMjMgNQ-CQJ+RV0wYR5h8Td1EKnW__Hg () mail ! gmail ! com
[Download RAW message or body]

2016-03-23 15:46 GMT+01:00 Felipe Jaekel <fkjaekel@gmail.com>:
> Thanks for the quick reply
>
> java:module/ModuleName works as expected on EJBs
>

Maybe I'm missing but I don't think so. That said it is easy to
package an EJB by "module" just with a getter on this value and
injecting this EJB in CDI beans.

>
> Is there an alternative for CDI beans? It works with a regular file name,
> but when I add ## to parallel deploy it doesn't seem to be populated, I get
> this:
>
> *javax.naming.NameNotFoundException: Name [module/ModuleName] is not bound
> in this Context. Unable to find [module].*
>

Can be a bug - even if I though it was handled on 7.0.0-M3. If you can
share a sample reproducing it I will have a look later this week.

> 2016-03-23 10:27 GMT-03:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
>
>> does a lookup on java:module/ModuleName or java:app/AppName helps?
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2016-03-23 14:22 GMT+01:00 Felipe Jaekel <fkjaekel@gmail.com>:
>> > Hi,
>> >
>> > I use parallel deployment, and when I log exceptions I add the webapp
>> > version too...
>> >
>> > Currently I'm using this to get the version:
>> >
>> >
>> *StringUtils.substringBefore(StringUtils.substringAfter(servletContext.getRealPath("/"),
>> > "##"), "/");*
>> >
>> > But I'd like a solution that don't use ServletContext to make easier to
>> get
>> > the version inside EJBs.
>> >
>> > Is it possible to get the {ejbJarId} value programmatically?
>> >
>> > Thanks
>>
[prev in list] [next in list] [prev in thread] [next in thread] 

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