Back to Main PageBack

OpenFusion TAO 1.6 Upgrade Information

Users upgrading from OpenFusion TAO 1.5.1.x should be aware of the following changes.

Changes to the IDL Compiler - tao_idl[.exe]

Changes to the ORB Core

The TAO_DiffServPolicy Library

From OpenFusion TAO 1.6.1 the ability to set differential service codepoint information in IP headers has been separated out from the RT CORBA library. Users can now use this capability independently. See RFC 2474 for information about Differentiated Services Code Points and the directory TAO/tests/DiffServ contained within the file $TAO_ROOT/src/src.tar.gz for some example code showing how these can be set by means of a CORBA::Policy. This is a proprietary TAO feature. Use of this feature requires that the libTAO_DiffservPolicy.so / TAO_DiffServePolicy.lib be linked with application code.

The TAO_EndpointPolicy Library

Newly introduced in OpenFusion TAO 1.6.1 this library allows users to programmatically apply a filter to a POA manager to control which of the available IIOP ORB endpoints are included in IORs created from POAs managed by that POA manager. This is a proprietary TAO feature.

The following example code shows how this feature can be used:

  #include "tao/EndpointPolicy/EndpointPolicy.h"
  #include "tao/EndpointPolicy/IIOPEndpointValue_i.h"

...

  PortableServer::POAManager_var pm;
  CORBA::PolicyList policies;
  policies.length (1);

  EndpointPolicy::EndpointList list;
  list.length (1);
  list[0] = new IIOPEndpointValue_i("one_of_my_host_names", 12345);

  try
    {
      CORBA::Any policy_value;
      policy_value <<= list;
      policies[0] = orb->create_policy (EndpointPolicy::ENDPOINT_POLICY_TYPE,
                                                     policy_value);
      pm = poa_manager_factory->create_POAManager ("EndpointPolicyPOAManager",
                                                        policies);

      policies.length(0);

      PortableServer::POA_var new_poa =

        root_poa->create_POA ("POA_with_endpoint_policy",
                                           pm.in (),
                                           policies);
      // Objects then activated on new_poa will have references containing endpoints as per the filter
      // i.e. will not contain any endpoints other than iiop://one_of_my_host_names:12345
    }
  catch (CORBA::Exception &ex)
    {
      ex._tao_print_exception ("Error !!!!!");
      return -1;
    }

Users wishing to utilise this feature should link the library libTAO_EndpointPolicy.so / TAO_EndpointPolicy.lib.

The TAO Transport Current Mechanism

From OpenFusion TAO version 1.6.1 a new proprietary extension is available to allow users to access details of the underlying connected Transport being used for CORBA requests. The TAO::Transport::Current can be obtained by resolving initial references for "TAO::Transport::Current". This object will provide basic information regarding the underlying connection.

Since specific Transports may have very different characteristics, this simple generic implementation for Transport::Current is insufficient. An additional implementation that is provided is in the TAO_TC_IIOP libarary. This is an IIOP-specific Transport::Current. It extends the generic Current interface with operations providing information about IIOP endpoints, like the host and port in use. It is obtained by resolving initial references for TAO::Transport::IIOP::Current

For details of the operations supported please see the local interface definitions in the IDL files tao/TransportCurrent/TC.idl and tao/TransportCurrent/TC_IIOP.idl in the idl directory of the distribution. See also the directory TAO/tests/TransportCurrent within the distribution source tar for usage examples.

Independent ORB Configuration

In previous versions some configuration setting values were shared amongst all ORBs within an application process. Examples include the value of client wait strategy as set by the service configurator directive -ORBClientConnectionHandler. In OpenFusion TAO 1.6.1 this remains the default behaviour, however ORBs can be instantiated with their own individual service configurator settings by using the ORB_init arguments -ORBGestalt local.

Please see the documentation for the -ORBGestalt option.

Changes to ORB Services

Changes to ACE

Note that ACE is only supported as a base library for the ORB however these notes may be useful to users who have elected to make use of it directly in their code.

  ...
  ACE_CString::size_type i = foo.find ("bar");
  if (i != ACE_CString::npos)
    {
  ...

Deprecated ACE macros

A number of ACE convenience macros have been deprecated in this release, primarily in the area of portable exception handling. These are still supported currently but will be removed in a future release. These should no longer be utilised by users when writing application code.

These macros used to raise exceptions are now deprecated. The native C++ throw keyword should be used instead.

The ACE_THROW_SPEC ((X)) macro, previously used to define permitted exceptions on an operation can also be replaced by throw (X) however not that a throw specification is no longer required on CORBA operation implementations following the IDL compiler changes mentioned in the previous section.

The following macros now have no effect on any supported platform and can be safely removed completely from user code:

The following ACE macros, used in the handling of exception conditions that may be raised, have also been deprecated and should be replaced with their C++ equivalent code:

The ACE_LIB_TEXT macro, used to provide portability for string literals across platforms regardless of wide character support, has been deprecated and can be replaced by ACE_TEXT if required.

The following example illustrates code before and after the deprecated ACE exception macro removal.

Before:


ACE_DECLARE_NEW_CORBA_ENV;
ACE_TRY
    {
      foo->call1 (ACE_ENV_SINGLE_ARG_PARAMETER);
      ACE_TRY_CHECK;
      foo->call2 (bar,
                      ACE_ENV_ARG_PARAMETER);
      ACE_TRY_CHECK;
    }
  ACE_CATCH (My::Exception, exc)
    {
    }
  ACE_CATCHANY
    {
      ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
                           ACE_LIB_TEXT ("CORBA Exception:\n"));
    }
  ACE_CATCHALL
    {
      ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("Unknown exception encountered.\n")));
      ACE_RE_THROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;

After:

  try
    {
      foo->call1 ();
      foo->call2 (bar);
    }
  catch (const My::Exception& exc)
    {
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("CORBA Exception:\n");
    }
  catch (...)
    {
      ACE_ERROR ((LM_ERROR,  "Unknown exception encountered.\n"));
      throw;
    }

For detailed information on all changes made between 1.5.1 and 1.6.1 in the community version of TAO, please consult the ChangeLog and NEWS file. Note that these files may include details of features already present in OpenFusion TAO 1.5.1.


PrismTech TOP
Top