• Post Reply Bookmark Topic Watch Topic
  • New Topic

Portal Infranet Connection pooling  RSS feed

 
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: 54058
130
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!