On Sun, Sep 9, 2018 at 12:22 PM Andreas Ernst <a...@ae-online.de> wrote:
> Hi, > Hi! > i try to access a Payara Mailsession (mail-resource), but it is always > null: > > @Stateless > public class MailSessionBean { > > private static final Logger logger = > Logger.getLogger(MailSessionBean.class.getName()); > @Resource(name = "mail/motdSession") > private Session mailSession; > Shouldn't you use @Inject instead of @Resource? What's the fully qualified name of the @Stateless and @Resource annotations you're using? > public static void bind(ServiceBinder binder) { > binder.bind(MailSessionBean.class); > This part is correct. -- Thiago