If you use *Spring Data Geode* you can forgo all the ceremony of having your application-specific components and Geode plugins implement fluffy interfaces like *Declarable*, just so they can be used in cache.xml. You only need implement the interface (e.g. *CacheListener*, *AsyncEventListener*, etc) that actually matters. In addition, SDG affords you the ability to use Java config as well as leverage Spring's other capabilities beyond what Geode offers by itself.
On Tue, May 17, 2016 at 7:35 AM, Ali Koyuncu <[email protected]> wrote: > Thank you, Mark. > > Ali Koyuncu > > On 17 May 2016, at 17:16, Mark Secrist <[email protected]> wrote: > > The general rule of thumb you need to follow is that ANY classes you > register directly in the cache.xml file (ex PartitionResolver, Event > Handlers, Functions, etc) absolutely MUST also implement Declarable whether > you intend to pass arguments to it or not. In general, I'd say it's a good > idea anyway because even if you register via gfsh command, this usually > turns into an entry in the cluster configuration cache.xml file, which is > maybe why it seemed to work initially but failed on startup. > > Mark > > On Tue, May 17, 2016 at 3:43 AM, Ali Koyuncu <[email protected]> > wrote: > >> Yes, helped. Thank you :) >> >> >> On Tue, May 17, 2016 at 12:31 PM, Shuvro Das <[email protected]> wrote: >> >>> Hi Ali, >>> >>> Just make sure you have implements Declarable along with >>> AsyncEventListener if you are declaring OperationAsyncEventListener in >>> you .xml file. >>> >>> public class MyAsyncEventListener implements >>> AsyncEventListener,Declarable >>> >>> >>> please let us know if this help attached a sample. >>> >>> Thanks and Regards, >>> Shuvro Das >>> >>> >>> On Tue, May 17, 2016 at 2:54 PM, Ali Koyuncu <[email protected]> >>> wrote: >>> >>>> I have implemented as shown in the sample code and only >>>> implemented AsyncEventListener. >>>> >>>> Do you have sample code, so I can modify my code? >>>> >>>> Thank you in advance. >>>> >>>> On Tue, May 17, 2016 at 12:16 PM, Shuvro Das <[email protected]> wrote: >>>> >>>>> Hi Ali, >>>>> >>>>> Have you implements Declarable on OperationAsyncEventListener? >>>>> >>>>> Thanks and Regards, >>>>> Shuvro Das >>>>> Technical Support Engineer >>>>> Pivotal. >>>>> TEL: +91 9860311283 (Mobile) >>>>> TEL: +91 20 662 48392(Work) >>>>> Working hours: 9:00 - 18:00 IST >>>>> How to upload artifacts : >>>>> https://support.pivotal.io/hc/en-us/articles/204369073 >>>>> How to escalate : >>>>> https://support.pivotal.io/hc/en-us/articles/203809556-Pivotal-How-do-I-escalate-an-existing-case-ref:_00D409hQR._50080cLnsM:ref >>>>> >>>>> On Tue, May 17, 2016 at 2:44 PM, Ali Koyuncu <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Yesterday I defined Asynch Queue Event and it worked well. Today, >>>>>> when I try to start the server, I got the following exception: >>>>>> >>>>>> >>>>>> gfsh>start server --name=Server1 >>>>>> --classpath=/home/company/product/simulator/lib/somelibrary-0.1.0.jar >>>>>> --include-system-classpath=true >>>>>> Starting a GemFire Server in /home/exodus/geode/vq/bin/1DataServer... >>>>>> The Cache Server process terminated unexpectedly with exit status 1. >>>>>> Please refer to the log file in /home/exodus/geode/vq/bin/1DataServer for >>>>>> full details. >>>>>> >>>>>> Exception in thread "main" >>>>>> com.gemstone.gemfire.cache.CacheXmlException: Class >>>>>> "com.acme.events.OperationAsyncEventListener" is not an instance of >>>>>> Declarable. >>>>>> at >>>>>> com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.createDeclarable(CacheXmlParser.java:2139) >>>>>> >>>>>> >>>>>> CLASSPATH variables are already defined as environment variables. >>>>>> >>>>>> How to solve it? >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Saygılarımla, with my warm regards, >>>>>> >>>>>> Ali KOYUNCU >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Saygılarımla, with my warm regards, >>>> >>>> Ali KOYUNCU >>>> >>> >>> >> >> >> -- >> >> Saygılarımla, with my warm regards, >> >> Ali KOYUNCU >> > > > > -- > > *Mark Secrist | Sr Manager, **Global Education Delivery* > > [email protected] > > 970.214.4567 Mobile > > *pivotal.io <http://www.pivotal.io/>* > > Follow Us: Twitter <http://www.twitter.com/pivotal> | LinkedIn > <http://www.linkedin.com/company/pivotalsoftware> | Facebook > <http://www.facebook.com/pivotalsoftware> | YouTube > <http://www.youtube.com/gopivotal> | Google+ > <https://plus.google.com/105320112436428794490> > > -- -John 503-504-8657 john.blum10101 (skype)
