Modified Port Changes Not Deployed

Problem: Modified data source port information is not reflected when you deploy mobile business objects (MBOs).

For example:
  1. Create a data source named DB1 that uses port 4100.
  2. Create an MBO that references this data source.
  3. Deploy the MBO to Unwired Server.
  4. In Enterprise Explorer, change port information for the connection profile to 41007.
  5. Redeploy the MBO to Unwired Server.

During the second deployment, the endpoint port remains the original value, 4100, rather than 41007.

Solution 1:

  1. Create an XML configuration file that contains the information to be modified, as this chgEndpoint.xml file illustrates:
    <?xml version="1.0" ?> 
    <project name="DDSOPS1" default="configure">
    
    <import file="ant-config-tasks.xml" />
    <import file="default-properties.xml" />
    <target name="configure">
    <setProperties dataSource="DDSOPS1" merge="false">
    <property name="databaseType" value="Sybase_ASE" />
    <property name="user" value="sup_cv" />
    <property name="password" value="xyz" />
    <property name="portNumber" value="41007" />
    <property name="serverName" value="ddsops1" />
    <property name="databaseName" value="tsbde" />
    </setProperties>
    </target>
    </project>
  2. Save the XML file in the <UnwiredPlatform-InstallDir>\UnwiredPlatform\Servers\UnwiredServer\config directory.
  3. Run configure.bat using the XML file as an argument from the command line in <UnwiredPlatform-InstallDir>\UnwiredPlatform\Servers\UnwiredServer\bin. For example:
    Configure chgEndpoint.xml

The port information is updated and reflected during deployment.

Note: The basic XML Ant scripts are the same for all data source types. The properties vary depending on endpoint types.

For each JDBC data source, the database vendor's specific JDBC driver may expose its own connection properties. You can specify those properties in an XML configuration file by prefixing the property name with "jdbc:".

For example, the Sybase jConnect™ for JDBC™ driver contains an IS_CLOSED_TEST connection property that you can set. This property can be a SQL query that jConnect sends to the database when the application calls Connection.isClosed(), or "select 1". If the query successfully executes, the connection remains open, and returns false. The jConnect driver also has an "INTERNAL" setting that enables jConnect to remember the state of the connection the last time it was used. This setting prevents the database from being pinged multiple times, especially in an appServer context where the isClosed() check is performed each time a connection is checked into or out of a connection pool. To set the "INTERNAL" property from the Ant script, add:

<property name="jdbc:IS_CLOSED_TEST" value="INTERNAL"/>

See your JDBC driver documentation for information about driver specific connection properties.

Solution 2:
  1. In the Unwired Server installation directory, change to this folder:

    <UnwiredPlatform-InstallDir>\UnwiredPlatform\Servers\UnwiredServer\Repository\Instance\com\sybase\djc\sql\DataSource\

  2. Open the .properties file and change the port number.
  3. Redeploy the MBO package from Sybase Unwired WorkSpace, using the same Unwired Server connection when prompted in the deployment wizard.
Related tasks
Cannot Ping Unwired Server
Cannot Access sampledb
Related reference
MS SQL Server Connection Errors
ODBC Driver Errors
Mobile Business Object Errors
Preview Errors in Unwired WorkSpace
Preview Errors for a Database Mobile Business Object
Preview Errors for a Web Service Mobile Business Object
Compiler Errors When Deploying Device Applications
Deploying to Unwired Server Fails
Deploying to Unwired Server in a Cluster Fails