Skip to content

Instantly share code, notes, and snippets.

View dimovelev's full-sized avatar

Dimo Velev dimovelev

  • Munich, Germany
View GitHub Profile
@dimovelev
dimovelev / wls_jndi_variant1.java
Last active February 14, 2016 11:55
WebLogic JNDI - Not Closing The Initial Context
@WebService
public class FacadeJaxWs implements FacadeWebService {
@EJB(lookup = "FrontendEjb")
protected FrontendEjbHome frontendEjbHome;
public void updateCustomer() {
Properties envBackend = new Properties();
envBackend.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
envBackend.put(Context.PROVIDER_URL, "t3://backend:7001");
envBackend.put(Context.SECURITY_PRINCIPAL, "backend_user");
@WebService
public class FacadeJaxWs implements FacadeWebService {
@EJB(lookup = "FrontendEjb")
protected FrontendEjbHome frontendEjbHome;
public void updateCustomer() {
Properties envBackend = new Properties();
envBackend.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
envBackend.put(Context.PROVIDER_URL, "t3://backend:7001");
envBackend.put(Context.SECURITY_PRINCIPAL, "backend_user");
@WebService
public class FacadeJaxWs implements FacadeWebService {
@EJB(lookup = "FrontendEjb")
protected FrontendEjbHome frontendEjbHome;
public void updateCustomer() {
Context ctxBackend = null;
try {
Properties envBackend = new Properties();
envBackend.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");