5 replies
by ravi303
It is necessary to create a pool first in the weblogic properties file for example.....
weblogic.jdbc.connectionPool.myPool= url=jdbc:weblogic:mssqlserver4, driver=weblogic.jdbc.mssqlserver4.Driver, loginDelaySecs=1, initialCapacity=1, maxCapacity=2, capacityIncrement=1, allowShrinking=true, shrinkPeriodMins=15, refreshMinutes=10, testTable=someCreatedTable, props=user=sa;password=;server=Odyssey@RAVIN
this creates a pool say'myPool'
now we get the connection using this pool by
the following code.
Properties props = new Properties();
props.put("user", "system");
props.put("password", "yourpass");
Driver myDriver = (Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection conn = myDriver.connect("jdbc:weblogic:pool:myPool", props);
and now we can return 'conn'
which is the connection.
by vvasant
by ravi303
It is necessary to create a pool first in the weblogic properties file for example.....
weblogic.jdbc.connectionPool.myPool= url=jdbc:weblogic:mssqlserver4, driver=weblogic.jdbc.mssqlserver4.Driver, loginDelaySecs=1, initialCapacity=1, maxCapacity=2, capacityIncrement=1, allowShrinking=true, shrinkPeriodMins=15, refreshMinutes=10, testTable=someCreatedTable, props=user=sa;password=;server=Odyssey@RAVIN
this creates a pool say'myPool'
now we get the connection using this pool by
the following code.
Properties props = new Properties();
props.put("user", "system");
props.put("password", "yourpass");
Driver myDriver = (Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection conn = myDriver.connect("jdbc:weblogic:pool:myPool", props);
and now we can return 'conn'
which is the connection.
by vvasant
by vvasant
This discussion is closed to new replies.
Trending IT Employment posts
Sort by Trending