[jboss-dev-forums] [Design of POJO Server] - Re: Russian dolls and implicit deployment ordering

adrian@jboss.org do-not-reply at jboss.com
Fri Apr 13 10:21:23 EDT 2007


"adrian at jboss.org" wrote : 
  | I much prefer the idea of using AOP (decorators) to handle jndi binding.
  | 
  |   | @JNDIBinding(...)
  |   | public class MyClass
  |   | 
  |   | or
  |   | 
  |   | <bean ...>
  |   |    <annotation>@JNDIBinding(name="whatever")</annotation>
  |   | </bean>
  |   | 
  | 
  | Because:
  | 1) You can change what the jndi binding action means in different environments,
  | e.g. JBoss or Tomcat, without changing the configuration
  | 2) It enables all sorts of other useful features, like not even binding into
  | jndi at all (for client usage) until the barrier service says "open the gates"
  | we're ready to go.

This should also fit in with your requirement to know the jndi mapping to kernel
dependency. The JNDI Binding aspect (since it is a "decorator") can do:

Pseudo code:

  | public void install(ControllerContext context)
  | {
  |    JNDIBinding jndi = context.getMetaData().getAnnotation(JNDIBinding.class);
  |    if (jndi != null)
  |       map.put(jndi.name(), context.getName());
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037088#4037088

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037088



More information about the jboss-dev-forums mailing list