Currently for Cloud spanner java interfaces, the credential is contained in the DatabaseClient when the DatabaseClient is created. There is no way to have a databaseClient without credentials and call the method with credential context.
So if we are calling Cloud spanner via some service protocols, like gRPC, the gRPC server will have to create the databaseClient again and again whenever a new method call comes since when the server starts, it doesn't know the client's credential.
Currently for Cloud spanner java interfaces, the credential is contained in the DatabaseClient when the DatabaseClient is created. There is no way to have a databaseClient without credentials and call the method with credential context.
So if we are calling Cloud spanner via some service protocols, like gRPC, the gRPC server will have to create the databaseClient again and again whenever a new method call comes since when the server starts, it doesn't know the client's credential.