Note that there are some explanatory texts on larger screens.

plurals
  1. POIntermittent failures accessing clustered remote EJB via Spring
    primarykey
    data
    text
    <p>I have a Spring application which uses a remote stateless EJB hosted in WebLogic.</p> <pre><code>&lt;jee:remote-slsb id="itemService" jndi-name="org.example.ItemService" business-interface="org.example.ItemService" cache-home="false" lookup-home-on-startup="false" home-interface="org.example.ItemServiceHome" resource-ref="false" refresh-home-on-connect-failure="true"&gt; &lt;jee:environment&gt; java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory java.naming.provider.url=t3://server1:7101,server2:7101 &lt;/jee:environment&gt; &lt;/jee:remote-slsb&gt; </code></pre> <p>My app gets items from the server thus:</p> <pre><code>ItemEntry[] itemEntries = itemService.listAvailableItems(criteria); for(ItemEntry entry: itemEntries) { Item item = itemService.getItemAccessObject(entry.getKey()); // Do something with item } </code></pre> <p>This works fine most of the time.</p> <p>However, when the item is very new (put in the database in the last couple of seconds), I get intermittent failures when I try to do anything with the Item:</p> <pre><code>java.rmi.NoSuchObjectException: CORBA OBJECT_NOT_EXIST 1330446337 No; nested exception is: org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: OMG minor code: 1 completed: No </code></pre> <p>For new objects, as described, the failures seem to happen approximately 50% of attempts, and within the for() loop there will be a mixture of failures and successes.</p> <p>If I change the t3:// address to contain only one hostname:port, the problem goes away.</p> <p>So, my working theory is that the listAvailableItems() call goes to one server in the cluster -- where the items in question have arrived, and that the failing getItemAccessObject() calls are going to a different server, where the items are still syncing.</p> <p>If I bypass Spring and manage the EJB context myself, I can't reproduce the problem.</p> <p>Questions:</p> <ol> <li>Is my working theory realistic? (note that the server cluster is a black box to me)</li> <li>How does the Spring SimpleRemoteStatelessSessionProxyBean and/or the WebLogic client divide calls between cluster members?</li> <li>Is there a way to make a sequence of calls go to the same cluster member?</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload