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: Using @EJB from an EAR app inside a webservice in a different WAR
Date Thu, 12 May 2016 15:45:26 GMT
Hi

did you try to use 2 interfaces (one can extend the other but ensure type
is different for local and remote). Alternative is to use @LocalBean
instead of Local and inject the impl.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-12 17:07 GMT+02:00 jolinnen <joerg@linnenkohl.org>:

> Hello,
> I face a problem for which i cannot find a solution although I did a lot of
> reading, coding and testing.
> My situation:
>
> I've have an EAR with an EJB like this:
>
> @Stateless
> @Startup
> @Local(WMAuthEJB.class)
> @Remote(WMAuthEJB.class)
> public class WMAuthEJBImpl
>        implements WMAuthEJB
> {
> }
>
> I deploy the EAR in the app-directory and on the log of TomEE I find this
> (amongst others):
>
> INFO:
>
> Jndi(name=global/authservices_ear-1.0/authservices_ejb-1.0/WMAuthEJBImpl!wm.administration.ejb.WMAuthEJB)
> --> Ejb(deployment-id=WMAuthEJBImpl)
>
> and I can use it in a remote client. So that's fine.
>
> But now I must use this EJB  inside a rest webservice, I tried this
> (amongst
> others)
>
> // @Stateless
> // @Singleton
> @Path("/")
> public class WMAuthService
> {
>     @EJB
>     private WMAuthEJB                        wmauth;
> }
>
> After deploying the myservice.war in webapps the TomEE log say
>
> INFO: Skipping deployment of Class class myservice due to a
> NoClassDefFoundError: LWMAuthEJB;
>
> To tell the truth I have no idea what to do or what to read next. Sorry for
> that but I had a simolar situation on JBoss with a solution of an xml
> config
> file (jboss-deployme-structure.xml).
>
> Does someone has an advice for me?
>
> Many Thanks
>
> jolinnen
>
>
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Using-EJB-from-an-EAR-app-inside-a-webservice-in-a-different-WAR-tp4678407.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

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