Sybase Connection logs in as guest in case of Connection communication failurehttps://www.eclipse.org/forums/index.php/mv/msg/242343/729322/#msg_729322
I am trying to test the behavior of DelayBetweenConnectionAttempts on a Sybase Connection communication behavior and running into problems. From what I have experienced so far, when EclipseLink recovers from the communication link failure, Sybase Connection gets logged in as user "guest" as opposed to the original input user (which has the table read/write access) thus resulting in "SybSQLException Table not found" error.

While the program sleeps, stop the Sybase services and restart the service. In the meantime, the program wakes up from sleep, determines a ConnectionException and kicks in the Connection retry mechsnism using the DelayBetweenConnectionAttempts variable. After a few attemps, EclipseLink recovers but almost 50% of the times, connects to the database as user guest thus resulting in a SybSQLException stating table not found.

As you could see from the log file above, the connection recovers but as user "guest" thus resulting in a failure. I even tried closing the entity manager and that did not work. Later, I even tried to close the connection as well but that did not help either.

It appears that Sybase allows a connection to be successful even when the user specifies an invalid database like:

In this case, Sybase logins in an user guest going against the master database but gives SQL warning on the same. From what I can see, EclipseLink should catch the SQL warnings and fail the connection.