Class: com.sybase.djc.ant.SetPropertiesTask (Set Properties Task) EAServer 6.3 Help
Description This task is used to set properties for a component, package or entity type.
Configuration There are three kinds of property configuration:
  1. Configuration of CORBA components and CORBA packages. This defines properties that are used as input to the jaguar-compiler command-line tool. The jaguar-compiler tool generates and deploys an EJB-JAR wrapper for a CORBA package.

  2. Configuration of component and package properties for deployed Java Enterprise Edition modules (e.g. EJB modules, web applications) for which code generation is required. When a module is deployed (e.g. EJB-JAR named example.jar), an Ant configuration script config/ejbjar-example.xml is automatically generated. This can be edited directly (but changes will be lost on redeployment). Preferably, the user can create a user-override configuration script config/ejbjar-example-user.xml which can selectively override (using merge semantics) the property settings of the automatically generated script. Click here for an example user override script.

  3. Configuration of named instances of builtin entity types (e.g. application servers, data sources) for which no code generation is required.

Property configuration requires specification of "Task Parameters" and "Property Types":

  • "Task Parameters" are used to specify which component, package or entity the properties will be set for.

  • "Property Types" are used to specify the actual property values.

Property values are stored in Java properties files in subdirectories of the Repository/Package, Repository/Component and Repository/Instance directories in your server installation.

Task Parameters administeredObject, administeredObjectType, applicationClient, applicationServer, classLoader, cluster, clusterBranch, clusterPartition, codeSet, component, connectionFactory, connectionFactoryType, dataSource, databaseType, distributedCache, ejbProvider, exportConfiguration, httpContext, jmsConnectionFactory, jmsProvider, mailSession, merge, messageListener, messageListenerType, messageQueue, messageTopic, package, queueConnectionFactory, resourceAdapter, restService, scheduledTask, securityDomain, securityProfile, serverBranch, serviceComponent, socketListener, storedProcedure, threadMonitor, topicConnectionFactory, transactionBatch
Property Types accessControl, activationConfig, addVersionField, asynchronous, automaticFailover, bind, csiv2, cacheResponse, cacheResult, classLoader, clusterPartition, configProperty, copyValues, denyAccess, distributable, ejbPassivate, ejbRemove, instancePool, logExceptions, map, messageListener, performanceMonitor, permitAccess, persistentField, persistentObject, profilePublicMethods, property, queryMethod, requestLog, responseLog, runAs, start, synchronized, threadMonitor, tracePublicMethods, transaction

Parameter: administeredObject (JCA Administered Object)
Description Name of JCA Administered Object for which properties will be set. Example:
<project name="MyAdministeredObject">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties administeredObject="MyAdministeredObject">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: administeredObjectType (JCA Administered Object Type)
Description Name of JCA Administered Object Type for which properties will be set. Example:
<project name="MyAdministeredObjectType">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties administeredObjectType="MyAdministeredObjectType">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: applicationClient (Application Client)
Description Name of Application Client for which properties will be set. Example:
<project name="MyApplicationClient">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties applicationClient="MyApplicationClient">
      <property name="mainClass" value="com.example.MyAppClient"/>
    </setProperties>
  </target>
</project>

Parameter: applicationServer (Application Server)
Description Name of Application Server for which properties will be set. Example:
<project name="MyApplicationServer">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties applicationServer="MyApplicationServer">
      <property name="startModules" value="ejbjar-example1,webapp-example2"/>
    </setProperties>
  </target>
</project>

Parameter: classLoader (Class Loader)
Description Name of Class Loader for which properties will be set. Example:
<project name="MyClassLoader">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties classLoader="MyClassLoader">
      <property name="classPath" value="~/deploy/ejbjars/mymodule"/>
    </setProperties>
  </target>
</project>

Parameter: cluster (Cluster)
Description Name of Cluster for which properties will be set. Example:
<project name="MyCluster">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties cluster="MyCluster">
      <property name="servers" value="server1,server2"/>
    </setProperties>
  </target>
</project>

Parameter: clusterBranch (Cluster Branch)
Description Specifies that the defined properties should be in a private Repository branch accessible only to the specified server. Example:
<project name="my-data-sources">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties dataSource="default" clusterBranch="cluster1">
      <property name="databaseType" value="Sybase_ASA"/>
      <property name="serverName" value="db-host1"/>
      <property name="portNumber" value="2638"/>
    </setProperties>
    <setProperties dataSource="default" clusterBranch="cluster2">
      <property name="databaseType" value="Sybase_ASE"/>
      <property name="serverName" value="db-host2"/>
      <property name="portNumber" value="5000"/>
    </setProperties>
  </target>
</project>
        

Parameter: clusterPartition (Cluster Partition)
Description Name of Cluster Partition for which properties will be set. Example:
<project name="MyClusterPartition">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties clusterPartition="MyClusterPartition">
      <property name="preferredServers" value="server1,server2"/>
      <property name="alternateServers" value="server3"/>
    </setProperties>
  </target>
</project>

Parameter: codeSet (Code Set)
Description Name of Code Set for which properties will be set. Example:
<project name="MyCodeSet">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties codeSet="MyCodeSet">
      <property name="id" value="9999"/>
    </setProperties>
  </target>
</project>

Parameter: component (Component)
Description Name of component for which properties will be set. The name should be in one of the following forms:
  • ejb.components.mypackage.MyComp... - for a deployed EJB component.
  • web.components.mypackage.MyComp... - for a deployed web component.
  • MyPackage/MyComp - for a CORBA component.

Parameter: connectionFactory (JCA Connection Factory)
Description Name of JCA Connection Factory for which properties will be set. Example:
<project name="MyConnectionFactory">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties connectionFactory="MyConnectionFactory">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: connectionFactoryType (JCA Connection Factory Type)
Description Name of JCA Connection Factory Type for which properties will be set. Example:
<project name="MyConnectionFactoryType">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties connectionFactoryType="MyConnectionFactoryType">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: dataSource (Data Source)
Description Name of Data Source for which properties will be set. Example:
<project name="MyDataSource">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties dataSource="MyDataSource">
      <property name="databaseType" value="Sybase_ASE"/>
      <property name="serverName" value="db-host"/>
      <property name="portNumber" value="5000"/>
      <property name="maxPoolSize" value="50"/>
    </setProperties>
  </target>
</project>

Parameter: databaseType (Database Type)
Description Name of Database Type for which properties will be set. Example:
<project name="MyDatabaseType">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties databaseType="MyDatabaseType">
      <property name="dataSourceClass" value="com.example.jdbc.DataSourceImpl"/>
    </setProperties>
  </target>
</project>

Parameter: distributedCache (Distributed Cache)
Description Name of Distributed Cache for which properties will be set. Example:
<project name="MyDistributedCache">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties distributedCache="MyDistributedCache">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: ejbProvider (EJB Provider)
Description Name of EJB Provider for which properties will be set. Example:
<project name="MyEjbProvider">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties ejbProvider="MyEjbProvider">
      <property name="java.naming.provider.url" value="iiop://myhost:2000"/>
    </setProperties>
  </target>
</project>

Parameter: exportConfiguration (Export Configuration)
Description Name of Export Configuration for which properties will be set. Example:
<project name="MyExportConfiguration">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties exportConfiguration="MyExportConfiguration">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: httpContext (HTTP Context)
Description Name of HTTP Context for which properties will be set. Example:
<project name="MyHttpContext">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties httpContext="MyHttpContext">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: jmsConnectionFactory (JMS Connection Factory)
Description Name of JMS Connection Factory for which properties will be set. Example:
<project name="MyJmsConnectionFactory">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties jmsConnectionFactory="MyJmsConnectionFactory">
      <property name="receiveBatchSize" value="100"/>
    </setProperties>
  </target>
</project>

Parameter: jmsProvider (JMS Provider)
Description Name of JMS Provider for which properties will be set. Example:
<project name="MyJmsProvider">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties jmsProvider="MyJmsProvider">
      <property name="java.naming.provider.url" value="iiop://myhost:2000"/>
    </setProperties>
  </target>
</project>

Parameter: mailSession (Mail Session)
Description Name of Mail Session for which properties will be set. Example:
<project name="MyMailSession">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties mailSession="MyMailSession">
      <property name="mail.host" value="mail.example.com"/>
    </setProperties>
  </target>
</project>

Parameter: merge (Merge)
Description If true, the properties included inside the setProperties element will be merged with existing properties stored in the Repository. Any property defined within the setProperties element will take precedence over a property with the same name defined in the existing properties file in the Repository.
Default Value true
Legal Values false, true

Parameter: messageListener (JCA Message Listener)
Description Name of JCA Message Listener for which properties will be set. Example:
<project name="MyMessageListener">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties messageListener="MyMessageListener">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: messageListenerType (JCA Message Listener Type)
Description Name of JCA Message Listener Type for which properties will be set. Example:
<project name="MyMessageListenerType">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties messageListenerType="MyMessageListenerType">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: messageQueue (JMS Message Queue)
Description Name of JMS Message Queue for which properties will be set. Example:
<project name="MyMessageQueue">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties messageQueue="MyMessageQueue">
      <property name="maximumMessagesInMemory" value="100"/>
    </setProperties>
  </target>
</project>

Parameter: messageTopic (JMS Message Topic)
Description Name of JMS Message Topic for which properties will be set. Example:
<project name="MyMessageTopic">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties messageTopic="MyMessageTopic">
      <property name="maximumMessagesInMemory" value="100"/>
    </setProperties>
  </target>
</project>

Parameter: package (Package)
Description Name of package for which properties will be set. The name should be in one of the following forms:
  • ejb.components.mypackage - for a deployed EJB module.
  • web.components.mypackage - for a deployed web module.
  • MyPackage - for a CORBA package.

Parameter: queueConnectionFactory (JMS Queue Connection Factory)
Description Name of JMS Queue Connection Factory for which properties will be set. Example:
<project name="MyQueueConnectionFactory">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties queueConnectionFactory="MyQueueConnectionFactory">
      <property name="receiveBatchSize" value="100"/>
    </setProperties>
  </target>
</project>

Parameter: resourceAdapter (JCA Resource Adapter)
Description Name of JCA Resource Adapter for which properties will be set. Example:
<project name="MyResourceAdapter">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties resourceAdapter="MyResourceAdapter">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: restService (REST Service)
Description Name of REST Service for which properties will be set. Example:
<project name="MyRestService">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties restService="MyRestService">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: scheduledTask (Scheduled Task)
Description Name of Scheduled Task for which properties will be set. Example:
<project name="MyScheduledTask">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties scheduledTask="MyScheduledTask">
      <property name="taskAction" value="runComponentMethod"/>
      <property name="componentMethod" value="ejb.components.example.MyCompLocal.myTask"/>
      <property name="schedule" value="interval"/>
      <property name="interval" value="30"/>
    </setProperties>
  </target>
</project>

Parameter: securityDomain (Security Domain)
Description Name of Security Domain for which properties will be set. Example:
<project name="MySecurityDomain">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties securityDomain="MySecurityDomain">
      <property name="loginMethod" value="ftp"/>
      <property name="ftpHostName" value="my-ftp-host"/>
    </setProperties>
  </target>
</project>

Parameter: securityProfile (Security Profile)
Description Name of Security Profile for which properties will be set. Example:
<project name="MySecurityProfile">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties securityProfile="MySecurityProfile">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: serverBranch (Server Branch)
Description Specifies that the defined properties should be in a private Repository branch accessible only to the specified server. Example:
<project name="my-data-sources">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties dataSource="default" serverBranch="server1">
      <property name="databaseType" value="Sybase_ASA"/>
      <property name="serverName" value="db-host1"/>
      <property name="portNumber" value="2638"/>
    </setProperties>
    <setProperties dataSource="default" serverBranch="server2">
      <property name="databaseType" value="Sybase_ASE"/>
      <property name="serverName" value="db-host2"/>
      <property name="portNumber" value="5000"/>
    </setProperties>
  </target>
</project>
        

Parameter: serviceComponent (Service Component)
Description Name of Service Component for which properties will be set. Example:
<project name="MyServiceComponent">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties serviceComponent="MyServiceComponent">
      <property name="component" value="com.acme.bank.BankService"/>
    </setProperties>
  </target>
</project>

Parameter: socketListener (Socket Listener)
Description Name of Socket Listener for which properties will be set. Example:
<project name="MySocketListener">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties socketListener="MySocketListener">
      <property name="jost" value="myhost"/>
      <property name="port" value="12000"/>
      <property name="protocol" value="iiop"/>
    </setProperties>
  </target>
</project>

Parameter: storedProcedure (Stored Procedure)
Description Name of Stored Procedure for which properties will be set. Example:
<project name="MyStoredProcedure">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties storedProcedure="MyStoredProcedure">
      <property name="..." value="..."/>
    </setProperties>
  </target>
</project>

Parameter: threadMonitor (Thread Monitor)
Description Name of Thread Monitor for which properties will be set. Example:
<project name="MyThreadMonitor">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties threadMonitor="MyThreadMonitor">
      <property name="maximumActiveThreads" value="20"/>
    </setProperties>
  </target>
</project>

Parameter: topicConnectionFactory (JMS Topic Connection Factory)
Description Name of JMS Topic Connection Factory for which properties will be set. Example:
<project name="MyTopicConnectionFactory">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties topicConnectionFactory="MyTopicConnectionFactory">
      <property name="receiveBatchSize" value="100"/>
    </setProperties>
  </target>
</project>

Parameter: transactionBatch (Transaction Batch)
Description Name of Transaction Batch for which properties will be set. Example:
<project name="MyTransactionBatch">
  <import file="ant-config-tasks.xml"/>
  <target name="configure">
    <setProperties transactionBatch="MyTransactionBatch">
      <property name="maximumBatchSize" value="5"/>
      <property name="maximumBatchWait" value="20"/>
    </setProperties>
  </target>
</project>