Announcement Announcement Module
Collapse
No announcement yet.
How to get the trustmanager specified in the container configuration in java? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get the trustmanager specified in the container configuration in java?

    I am loading the trust manager in my application by explicitly specifying it using the class loader and passing the trust manager file name and the password as below.

    Code:
        private TrustManagerFactory factory= TrustManagerFactory.getInstance("X509");
        private KeyStore ks = KeyStore.getInstance("JKS");
        ks.load(getClass().getResourceAsStream("trustfile.keystore"),"password".toCharArray());
        factory.init(ks);


    Now the question is that, if i want to load the trust manager from what is configured in the container like JBOSS then how to achieve it? And I want to keep it independent of the application server , so it should work on either JBOSS/Webpshere AS/Weblogic etc.

    Is there a way to get this information?

    thanks
    Nohsib
    Last edited by Nohsib; Jun 14th, 2012, 10:22 AM.
Working...
X