"manik.surt...@jboss.com" wrote : One way to do this - and this would involve extending or modifying the MC - is to replace whatever backing container the MC uses to store beans it creates (probably a Map) with an Infinispan Cache. You can easily achieve this with the bean implementing KernelRegistryPlugin.
| public interface KernelRegistryPlugin | { | /** | * Get a registration | * | * @param name the name of the object | * @return the registration | * @throws IllegalArgumentException for a null name | */ | KernelRegistryEntry getEntry(Object name); | } | Every such bean becomes part of MC registry, and as such it's always "asked" if it knows how to provide a bean per name parameter. e.g. JNDI KRP | public class JNDIKernelRegistryPlugin implements KernelRegistryPlugin | { | private Hashtable<?,?> properties; | private Context context; | | public void setProperties(Hashtable<?,?> properties) | { | this.properties = properties; | } | | public void create() throws NamingException | { | if (properties != null) | context = new InitialContext(properties); | else | context = new InitialContext(); | } | | public void destroy() throws NamingException | { | if (context != null) | context.close(); | context = null; | } | | public KernelRegistryEntry getEntry(Object name) | { | try | { | Object target = context.lookup(name.toString()); | if (target != null) | return new AbstractKernelRegistryEntry(name, target); | } | catch (NamingException e) | { | } | return null; | } | } | In Infinispan's case you would simply replace context with cache. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249373#4249373 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249373 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user