Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

3384

May 28th, 2009 01:00

FPMonitor.close() hangs application

Hi,

we use latest version of Centera SDK with C* 4.x and Java 6. We connect us to the Centera and initiate an register4AllEvents(). When we call FPMonitor.close() this function never returns and hangs our whole application (not the system).

Does anyone know why or if there is another way to close the connection to the Centera without calling FPMonitor.close()?

Greetings Marco

417 Posts

May 29th, 2009 06:00

I believe that you should be calling eref.close() before fpmon.close(). The eref (FPEventRef object) will be using fpmon (the FPMonitorRef object), so logically you should close eref before attemtping to close fpmon.

This may not solve your problem but it is certainly worth trying.

417 Posts

May 29th, 2009 05:00

Prior to closing the monitor connection, have you closed the EventCallbackRef that you received when your registered a stream for the events?

14 Posts

May 29th, 2009 06:00

ok, i will try this and then come baqck with the result. I think documentation says close fpom before closing the callback reference and underlying streams.

14 Posts

May 29th, 2009 06:00

No .

I have this:

private FPMonitor fpmon;

private FPMonitor.FPEventRef eref;

private BufferedOutputStream fsref;

register4allEvents is implemented like this:

        if (fpmon != null && fsref != null){
            eref = fpmon.registerForAllEvents(fsref);
            if (eref == null){
               // Here i do some error handling and logging

      .....

close is done as follows:

    public void close() throws FPLibraryException {
        fpmon.close();
        fpmon = null;
        eref = null;
    }

If i left out fpmon.close() all works but if i want to do a clean close auf my connection i do not get any farther than fpmon.close() call.

14 Posts

May 29th, 2009 07:00

Graham,

thanks for your help. I've modified my script to call eref.close() before fpmon.close() and now it works.

No Events found!

Top