All Packages This Package
java.lang.Object | +----examples.jdbc.datasource.simplesql
This examples requires a running WebLogic Server and that you add the following entries to the weblogic.properties file.
To run this example:
weblogic.jdbc.DataSource.myNonJtsDataSource=myConnectionPool
weblogic.jdbc.connectionPool.myConnectionPool=\ url=jdbc:weblogic:oracle,\ driver=weblogic.jdbc.oci.Driver,\ loginDelaySecs=1,\ initialCapacity=4,\ maxCapacity=10,\ capacityIncrement=2,\ allowShrinking=true,\ shrinkPeriodMins=15,\ refreshMinutes=10,\ testTable=dual,\ allow=guest,\ props=user=SCOTT;password=tiger;server=DEMO
Note that the line "allow=guest" permits guest access to the connection pool. In a production environment, you should change this to match your security needs
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");substituting the name of the machine hosting your WebLogic Server for localhost and the port number at which the WebLogic Server is listening for connection requests for 7001
$ javac -d %CLIENT_CLASSES% simplesql.java
$ java examples.jdbc.datasource.simplesql
public simplesql()
public static void main(String argv[]) throws Exception
All Packages This Package g