"Juergen.Zimmermann" wrote : 
  | So my 1st problem is: how to get the jndi name when the interface of an EJB 
is available?
  | 
Dunno, this is EJB question not MC. ;-)
Either ask on their forum or check Weld-int 
where, afair, something similar had to be implemented.

"Juergen.Zimmermann" wrote : 
  | 
  |   | DeploymentUnit du = ???;  // How to get DeploymentUnit? Via ClassLoader?
  |   | 
  | 

  | ClassLoader cl = clazz.getClassLoader();
  | Module module = ClassLoading.getModuleForClassLoader(cl);
  | if (module instanceof AbstractDeploymentClassLoaderPolicyModule)
  | {
  |    AbstractDeploymentClassLoaderPolicyModule deploymentModule = 
(AbstractDeploymentClassLoaderPolicyModule)module;
  |    DeploymentUnit unit = deploymentModule.getDeploymentUnit();
  | 
This way you get the deployment unit owning the classloader/module,
but to actually get the right deployment unit you would need to check the whole 
hierarchy of this unit.
e.g.
get class's source location, and check it against unit's and sub-units 
classpath roots.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266915
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to