2013-06-13 93 views
0
<target name="createpool"> 
    <wlconfig username="${username}" password="${password}" url="${adminURL}"> 
    <query domain="${domainName}" type="Server" name="${targetserver}" property="x" /> 
     <create type="JDBCConnectionPool" name="${JDBCConnectionPool.name}" > 
      <set attribute="CapacityIncrement" value="1"/> 
      <set attribute="DriverName" value="${database.driver}"/> 
      <set attribute="InitialCapacity" value="0"/> 
      <set attribute="MaxCapacity" value="10"/> 
      <set attribute="Password" value="${database.password}"/> 
      <set attribute="Properties" value="user=${database.user}"/> 
      <set attribute="RefreshMinutes" value="0"/> 
      <set attribute="ShrinkPeriodMinutes" value="15"/> 
      <set attribute="ShrinkingEnabled" value="true"/> 
      <set attribute="TestConnectionsOnRelease" value="false"/> 
      <set attribute="TestConnectionsOnReserve" value="true"/> 
      <set attribute="TestTableName" value="SYSTABLES"/> 
      <set attribute="URL" value="${database.url}"/> 
      <set attribute="Targets" value="${x}" /> 
     </create> 
     <create type="JDBCDataSource" name="${JDBCDataSource.name}" > 
      <set attribute="JNDIName" value="${JNDI.name}"/> 
      <set attribute="PoolName" value="${Pool.name}"/> 
      <set attribute="Targets" value="${targetserver}" /> 
     </create> 
    </wlconfig> 
</target> 

請提供解決方案來解決這個問題,因爲這個運行Ant腳本它讓我無法創建的MBean後:無法創建提供商JDBCDataSource。無法創建的MBean:無法創建提供商JDBCDataSource

+0

是否有錯誤消息的詳細信息? (你可以使用'-verbose'選項運行ant,使其變得冗長)。您是否按照以下建議設置了環境:http://docs.oracle.com/cd/E14571_01/web.1111/e13706/ant_tasks.htm#WLPRG142? – ben75

回答

0
<query domain="${domainName}" type="Server" name="${targetserver}" property="targetserv"/> 

    <set attribute="Targets" value="${targetserv}" /> 

做這些改變它工作得很好