[jboss-dev-forums] [Design the new POJO MicroContainer] - Bean validation

alesj do-not-reply at jboss.com
Tue May 20 10:42:35 EDT 2008


Regarding this JIRA issue:
 - http://jira.jboss.com/jira/browse/JBMICROCONT-277

I've added this

  |    /**
  |     * Get bean validator bridge.
  |     *
  |     * @param context the owner context
  |     * @return bean validator instance if exists, null otherwise
  |     */
  |    static BeanValidatorBridge getBeanValidatorBridge(KernelControllerContext context)
  |    {
  |       Controller controller = context.getController();
  |       ControllerContext validator = controller.getInstalledContext(BeanValidatorBridge.class);
  |       return validator != null ? BeanValidatorBridge.class.cast(validator.getTarget()) : null;
  |    }
  | 
a way to get the bridge between jsr303 and our MC code.

I've then added hooks into 
 - InstantiateAction (constructor and instantiation validation)
 - PropertyDispatchWrapper (property injection)
 - AbstractKernelControllerContext (method invocation)

Once I'm (+ hopefully getting Emmanuel to chip in) done with jsr303, I'll implement a proper bridge, which we can simply drop into Controller.


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

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



More information about the jboss-dev-forums mailing list