[jboss-dev-forums] [Design of POJO Server] - Re: Deploying ValidatorFactory

wolfc do-not-reply at jboss.com
Thu Aug 13 11:00:25 EDT 2009


You can't bind in java:comp, because you haven't established the right context. (You need to know the component and establish it currently via ENCFactory.pushContextId(id). It's going to change into something like ENCFactory.pushComponent(component).)
public String createName(DeploymentUnit unit, ValidatorFactory factory)
  | {
  |    return "java:comp/env/" + unit.getSimpleName(); // TODO - fix this
  | }
You are probably better off binding it into global JNDI.

Another way which I'm looking into (for EJB3) is binding an ObjectFactory which starts the (on-demand) MC bean on lookup. The binding itself isn't a performance issue.

For the dependency something must supply jndi:name though. Or the bean name which does the binding should come from a resolver.

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

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



More information about the jboss-dev-forums mailing list