[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
MC only provides the means to connect to existing distributable envs. e.g. @JMX, @JndiBinding You will have to provide your own distributed env: * RMI * Hessian or Burlap * Infinispan * ... And then simply register your beans against it. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249368#4249368 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249368 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
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. This should be trivial since org.infinispan.Cache extends java.util.concurrent.ConcurrentMap. Maybe alesj can comment more on whether this is something viable from a MC standpoint. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249370#4249370 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249370 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
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=bbop=viewtopicp=4249373#4249373 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249373 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
Nice and easy! :-) We should document this on a wiki somewhere. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249375#4249375 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249375 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
manik.surt...@jboss.com wrote : We should document this on a wiki somewhere. I guess we can ask mukulb if he's willing to do this once he's done? :-) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249376#4249376 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249376 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
@mukulb wdyt? :) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249377#4249377 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249377 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Microcontainer] - Re: Use of JBoss MC Pojo from in distributed env
Thanks Ales and Manik. I can definitely add information to Wiki but i haven't used infinispan. But if whatever we discussed only needs to be documented then i will do it. Thanks, View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=4249416#4249416 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249416 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user