1 package org.myorg.encconfig.ejb;
2
3 import javax.ejb.EJB;
4 import javax.ejb.Stateless;
5
6
7
8 public class ConfigBeanEJB implements ConfigBeanRemote {
9
10
11 private SampleNoIfaceEJB noIface;
12
13
14 @EJB
15 private SampleLocal localEJB;
16
17
18 @EJB
19 private SampleRemote remoteEJB;
20
21 @Override
22 public boolean haveNoIfaceEJB() {
23 return noIface!=null;
24 }
25
26 @Override
27 public boolean haveLocalEJB() {
28 return localEJB!=null && "Choice1EJB".equals(localEJB.whoAreYou());
29 }
30
31 @Override
32 public boolean haveRemoteEJB() {
33 return remoteEJB!=null && "Choice2EJB".equals(remoteEJB.whoAreYou());
34 }
35 }