Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBEventManager thread lost [JDBC122] #162

Closed
firebird-automations opened this issue Jul 28, 2008 · 9 comments
Closed

FBEventManager thread lost [JDBC122] #162

firebird-automations opened this issue Jul 28, 2008 · 9 comments

Comments

@firebird-automations
Copy link

Submitted by: Eduardo Rodrigues Gomes (eduardorgomes)

Assigned to: Roman Rokytskyy (rrokytskyy)

When I use FBEventManager in Asynchronous mode and use the disconnect method the thread that use EventDispatcher Runnable never stop, because in the thread stay in 445 line forever.

Commits: 5cee9e1

@firebird-automations
Copy link
Author

Modified by: Eduardo Rodrigues Gomes (eduardorgomes)

Version: Jaybird 2.1.5 [ 10284 ]

Version: Jaybird 2.1.4 [ 10283 ]

Version: Jaybird 2.1.3 [ 10252 ]

Version: Jaybird 2.1 [ 10050 ]

Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Commented by: Eduardo Rodrigues Gomes (eduardorgomes)

Somebody can help-me?

@firebird-automations
Copy link
Author

Modified by: Eduardo Rodrigues Gomes (eduardorgomes)

priority: Blocker [ 1 ] => Critical [ 2 ]

Component: Events [ 10056 ]

Component: JDBC driver [ 10053 ] =>

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Commented by: Roman Rokytskyy (rrokytskyy)

At the moment the dispatcher will stay alive after disconnect until some event comes from the database.

You could change the code:

                while \(eventQueue\.isEmpty\(\)\)\{
                    try \{
                        eventQueue\.wait\(\);
                    \} catch \(InterruptedException ie\)\{ \}
                \}

to

                while \(eventQueue\.isEmpty\(\) && running\)\{
                    try \{
                        eventQueue\.wait\(1000\);
                    \} catch \(InterruptedException ie\)\{ \}
                \}

However, this is not a critical bug, since no data being corrupted, but rather an improvement request and will be released with Jaybird 2.2.

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

priority: Critical [ 2 ] => Minor [ 4 ]

issuetype: Bug [ 1 ] => Improvement [ 4 ]

@firebird-automations
Copy link
Author

Commented by: Eduardo Rodrigues Gomes (eduardorgomes)

Thank you Roman,but I tried changing my code to this and didn't work.
while (eventQueue.isEmpty() && running){
try {
eventQueue.wait(1000);
} catch (InterruptedException ie){ }
}

You have any other idea?

@firebird-automations
Copy link
Author

Commented by: Roman Rokytskyy (rrokytskyy)

I just tested the code with the version in HEAD - it works. Can it be that you have forgotten to add "&& running" in the while condition?

Anyway, issue fixed in HEAD and will appear in Jaybird 2.2

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

status: Open [ 1 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment