Skip to main content

Injecting Remote EJB in to MDB

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2003-06-13

I have a legacy, EJB 2 application that is deployed on GF v3. All of the beans are Remote.I am adding a new MDB to it, and trying to inject one of the existing Session Bean in to the MDB.
The ejb-jar.xml entry for the Session Bean looks like this:



In my MDB, I have this:

@EJB(name = "ejb/ProfileSession", beanInterface=ProfileSessionHome.class, beanName = "ProfileSession")

The exception I am getting when the MDB is created is:

com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-refname=ejb/ProfileSession,Remote 2.x,Remote 2.x component resolved to intra-app
EJB ProfileSession in module
into class Can not set field to

Both the Session Bean and MDB are deployed within the same EAR artifact.

Any insight to this would be appreciated.