In the same way that JBoss c开发者_运维技巧an manage jdbc data sources can it manage LDAP contexts using JNDI?
Yes, this is just a Tomcat custom <Resource>, see the Tomcat documentation.
In brief, just define a and provide your own implementation of an LdapContextFactory. JBoss will call your getObjectInstance() method with a first parameter that you can cast to a Reference, traverse all its RefAddrs, and get your option names via RefAddr.getType(), and their values via RefAddr.getContent(). Then you use whatever you have passed there to create your LdapContext and return it.
精彩评论