Breaking News
Home / ServerSide / Weblogic / How to create Weblogic Server Pool via Ant Script?

How to create Weblogic Server Pool via Ant Script?

Weblogic Command to Bounce PoolWeblogic server support database connection pool. These pools can be managed remotely via Admin tool. The following ANT scripts shows how to create or delete a pool using wlconfig task


<project name=”jdbcPoolDEMO” default=”delete-pool”>

<target name=”create-pool”>
<wlconfig url=”t3://localhost:7001″ username=”${username}” password=”${password}”>
<query domain=”medrec” type=”Server” name=”MedRecServer” property=”medrecserver”/>

    <create type=”JDBCConnectionPool” name=”demoPool”  property=”medrecpool”>   
        <set attribute=”CapacityIncrement” value=”1″/>         
        <set attribute=”DriverName” value=”com.pointbase.jdbc.jdbcUniversalDriver”/> 
        <set attribute=”InitialCapacity” value=”4″/>
        <set attribute=”MaxCapacity” value=”15″/>       
        <set attribute=”Password” value=”MedRec”/>   
        <set attribute=”Properties” value=”user=MedRec”/>  
        <set attribute=”RefreshMinutes” value=”0″/>       
        <set attribute=”ShrinkPeriodMinutes” value=”10″/>      
        <set attribute=”ShrinkingEnabled” value=”true”/>  
        <set attribute=”TestConnectionsOnRelease” value=”false”/>      
        <set attribute=”TestConnectionsOnReserve” value=”false”/>   
            <set attribute=”URL” value=”jdbc:pointbase:server://localhost:9092/demo”/> 
        <set attribute=”Targets” value=”${medrecserver}”/>
<query domain=”medrec” type=”JDBCConnectionPool” property=”poolName”/>
<echo> Pool created=${poolName}</echo>


<target name=”delete-pool” depends=”create-pool”>
    <wlconfig url=”t3://localhost:7001″ username=”${username}” password=”${password}”>       
        <delete mbean=”${poolName}”>


The above example uses PointBase as the database, however you can change it to use Oracle or any other database. Also the query ANT task is used to verify whether the pool has been created or not.


Check Also

Error – Remote side declared peer gone on this JVM

Issue When trying to sent a JMS message to a remote Weblogic Application Server the …

Advertisment ad adsense adlogger