Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-214

Cluster-related ServiceURLs not being discovered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Beta26
    • 4.0.0.Beta24
    • None

    Description

      Scenario:
      standalone EJB client and two EAP server instances (node1 and node2) running the ha profile.

      A clustered SFSB is deployed in the cluster of two nodes. Upon deployment, we see service URLs such as the following being registered:

      service:ejb.jboss:remote+http://127.0.0.1:8080;cluster=ejb;node=node1 
      service:ejb.jboss:remote+http://127.0.0.1:8180;cluster=ejb;node=node2 
      

      The client looks up the SFSB and (due to a known issue with setting cluster affinity) forces the affinity to clustered:

              final RemoteCounter statefulRemoteCounter = lookupRemoteStatefulCounter();
              ClusterAffinity clusterAffinity = new ClusterAffinity("ejb");
              EJBClient.setStrongAffinity(statefulRemoteCounter,clusterAffinity);
      

      When an invocation is made, the following exception occurs:

      java.lang.IllegalStateException: EJBCLIENT000024: Not able to find EJB matching "StatefulEJBLocator for "/new-ejb-example-1.0-SNAPSHOT/CounterBean", view is interface org.jboss.playtime.RemoteCounter, affinity is Cluster "ejb", session ID is UUIDSessionID [9006b390-6333-4bde-99cd-28ef9bf4f65e]"
      
      	at org.jboss.ejb.client.EJBClientContext.discoverAffinityCluster(EJBClientContext.java:883)
      	at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:696)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:96)
      	at com.sun.proxy.$Proxy3.increment(Unknown Source)
      	at org.jboss.playtime.RemoteEJBClient.invokeStatefulBean(RemoteEJBClient.java:75)
      	at org.jboss.playtime.RemoteEJBClientTest.testApp(RemoteEJBClientTest.java:46)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at junit.framework.TestCase.runTest(TestCase.java:154)
      	at junit.framework.TestCase.runBare(TestCase.java:127)
      	at junit.framework.TestResult$1.protect(TestResult.java:106)
      	at junit.framework.TestResult.runProtected(TestResult.java:124)
      	at junit.framework.TestResult.run(TestResult.java:109)
      	at junit.framework.TestCase.run(TestCase.java:118)
      	at junit.framework.TestSuite.runTest(TestSuite.java:208)
      	at junit.framework.TestSuite.run(TestSuite.java:203)
      	at com.intellij.junit3.TestRunnerUtil$SuiteMethodWrapper.run(TestRunnerUtil.java:270)
      	at junit.textui.TestRunner.doRun(TestRunner.java:116)
      	at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:113)
      	at junit.textui.TestRunner.doRun(TestRunner.java:109)
      	at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:45)
      	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      

      This, despite the fact that the ServiceURLs have been seen to be registered on the client by way of topology updates.

      Attachments

        Issue Links

          Activity

            People

              rachmato@redhat.com Richard Achmatowicz
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: