Results 1 to 1 of 1
  1. #1
    Matvei is offline Member
    Join Date
    Jan 2011
    Rep Power

    Question EJB3 Annotations for Session Beans with Parameter ?

    The problem:

    - I want to create one session bean for special logging into several Log4j loggers.
    - I have several components (MDBs) and want to use this one session bean, but with different loggers
    - the Idea is to use with following syntax

    @EJB ("LoggerForIncomeInfo")
    private Monitoring monitor;

    where Monitoring is a Session Bean.

    so, in my Monitor Session Bean Object I would like to have an opportunity to read annotation parameter ("LoggerForIncomeInfo") where this bean was called from. Do I have a direct possibility to do that, or I have to create one abstract Monitor and for every Logger create a realisation of this abstract class with a uniq Logger Name?
    Last edited by Matvei; 01-18-2011 at 03:53 PM.

Similar Threads

  1. EJB3 Message driven beans step-by-step guide
    By nix123456 in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 09-28-2009, 02:29 PM
  2. EJB3 Entity Bean, POJO, without annotations
    By dendroid66 in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 03-09-2009, 11:52 AM
  3. Can I use annotations in superclass, and .cfg.xml files in subclasses in EJB3
    By narayanrec in forum Enterprise JavaBeans (EJB)
    Replies: 4
    Last Post: 01-06-2008, 03:40 AM
  4. Sample Session Beans
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-29-2007, 05:53 PM
  5. threads in session beans
    By bbq in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-05-2007, 04:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts