use of org.apache.openejb.client.JNDIContext in project tomee by apache.
the class ClientContextCipheringTest method customCipher.
@Test
public void customCipher() throws NamingException {
final JNDIContext jndiContext = new JNDIContext();
final Hashtable<String, Object> env = new Hashtable<>();
env.put(Context.PROVIDER_URL, "cipher:Static3DES:" + String.valueOf(new StaticDESPasswordCipher().encrypt("ejbd://localhost:1234")));
jndiContext.getInitialContext(env);
Assert.assertEquals("ejbd://localhost:1234", jndiContext.getEnvironment().get(Context.PROVIDER_URL).toString());
}
Aggregations