Fireworx
Fireworx

Reputation: 11

How to access an EJB in an ear from a war?

I have two Projects deployed on the same weblogic server:

  1. An ear archive with an EJB (@Local, @Stateless)
  2. A war archive

I want to access the EJB from a class inside the war archive. Is this generally possible? How?

Upvotes: 0

Views: 999

Answers (1)

Fireworx
Fireworx

Reputation: 11

  1. Interface needs @Remote
  2. Stateless annotation of EJB class needs mappedName = "ejb/myEJB"
  3. Lookup with "ejb.MyEJB#mypackage.MyEJBInterface"

Upvotes: 1

Related Questions