On Nov 23, 2006, at 3:57 AM, Mohammad Nour El-Din wrote:

Hi Manu...


Comments and additions are below



On 11/23/06, Manu George <[EMAIL PROTECTED]> wrote:
--------------------------------------------------------------------- -------------------------------------------------------------
Dependency Injection
Every possible type of JNDI entry can be injected via fields/ annotations. Fields that need to have values injected should not be static or final.
If a session bean makes use of dependency injection, the container
injects these references after the bean instance is created, and
before any business methods are invoked on the bean instance. If
dependency injection fails, the bean instance is discarded. The
Deployer can mark fields for Dependency injection by using deployment
descriptor elements as well as annotations. Always deployment
descriptor elements override the annotations.Container must throw
NameNotFoundException if any reference is not found. But what if we
try
to inject? We are assuming that no value will be injected and no
exception will be thrown.


Here I don't know what kind of exceptions should be thrown, but we need to
throw an exception that is not related to the APIs we are using for
reflection and injection, for example, we are now using ASM based APIs for doing this task, at least currently for reflection, but what if - in the future - we used other APIs which may throw other exceptions than ASM APIs currently throw, we we need to make our own common exceptions with suitable detailed info about what really happened inside the container so users can
know what is the problem.

Mohammand and I chatted on IRC a bit about this one. Everyone thank Mohammad as he's gotten me all excited to revive our old design docs. I've put them up here for now, but we really need to get them transfered into the wiki:
  http://people.apache.org/~dblevins/tmp/openejb/design_openejb.html

Anyway, so the ASM usage we have now takes place only in this component (http://people.apache.org/~dblevins/tmp/openejb/ design_novaconfig.html). Once the container system (and all the containers) is built, we are free from ASM. At runtime injection occurs via plain reflection via the xbean-reflect library.

8) The container needs to prompt the Deployer of any unresolved EJB
references, and allow him or her to resolve an EJB reference by
binding it to a specified compatible target bean.


I think this applies to all kinds of references, as their references should be resolved before using them. Event if the Specs don't specify that the
container should do this, I think it is a great feature to have.

Definitely. We have a command line deploy tool which does prompt people for this info, but generally people don't like having to sit though it. It'd be great if we had an IDE plugin.

We need to create test cases for each type of resource with both
annotations and dd based injection as well as overrides.


DavidB, I have only one question for you, what type of resources we
currently support, do we have JMS , URL, Mail, and WebServices ??? Just want to be motivated, that is, if we don't have all these features I will be
glad, as we will have a lot of work to do :D .

Good news then, we don't support the ones you've mentioned :) There's a good amount of work there too.

-David

Reply via email to