JBoss Community

Re: EJB 3.1 Global JNDI names

created by erik romson in JNDI and Naming - View the full discussion

As this is used in testing, I did this

 

                Stateless stateless= sessionType.getAnnotation(Stateless.class);

                String moduleName=sessionType.getProtectionDomain().getCodeSource().getLocation().getPath();

                moduleName=moduleName.replace('\\','/');

                moduleName=moduleName.substring(moduleName.lastIndexOf('/'),moduleName.length());

                String name=moduleName+"/"+stateless.name()+"!no-interface";

 

it is tied into global jndi with [module name]/[EJB Name]!no-interface

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community