I @Autowired depenencies into my UserDetailsService
private AccountSystem accountSystem;
So you can make your ejb class a bean in your xml configuration. I suggest using the jee namespace. It has a tag to do an EJB lookup and the bean is the EJB. Then you just inject it into your UserDetailsService. You might still need that entry in your web.xml, but I am leaning towards not needing it.