Hi,
I created a connection pool under weblogic 5.1 server as below.
weblogic.jdbc.connectionPool.bscsPool=\
url=jdbc:weblogic:oracle:IPAdd:Port,\
driver=weblogic.jdbc.oci.Driver,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=1,\
props=user=sysadm;password=sysadm;server=ServerName
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.bscsPool=bscsPool
weblogic.allow.reserve.weblogic.jdbc.connectionPool.bscsPool=everyone
weblogic.allow.reset.weblogic.jdbc.connectionPool.oraclePool=everyone
weblogic.allow.shrink.weblogic.jdbc.connectionPool.oraclePool=everyone
The connection pool is created. When I am trying to access it from my JSP as
below.
try
{
Context ctx = null;
System.setProperty("java.naming.factory.initial",
"weblogic.jndi.WLInitialContextFactory");
System.setProperty("java.naming.provider.url",
"t3://127.0.0.1:7001");
ctx = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup
("bscsPool");
conn=ds.getConnection();
stmt = conn.createStatement();
System.out.println(conn);
}
catch(Exception e)
{
out.println("Could not connect to the database"+e);
}
I am getting the error as
java.security.AccessControlException: access denied
(java.util.PropertyPermission java.naming.factory.initial write)
Should I set some permission for the JSPs?
Thank You
T R Yogeeta
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets