Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-786

slices documentation needs to mention requirement for global username/password

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0-M2
    • None
    • slice
    • None

    Description

      Reading the Slices documentation, it looks like you should be able to configure a UserName/Password for each slice, but in reality it doesn't support that. It only supports one UserName/Password globally:

      So you can't do:

      > openjpa.slice.Slice1.ConnectionPassword=########
      > openjpa.slice.Slice1.ConnectionUserName=dbuser_protrade
      > openjpa.slice.Slice2.ConnectionPassword=########
      > openjpa.slice.Slice2.ConnectionUserName=dbuser_protrade

      You can only do:

      > openjpa.slice.ConnectionPassword=########
      > openjpa.slice.ConnectionUserName=dbuser_protrade

      So.. it looks like slices does not support a username/password per slice. It requires a global username/password. And the documentation doesn't make it clear at all. You might want to review that section again. And make it really clear that you HAVE to define global username/password.

      Fernando Padilla wrote:
      > So starting to walk through all the logs, it looks like username and password are null?? The log is below, saying mysql is not getting a username/password. But I am properly setting the configuration for each slice:
      >
      > openjpa.slice.Slice1.ConnectionPassword=########
      > openjpa.slice.Slice1.ConnectionUserName=dbuser_protrade
      >
      >
      > But combing through the logs, it looks like the properties that it runs with (it gets logged by openjpa for some reason) do not contain proper database information. If you look for "Properties:", you'll see two of them. The first one loads up a normal non-slice database. The second loads up the slices. The Properties for the first one has ConnectionURL, ConnectionUserName, ConnectionPassword, while the one for slices does not.
      >
      > So I'm close to figuring out what's wrong.

      Attachments

        Activity

          People

            ppoddar@apache.org Pinaki Poddar
            fern Fernando Padilla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: