Yes, I see it is the case. Reggie outputs: INFO: started Reggie: 2b200cb6-00c5-490d-b565-8f4478d8d1e5, [ nonsecure.hello.example.jini.sun.com], jini://badger2.thesett.com/ Got RemoteEvent: com.sun.jini.reggie.RegistrarEvent[serviceID=61e5715d-fd9b-4f1c-8d75-4e217fda5ab1, transition=TRANSITION_MATCH_NOMATCH, source=com.sun.jini.reggie.RegistrarProxy[registrar=2b200cb6-00c5-490d-b565-8f4478d8d1e5 RegistrarImpl_Stub[UnicastRef2 [liveRef: [endpoint:[127.0.1.1:50713](local),objID:[589eac25:12cabe249ee:-7fff, 804964581163571509]]]]], eventID=0, seqNum=1, handback=null]
I implemented a very simple RemoteEventListener, that just prints out the event. I see that it does indeed get sent to the registry, and invoked there. So that's not really what I'm after, I want the management process that makes the call to be notified, the one that is notified. So I'll start looking at ServiceDiscoveryManager and LookupCache. Rupert On 3 December 2010 10:56, Rupert Smith <rupertlssm...@googlemail.com> wrote: > Hi I added: > > -Djava.rmi.server.codebase=" > http://localhost:8080/genzero-mgt-1.2-beta2-SNAPSHOT.jar > http://localhost:8080/genzero-api-1.2-beta2-SNAPSHOT.jar" > > to the command line, which helped, but now I get another error about the > serializability of MBeanJiniListener. > Caused by: java.lang.RuntimeException: > java.security.AccessControlException: access denied > (java.lang.RuntimePermission accessDeclaredMembers) > at > java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.<init>(AtomicReferenceFieldUpdater.java:217) > at > java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdater.java:93) > at > com.rapidaddition.util.concurrent.StartStopLifecycleBase.<clinit>(StartStopLifecycleBase.java:34) > > The offending line is: > > private static final AtomicReferenceFieldUpdater<StartStopLifecycleBase, > RunState> RUN_STATE_UPDATER = > > AtomicReferenceFieldUpdater.newUpdater(StartStopLifecycleBase.class, > RunState.class, "runState"); > > Maybe, I just need to make the runState field transient. > > However, it seems a bit strange to me that MBeanJiniListener needs to be > serialised at all. The call: > > eventRegistration = > serviceRegistrar.notify(template, > ServiceRegistrar.TRANSITION_MATCH_NOMATCH, this, null, Long.MAX_VALUE); > > needs to call back on a RemoteEventListener, and I would have thought that > the registry would just need that interface, in order to call it, and not > the whole implementation serialized. Or is it that the RemoteEventListener > implementations gets send to the registry, and actually invoked on that > process, and not the original calling process? > On 2 December 2010 18:49, Dennis Reedy <dennis.re...@gmail.com> wrote: > >> >> On Dec 2, 2010, at 122PM, Rupert Smith wrote: >> >> > On 2 December 2010 18:05, Dennis Reedy <dennis.re...@gmail.com> wrote: >> > >> >> I assume the com.rapidaddition.fix.management.jini.MBeanJiniListener >> class >> >> is in genzero-api-1.2-beta2-SNAPSHOT.jar right? >> >> >> > >> > Its acutally in genzero-mgt-1.2-beta2-SNAPSHOT.jar, but I made all my >> jars >> > available just in case there were other things it needed in there too. >> > >> >> Are you setting the codebase to your service when you start it? Can we >> see >> > the command line when you start your service? >> > >> > I haven't set up a 'codebase' for the service. I didn't know I needed >> to, so >> > maybe thats where I'm going wrong. >> >> Yes, I think it may be. When you start your service try setting the >> -Djava.rmi.server.codebase=<codeserver:port>/genzero-mgt-1.2-beta2-SNAPSHOT.jar >> >> This will allow services (like reggie) that do not have the classes they >> need in their classpath (like >> com.rapidaddition.fix.management.jini.MBeanJiniListener) to dynamically load >> them. If you can, try setting that system property and report back what >> happens. >> >> Additonally, Tom's recommendation to use the ServiceDiscoveryManager and >> LookupCache are right on. >> >> HTH >> >> Dennis > > >