InitialContext jndiContext = new InitialContext();
log.debug("Lookup StatelessSessionWithPooledSSL");
Object obj = jndiContext.lookup("StatelessSessionWithPooledSSL");
StatelessSessionHome home = (StatelessSessionHome)obj;
log.debug("Found StatelessSessionWithPooledSSL Home");
StatelessSession bean = home.create();
log.debug("Created StatelessSessionWithPooledSSL");
Principal p = bean.echoCaller("testClientCertSSLAccess");
log.debug("bean.echoCaller(testClientCertSSLAccess) = " + p);
try
{
bean.noop();
fail("Should not have been able to call noop");
}
catch(RemoteException e)
{
log.debug("noop failed as expected", e);
}
bean.remove();
// Validate the expected ssl session
assertTrue("CipherSuite = TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
cipherSuite.equals("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"));
X509Certificate localCert = (X509Certificate) localCerts[0];