Discussions

General J2EE: Are annootations appropriate here?

  1. Are annootations appropriate here? (1 messages)

    Hey all

    I have a design decision to make and was hoping to get some feedback. I have several session ejbs that retrieve and manipulate various portions of Account DTO. Now I need to funnel all the acct calls thru some other code that checks that acct is not being locked in a certain biz state. I was thinking of implementing annotations for this func. (check that acct is not being locked and through acct locked exception if necessary) and then proceed with retrieval, etc of the Account

    I am using Jboss 4.0.1sp1. Does this design sound good to you? Any alternatives?

    Thanks
    James
  2. Are annootations appropriate here?[ Go to top ]

    From what I see, you need to implement a business processing procedure on Account and you have to implement a precondition to that. I just can't see how annotations could help you to "check that acct is not being locked and trow acct locked exception if necessary"....

    From what I know, annotations can be applied to program elements (classes, fields, methods, ....) and not to instances.

    Can you please detail what you have in mind, maybe I'm missing something.

    cheers,
    Emil ( http://entzi.blogspot.com/index.html )