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#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...