tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Injection fails in any class that didn't instantiate an embedded ejb container
Date Fri, 17 Feb 2012 11:55:20 GMT
localclient or managedbean should do about the same, which managedbean
annotation did you use i think javaee-api contain different version
(multiple package).

@Inject should work too.

You can Simply close your container by test class ; typically you start it
in BeforClass in each test class and close it after tests (AfterClass).

Doing it you'll not need localclient or managedbean at all.

- Romain


2012/2/17 afryer <apfryer@hotmail.com>

> I didn't know about the @ManagedBean annotation. I got it to work using the
> @LocalClient annotation and creating an empty
> META-INF/application-client.xml file.  What's the difference between
> @ManagedBean and @LocalClient?  I just tried using @ManagedBean but i still
> got the same error as before (could not find meta data...).
>
> I did find that using @LocalClient i couldn't inject into my test case
> classes using the @Inject annotation.  I had to use @EJB instead.
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Injection-fails-in-any-class-that-didn-t-instantiate-an-embedded-ejb-container-tp4396189p4396984.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message