On 12/2/10 9:28 PM, David M. Lloyd wrote:
Comments inline.
On 12/02/2010 08:57 PM, Scott Stark wrote:
> I think the introduction of a proper service per deployment phase is a
> good idea.
>
> Can the DUP phase notion be more typed than currently in the jboss-as
> trunk so that the DUP phase is self describing?
Yeah definitely. The service value should definitely be relevant to the
implemented phase. We'll have to see how that actually plays out when
it comes to implementation but it would be nice if the value of the
"modularize" phase would be the actual Module or set of Modules produced
by that phase, for example.
> I had the same question as Brian regarding module annotations resulting
> in additional dependencies. I'm not following the answer, so to clarify
> how a deployment would happen, consider:
>
> ejb1.jar: exports Bean1 interface, imports Bean2 interface
> @Stateless public class Bean1Impl implements Bean1 {
> + @EJB Bean2 bean2;
>
> ejb2.jar : exports Bean2 interface, imports Bean2 interface
> @Stateless public class Bean2Impl implements Bean2 {
> + @EJB Bean1 bean1;
>
> First of all, how are implicit module dependencies like these identified?
> j.d.ejb1.jar.modularize -> depends on exporter of Bean2
> j.d.ejb2.jar.modularize -> depends on exporter of Bean1
As far as I can see, there is no way to identify the implicit
dependency, because you can't identify the dependency without inspecting
the class, you can't inspect the class without it being loaded and you
can't load the class without its dependencies being present already.
Yeah we could pre-load and analyze the class using Javassist or
something but that adds a lot of startup overhead just so the user
doesn't have to add one manifest entry.
Guys sorry to interrupt this trend of thought, but I believe we can
identify all possible cross-module EE injection and convert them to deps
without loading the classes. It would mean adding annotation values to
our index, which I had been avoiding due to space/time efficiency, but I
believe the impact is actual less than I have feared.
I will prototype this quickly and let you know.
--
Jason T. Greene
JBoss, a division of Red Hat