2 Replies Latest reply on Feb 27, 2014 5:15 PM by 1401566

    Can a client node be also an Extend client?

    1401566

      In a Coherence client application we have a cache configuration that holds both local scheme and remote scheme.

      The purpose is for this client to act as both a client node and an Extend client, depending on the cache queried.

       

      ---------------------- START - coherence-cache-config.xml -------------------------

       

      <caching-scheme-mapping>

       

         <!-- local cluster distributed cache -->

          <cache-mapping>

            <cache-name>localCache</cache-name>

            <scheme-name>local-scheme</scheme-name>

          </cache-mapping>

       

         <!-- remote - Extend - cluster distributed cache -->

          <cache-mapping>

            <cache-name>remoteCache</cache-name>

            <scheme-name>remote-scheme</scheme-name>

          </cache-mapping>

       

        </caching-scheme-mapping>

       

        <caching-schemes>

       

        <distributed-scheme>

          <scheme-name>local-scheme</scheme-name>

            <service-name>LocalDistributedService</service-name>

            <partition-count>257</partition-count>

            <backup-count>0</backup-count>

            <request-timeout>30s</request-timeout>

            <backing-map-scheme>

              <local-scheme>

                <scheme-ref>back-local</scheme-ref>

             </local-scheme>

            </backing-map-scheme>

            <autostart>true</autostart>

          </distributed-scheme>

          <local-scheme>

            <scheme-name>back-local</scheme-name>

            <eviction-policy>LRU</eviction-policy>

            <high-units>2048</high-units>

            <unit-calculator>BINARY</unit-calculator>

            <unit-factor>1048576</unit-factor>

          </local-scheme>

       

         <remote-cache-scheme>

         <scheme-name>remote-scheme</scheme-name>

         <service-name>RemoteDistributedService</service-name>

         <initiator-config>

         <tcp-initiator>

         <remote-addresses>

         <socket-address>

         <address system-property="tangosol.coherence.pof.proxy.address">127.0.0.1</address>

         <port system-property="tangosol.coherence.pof.proxy.port">9001</port>

         </socket-address>

         </remote-addresses>

         </tcp-initiator>

         <outgoing-message-handler>

         <heartbeat-interval>5s</heartbeat-interval>

         <request-timeout>30s</request-timeout>

         </outgoing-message-handler>

        </initiator-config>

        </remote-cache-scheme>

       

        </caching-schemes>

       

      ---------------------- END -------------------------

       

      A local TCMP cluster is running and also an Extend TCP cluster.

       

      The remote cache works fine but not the local one.

       

      Here is the error we get when we attempt to access the local cache in the client application:

       

      Exception caught:

      java.lang.RuntimeException: Failed to start Service "LocalDistributedService" (ServiceState=SERVICE_STOPPED) at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:38) at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6) at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39) at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5) at com.tangosol.coherence.component.util.SafeService.restartService(SafeService.CDB:28) at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:39) at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1105) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:937) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:919) at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1296) at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:297) at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:204) at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:181) at com.telus.dg.coh.generic.em.web.mvc.BasicOperationsController.getCacheSize(BasicOperationsController.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

       

      We never tried before to have a Coherence client work both as a client node (distributed-scheme in cache config) and an Extend client (remote-scheme in cache config), maybe this is not supported, is it?