Problem with Object Pool Manager - Websphere

This is a discussion on Problem with Object Pool Manager - Websphere ; My company use Websphere v6.0, and I have configured a Object Pool Manager in Resources > Object pool managers. it's JNDI name is cpools And in jsp, I using the following coding to access it, InitialContext ic = new InitialContext(); ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Problem with Object Pool Manager

  1. Problem with Object Pool Manager

    My company use Websphere v6.0, and I have configured a Object Pool Manager in Resources > Object pool managers. it's JNDI name is cpools

    And in jsp, I using the following coding to access it,
    InitialContext ic = new InitialContext();
    ObjectPoolManager opm = (ObjectPoolManager) ic.lookup("java:comp/env/cpools");

    and got the error as bellow. Did anyone use Object Pool Manager before, can tell me how to solve this problem ?

    javax.naming.NameNotFoundException: Name "comp/env/cpools" not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal( NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpac e.java(Compiled Code)) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(Ur lContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:201) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:142) at javax.naming.InitialContext.lookup(InitialContext. java(Compiled Code)) at com.ibm._jsp._Pool._jspService(_Pool.java:79) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJsp Base.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet .java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java(Compiled Code)) at com.filenet.ae.toolkit.server.servlet.filter.Threa dLocalCleanupFilter.doFilter(ThreadLocalCleanupFil ter.java:40) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWrapper.java:142) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.java(Compiled Code)) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java(Compiled Code)) at com.ibm.wsspi.webcontainer.servlet.GenericServletW rapper.handleRequest(GenericServletWrapper.java(In lined Compiled Code)) at com.ibm.ws.jsp.webcontainerext.JSPExtensionServlet Wrapper.handleRequest(JSPExtensionServletWrapper.j ava(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:2905) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:220) at com.ibm.ws.webcontainer.VirtualHost.handleRequest( VirtualHost.java:204) at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:1829) at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:84) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:469) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:408) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:286) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminaters(NewConnectionIniti alReadCallback.java:201) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:103) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.run(WorkQueueManager.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava(Compiled Code))

  2. Re: Problem with Object Pool Manager

    Hi, Your context is wrong to lookup the pool. Change the line to:
    ObjectPoolManager opm = (ObjectPoolManager) ic.lookup("cpools");

    Also, you need to make sure that you have the service running when you start the server:
    Servers > Application Servers > > Container Services > Object pool services. Check the "enable service at Startup" checkbox, save and restart the server.

    Brian

+ Reply to Thread