You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2020/07/01 16:02:13 UTC

Re: @LocalClient query

That's a big help, thanks David. It isn't my code, and I'm trying to
reproduce an issue someone else is seeing. It looks like the packaging and
setup is indeed not a .war file, so this may be irrelevant :-)

I can definitely take a shot at making this work with .war files. Would I
be right in thinking that classes annotated with @LocalBean should show up
in JNDI under openejb:client/?

Jon

On Tue, Jun 30, 2020 at 10:44 PM David Blevins <da...@gmail.com>
wrote:

> > On Jun 30, 2020, at 1:16 PM, Jonathan Gallimore <
> jonathan.gallimore@gmail.com> wrote:
> >
> > Hi Folks
> >
> > I'm digging through an unusual problem, specifically using @LocalClient
> > inside an application. There's some old documentation here:
> > http://tomee.apache.org/local-client-injection.html, which suggests that
> > you can include @LocalClient beans inside an EJB module, and EJB Client
> > module and even in a collapsed-EAR (war?).
> >
> > I have added one to a .war file, and it isn't picked up. The AppModule
> has
> > an EjbModule, but there is no ClientModule ever created. Should this
> work,
> > or should I be packaging this as an EAR?
>
> I think the more relevant question is what do we want the behavior to be?
>
> When I hacked up that feature the primary need was getting dependency
> injection test cases that used the EJB 3.1
> javax.ejb.embedded.EJBContainer.  Looks like I was confident enough to say
> it worked in .war files, but I also see it was 2009.  At that time "TomEE"
> was still the OpenEJB-Tomcat-integration and Arquillian was being written.
>
> So no TomEE, Arquillian or TomEE Arquillian Adapter to help us test it.
> It may have worked and then broke due to no test coverage.  It may have
> only worked "conceptually", meaning not actually :)
>
> If the docs say it should work, we should maybe give that a shot and this
> time write an Arquillian test case for it.
>
>
> -David
>
>