There are 3 approaches to this I believe
1. Don't have a JNDI dependency, use real dependencies that can be figured out at the
DESCRIBE phase.
Advantages: A pure solution.
Disadvantages:
a) Every component will need to change to add supplies
b) Doesn't work with non-JBoss components. Components we don't control. user
will have to explicitly say, HEY don't have a dependency for this thing!
c) Doesn't work with remote JNDI bindings
d) This is an all-or-nothing improvement
2. If a component has a JNDI dependency, register a depends with the Kernel of that JNDI
name. Add a JNDIRegistryPlugin to the kernel. Extend JBoss JNDI so that listener objects
could register for event callbacks. A Bind/unbind listener could install/remove JNDI
beans that resolve the dependency
Advantages:
a) Minimal impact to other components (like JCA, etc...)
Disadvantages:
a) Doesn't work with remote JNDI bindings
3. If a component has a JNDI dependency, register a depends with the Kernel of that JNDI
name. create a background thread that pings JNDI for unresolved JNDI names. When it pops
up install a JNDI bean, when it disappears uninstall it.
Advantages:
a) Works with any JNDI dependency
b) minimal changes
Disadvantages:
a) Every EJB3 SFSB lookup creates a session :). We're covered locally because
dependency layer should create a real hard dependency for @EJB. But remote?
b) requires a background thread that could slow deployment.
I like #2 the best combined with #3. #3 would be there to soley handle remote JNDI
dependencies. The reason I want #2 is that it doesn't require changes to everything.
#1 is really bad as the user may encounter an error and will not know about the extra
metadata they need to provide. #2 may also be useful for other things beyond kernel
dependencies.
Thoughts?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081904#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...