1. Cayenne
  2. CAY-801

Re-encode DB password on connection failure


    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: Short term future
    • Component/s: Core Library
    • Labels:
    • Environment:


      If Cayenne tries to do a DB connection and fails (something like this):

      org.objectstyle.cayenne.access.QueryLogger - — will run 1 query.
      org.objectstyle.cayenne.access.QueryLogger - Opening connection: jdbc:sybase:Tds:host:port/db
      Login: xxxxx
      Password: *******
      org.objectstyle.cayenne.access.QueryLogger - *** Connecting: FAILURE.
      java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to
      this exception for the reason(s).
      at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(
      at com.sybase.jdbc2.tds.Tds.processLoginAckToken(
      at com.sybase.jdbc2.tds.Tds.doLogin(
      at com.sybase.jdbc2.tds.Tds.login(
      at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(
      at com.sybase.jdbc2.jdbc.SybConnection.regularConnect(

      When Cayenne tries to reconnect, it should read and encode the DB password through the encoders again. (Although this probably only makes sense if not stored in the model.) The above example occurred when the DB password changed, and even though the password was stored outside the model (in an external file), Cayenne has the password cached and will not re-read it to obtain the new password.

      If Cayenne can re-read the password, then DB password changes can be done without bringing an application server down or doing migrations. (This particular application was running from a WAR file.)


        Michael Gentry created issue -
        Ari Maniatis made changes -
        Field Original Value New Value
        Fix Version/s 3.0 [ 10091 ]
        Fix Version/s Short term future [ 10125 ]
        Henri Yandell made changes -
        Project Import Sat Mar 21 00:51:04 PDT 2009 [ 1237621864637 ]
        Ari Maniatis made changes -
        Workflow jira [ 12456980 ] Cayenne workflow [ 12487619 ]


          • Assignee:
            Michael Gentry
            Michael Gentry
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: