java - Singleton vs Stateful remote EJB references in clusters -


I am using a vanilla jailbase 6 server with some projects to test the functionality of the cluster jebos environment. My problem is that if I transfer from one EJB reference (another type) to one instance of the same type in the other node in one node, then an exception has been thrown on the adoption method and stating that is not registered in the long_alphanumeric_key key cache for the specified bean (InfinispanStatefulCache)

The thing is that instead of a state-annotation on the object I need to move Si Gltn is transferred object work incorrectly by using annotations, to implement shared methods Ijebi on the server, where it was built. The problem is that in this case there is a defect similar to HA-Singleton. All transferred references where the first HA-JNDI was obtained through a search on the tree.

Some insights on what I'm trying to achieve:

Am I currently presenting an example of Stateful EJB between a breed The reason for not using hack-singleton-singleton is the reason that the situation of such singles is especially on the master node of the cluster, so if the node shuts down or fails, then Example status is lost.

Using a polished bean will have to face the state on the cluster, thus preventing the loss of the state if failure on the node. I still fully understand how Jabos and Infinasap cache work, but as far as I've read, the @clustered annotated Stateful Beans' state is repeated on the cluster automatically.

We have already warned of problems using Singleton and HA-Singleton in the current Jebos version, so welcomed any type of document or pattern to help resolve this design change. Will go

In addition, I appreciate any documentation that Infinispan can give me insights on how Cash and JBs clustering work. The content I have read so far, it was mixed with the old Jabes versions, where jaboscapes were used instead of infinites.

Thanks in advance, German

. JBIS AS6 or AS7 still does not support cluster eJB singletons - which are really looking for you I think. Hey-Singleton will ensure that only one example of some service has been started on the single node of the cluster only. It does not seem that it fits in your use, it seems that you really only need to distribute the position of EJB singletons. Here's what I am using a local EJB singleton, but use Infinishpen to store your distributed state: * For starters, I recommend that you use AS7 instead of AS6, because Infinispan Integration is more mature * In AS7, you can use an Infinash cache directly in your singleton. E.g.

  @Singleton Public Square Misenington {// This refers to the same Infinishpain Cash Container, which is used for SSSB Replication @ Resource (Lookup = "Java: jboss / infinispan / container / ejb") Used Private Container Container Container; Private cache & lt;?,? & Gt; Cash; @PostContruct Public Zero init () {// This will create a cache for use by this singleton // Any state should be stored in the cache. This.cache = container.getCache (this.getClass (). GetName ()); } @PreDestroy Public Null Destroy () {this.cache.stop (); }}    

Comments