tao_idl[.exe] throw specifiers for supported user or system exceptions on operation signatures. This change has been made to bring TAO into line with the most recent versions of the IDL to C++ mapping.
CORBA::Environment parameter generated onto operation signatures has been removed. In OpenFusion TAO 1.5.1 this feature was disabled by default but could be activated by specifying values for the -Ge 1 option to the IDL compiler. This option is no longer accepted by the IDL compiler. This change has been made as all supported platforms for OpenFusion TAO provide adequate C++ native exception support.
-Sc option. This argument suppressed generation of POA tie classes for IDL interfaces. Generation of these classes was enabled by default in OpenFusion TAO 1.5.1.x. As these classes are rarely used this is no longer the default behaviour in OpenFusion TAO 1.6.1. Users who need to generate POA tie classes should supply the -GT to tao_idl[.exe] when compiling IDL.
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.
#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.
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.
-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.
orbsvcs/CosPropertyService.idl has been removed. Users should instead include orbsvcs/CosProperty.idl.
ACE_Throughput_Stats has moved from ace/Stats.h to ace/Throughput_Stats.h.
ACE_String_Base < class CHAR > such as strstr, find, rfind that previously returned a value of type ssize_t now return ACE_String_Base::size_type. A value that denotes a position that does not exist is defined as ACE_String_Base::npos. Example usage might be:
...
ACE_CString::size_type i = foo.find ("bar");
if (i != ACE_CString::npos)
{
...
throw keyword should be used instead.
ACE_THROW
ACE_THROW_RETURN
ACE_RE_THROW
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:
ACE_DECLARE_NEW_CORBA_ENV
ACE_ENDTRY
ACE_CHECK_RETURN
ACE_CHECK
ACE_TRY_CHECK
ACE_ENV_ARG_DECL
ACE_ENV_ARG_DECL_WITH_DEFAULTS
ACE_ENV_ARG_DECL_NOT_USED
ACE_ENV_SINGLE_ARG_DECL
ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
ACE_ENV_SINGLE_ARG_DECL_NOT_USED
ACE_ENV_ARG_PARAMETER
ACE_ENV_SINGLE_ARG_PARAMETER
ACE_TRY - Use C++ try instead.
ACE_TRY_NEW_ENV - Use C++ try instead.
ACE_CATCH - Use C++ catch (const <exception> & ex) instead.
ACE_CATCHANY - Use C++ catch (const CORBA::Exception & ex) instead.
ACE_CATCHALL - Use C++ catch (...) instead.
ACE_ANY_EXCEPTION - Previously it was a name of a reference to an exception that was caught by ACE_CATCHANY (see above for replacement).
ACE_PRINT_EXCEPTION - Use ::CORBA::Exception::_tao_print_exception (const char *, FILE *f = stdout) const instead.
ACE_TRY_NEW_ENV - Use C++ try instead.
ACE_CATCH - Use C++ catch (<exception> & ex) instead.
ACE_CATCHANY - Use C++ catch (CORBA::Exception & ex) instead.
ACE_CATCHALL - Use C++ catch (...) instead.
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.
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;
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.