Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Using annotations - @Resource

Hi all!

Are annotations such as @Resource possible to use?

If I use
session = ctx.lookup("java:/comp/env/mail/Session”);
it works fine.

If I use
@Resource(name="java:/comp/env/mail/Session”)
Session session;
or
@Resource(mappedName="java:/comp/env/mail/Session”)
Session session;
or
@Resource(lookup="java:/comp/env/mail/Session”)
Session session;

it does not work, although the session is not null (assumes the smtp host as localhost)

/rp

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top