eclipse-ee4j / glassfish-samples

Other
32 stars 27 forks source link

Additional EJB example suggestion #56

Open glassfishrobot opened 7 years ago

glassfishrobot commented 7 years ago

Please could you add an example which shows two Stateless session beans which both implement the same remote interface without annotating the interface as remote.

In other words:

public interface RemoteI
{
}

public interface LocalI
{
}

@Stateless(name = "BeanOne")
@Local(LocalI.class)
@Remote(RemoteI.class)
public class BeanOne implements LocalI, RemoteI
{
}

@Stateless(name = "BeanTwo")
@Local(LocalI.class)
@Remote(RemoteI.class)
public class BeanTwo implements LocalI, RemoteI
{
}
glassfishrobot commented 4 years ago