>From what I can tell, jBoss treats individual .jars w/in an .ear as a
separate applications. Is this intended behavior? Specifically, I need to
use the ejb-link tag to link two beans, each in separate .jars of the same
.ear (legal, according to section 14.3.2 of the 1.1 spec). To this end, I
propose the following refactoring of ContainerFactory:
add method createContainer( BeanMetaData bean, URL url ) - isolate
responsiblity for container creation (basically, move the guts of the
current deploy( URL ) method here)
add method deploy( URL app, URL[] jars ) - deploy all jars to a single
application (@app is simply used for application identification), initalize
and start the application; delegates majority of work to createContainer()
modify method deploy( URL url ) - basically, just call deploy( url, new
URL[]{ url } )
Also, the J2eeDeployer would need slight mods - the various deployment
methods (startApplication, stopApplication, checkApplication) would need to
make a single invocation to the ejb deployer (a.k.a. ContainerFactory)
rather than a separate invocation for each .jar.
Rationale - the meat of ContainerFactory is the createContainer(..) method;
it's responsibility should be creation and initialization of the bean
Containers, not initialization/starting of an Application. I really don't
like having the deploy( URL, URL[] ) method; the responsibility for
application deployment IMHO doesn't belong in ContainerFactory, but until
ya'll get the whole system/application deployment worked out (ala the
Complex J2eeDeployment...thread), I think it's the simplist solution.
This simple refactoring would, I believe, solve my problem; however, it's
entirely possible there's something I've missed and/or someone's already
working on this. Since some of my colleagues require this behavior
immediately, I'm going to start work on it, but any
comments/suggestions/tirades would be appreciated,
Mike