Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] SshSessionFactory configuration

Yes, it looks like that works fine. Thanks!

It'd probably still be nice to mark that SshSessionFactory field volatile for other folks who *do* use that; should I submit a patch?

On 04/04/2014 11:19 PM, Roberto Tyley wrote:
If you're using the JGit Command API classes, is
TransportConfigCallback  sufficient for your needs?

http://download.eclipse.org/jgit/docs/jgit-3.1.0.201310021548-r/apidocs/org/eclipse/jgit/api/TransportConfigCallback.html

For instance, if a client needs to replace the SshSessionFactorys on any
SSHTransport used, they can set the TransportConfigCallback on the JGit
API command - once the transport has been created by the command, the
callback will be invoked and passed the transport instance, which the
client can then inspect and configure as necessary.

On 5 Apr 2014 04:13, "Marshall Pierce" <marshall@xxxxxxxxxxx
<mailto:marshall@xxxxxxxxxxx>> wrote:

    Hi folks,
    Unless I'm missing something, the only way to specify the
    SshSessionFactory to use is to SshSessionFactory.setInstance(__).
    This is static, which is a little unfortunate. (Also, the underlying
    static field isn't volatile, so writes to it have no cross-thread
    memory visibility guarantees.)

    I'd like to make it configurable on a more granular level. It looks
    like the TransportCommand subclasses are a good place to be able to
    configure this. Alternately, perhaps it would be nice to specify it
    on the Git instance. (Or, maybe both.) Do people have suggestions on
    an approach to making this configurable?

    -Marshall
    _________________________________________________
    jgit-dev mailing list
    jgit-dev@xxxxxxxxxxx <mailto:jgit-dev@xxxxxxxxxxx>
    https://dev.eclipse.org/__mailman/listinfo/jgit-dev
    <https://dev.eclipse.org/mailman/listinfo/jgit-dev>




Back to the top