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

ConnectionEvent doesn't always fire #155

Open
SGI495 opened this issue Jan 24, 2024 · 0 comments
Open

ConnectionEvent doesn't always fire #155

SGI495 opened this issue Jan 24, 2024 · 0 comments

Comments

@SGI495
Copy link

SGI495 commented Jan 24, 2024

I'm relying on ConnectionListener's ConnectionEvent to start commitment control when an AS400 object connects to the COMMAND service to run a ProgramCall.

This works fine under some circumstances, including when

  • the ProgramCall object is passed an AS400 object retrieved from the AS400ConnectionPool without specifying a service, using getSecureConnection(host, user, password)
  • retrieving an AS400 object from the AS400ConnectionPool without specifying a service and then calling connectService(AS400.COMMAND) on that AS400 object

However, in some scenarios the event does not get fired, including when

  • the ProgramCall object is passed an AS400 object retrieved from the AS400ConnectionPool when specifying a service, using getSecureConnection(host, user, password, AS400.COMMAND)
  • calling the fill method on the AS400ConnectionPool object

Because it takes quite some time for the pool to allocate a new job, I would like to pre-fill the connection pool with some connections that are ready to use, but I'm unable to since the ConnectionEvent is not fired and commitment control is not started.

I'm using version 20.0.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant