This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Portal Infranet Connection pooling

 
benjamin briones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i implement connection pooling using com.portal.bas.PPooledConnectionClientServices?
It seems like the the connection is no spawned everytime i get a context to execute a opcode.

code below is the one i used for getting the context.

package ca.xm.pooling;

import java.net.URL;
import java.rmi.RemoteException;
import com.portal.bas.PCachedContext;
import com.portal.bas.PPooledConnectionClientServices;
import com.portal.web.ServletUtil;

public class ConnectionPool {
private static PPooledConnectionClientServices mPCS = null;

public ConnectionPool(URL url) {
mPCS = new PPooledConnectionClientServices();
mPCS.setPropertyURL(url);
Object connectionKey = ServletUtil.logIn(mPCS);
}

public PCachedContext getConnection() throws RemoteException {
PCachedContext ctx = mPCS.getAppController().getConnection();
return ctx;
}

public void closeContext(PCachedContext ctx) {
mPCS.releaseContext(ctx);
}
}

can someone help me on this...it would be greatly appreciated...
thanks.
 
Campbell Ritchie
Sheriff
Posts: 51332
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Your question is too difficult for "beginning" so I shall move it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic