On Sep 24, 2009, at 12:09 PM, Laird Nelson wrote:
1. Could you make LocalClient be inheritable?
Now that I think of it we do have some mild form of inheritance in this code. Subclasses are not scanned for annotations, but subclasses can call 'context.bind("inject", this)' without issues. The meta-data of the parent class will be found and its injection will occur on the subclass. Added another test case to make sure it remains stable.
So you could have a base test case that has all the fields, etc, that need to be injected and subclass that over and over without having to declare it as a LocalClient. Just if you want to have more injectable fields in the subclass then you'd need to (currently) add @LocalClient in addition to your @EJB, @PersistenceContext, @PersistenceUnit or @Resource usage.
Not sure if that makes things a little easier for what you need. -David
