JBoss Community

Re: [jboss-metadata] Validation on completely merged view

created by henk de boer in JBoss Microcontainer Development POJO Server - View the full discussion

jaikiran pai wrote:

 

We did not plan to support overriding of JBoss specifc JNDI names for no-interface views, since EJB3.1 introduced a portable JNDI name scheme. You are encouraged to use the EJB3.1 jndi names instead of JBoss specific ones.

 

Yes, that does make sense.

 

I noticed though that internally JBoss sometimes uses the non-portable names, like in e.g. JBossEnterpriseBeanMetaData. I also have spotted code like this on a couple of occasions:

 

 

 private static String getLocalJndiName(JBossEnterpriseBeanMetaData ejb, Class<?> ejbClass)
   {
      // See if local binding is explicitly-defined
      LocalBinding localBinding = ejbClass.getAnnotation(LocalBinding.class);
 
      // If none specified
      if (localBinding == null || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0))
      {
         String name = ejb.getLocalJndiName();
         return name;
      }
      // Local Binding was explicitly-specified, use it
      else
      {
         return localBinding.jndiBinding();
      }
   }
 

 

(this is from ResteasyEjbDeployer)

 

Code such as this never works with no-interface views, so the only way out for the user (except for patching the code) would be if the LocalBinding annotation was allowed on EJB beans without an interface.

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development POJO Server at Community