--------------------------------
TAO 1.1.19 patch for CorbaScript
--------------------------------

The following patch must be applied to TAO 1.1.19 in order
to correct a bug when inserting a nil object reference
into a DynamicAny::DynAny (i.e. insert_reference operation)
and to correctly run the Naming Service CorbaScript demonstration.

In the directory ACE_wrappers/TAO/tao/DynamicAny:

diff DynCommon.cpp.orig DynCommon.cpp
453a454,458
>         // From Philippe.Merle@lifl.fr
>         // Must check if this is not a nil object reference before using it
>         // as inserting a nil reference is allowed.
>         if (!CORBA::is_nil(value))
>         {
467a473
>         }

----------------------------------
TAO 1.1.17 patches for CorbaScript
----------------------------------

The following patches must be applied to TAO 1.1.17
in order to correct bugs around the DynAny initialization
and to correctly run CorbaScript demonstrations.

In the directory ACE_wrappers/TAO/tao/DynamicAny:

unix> diff DynAny_i.cpp.orig DynAny_i.cpp
74a75
>       break;
75a77,78
>       this->any_ = CORBA::Any(CORBA::_tc_void);
>       // Else the TypeCode of any_ is CORBA::_tc_null
126c129,130
<       this->any_ <<= CORBA::Object::_nil ();
---
>       this->any_ = CORBA::Any(tc);
>       // Else the TypeCode of any_ is CORBA::_tc_Object and not the given tc

unix> diff DynArray_i.cpp.orig DynArray_i.cpp
114c114
<   CORBA::TypeCode_var elemtype = tc->content_type (ACE_TRY_ENV);
---
>   CORBA::TypeCode_var elemtype = this->get_element_type (ACE_TRY_ENV);

unix> diff DynStruct_i.cpp.orig DynStruct_i.cpp
70a71,81
>       // If we have an exception type, unmarshal the repository ID.
>       CORBA::TCKind kind = TAO_DynAnyFactory::unalias (this->type_.in (),
>                                                   ACE_TRY_ENV);
>       ACE_CHECK;
>
>       if (kind == CORBA::tk_except)
>         {
>           CORBA::String_var str;
>           cdr >> str.out();
>         }
>

--------------------------------
About TAO release 1.1.17 support
--------------------------------

CorbaScript supports the TAO release 1.1.17.
This is not anymore required to use the ORBacus's Interface Repository
as TAO 1.1.17 provides its own Interface Repository.

Warning releases between 1.1.1 and 1.1.16 are not supported.

-------------------------------------------
Why is the TAO 1.1.1 release not supported?
-------------------------------------------

Before the 1.1.1 release, TAO integrated the IFR 2.3 stubs API then
CorbaScript can be compiled on TAO and use at runtime the ORBacus IFR
implementation (because TAO did not provide its own IFR implementation).

Now TAO 1.1.1 provides the IFR 3.0 stubs API (described in the CCM
specification) but there is no implementation of this new IFR specification
both in TAO or in any other ORB ;-(

Then, I could do changes in CorbaScript to compile on TAO 1.1.1
but at runtime CorbaScript can not find an IFR 3.0 server.
So, I could not test if CorbaScript works well on top of TAO 1.1.1.

So, the only solution that I could propose to you is to compile
CorbaScript on top of TAO 1.1.

When TAO 1.1.x will integrate an implementation of the IFR 3.0
API (and a way to feed the IFR3, ie an IDL3 to IFR3 compiler) then I could
port CorbaScript on top of TAO 1.1.x and fully test it.

------------------------------------
Compiling CorbaScript on top of TAO.
------------------------------------

CorbaScript can be compiled and run on top of TAO: Always use the lastest 
supported TAO release (see doc/index.html).

With CorbaScript, there is no need for stubs/skeletons generation:
the OMG IDL information is obtained at runtime from the Interface Repository.
However, you need to load IDL files into the Interface Repository.

By default, the TAO library doesn't include Interface Repository stubs,
then you need to compile the TAO library with these stubs.

On Unix systems, you must do:

  unix> cd $TAO_ROOT/tao
  unix> make clean
  unix> make exceptions=1 interface_repo=1 __your_options__

On Windows systems, you must:
* uncomment the line 504 of the ACE_wrappers/TAO/tao/orbconf.h file
  to define the use of the IFR, i.e.
  #define TAO_HAS_INTERFACE_REPOSITORY 1
* patch the line 394 of ACE_wrappers/TAO/tao/Exception.h file
  to export the CORBA_ExceptionList class, i.e.
  class TAO_Export CORBA_ExceptionList
* rebuild the TAO DLL.

As TAO doesn't currently provide an Interface Repository and its associated
loader (the IDL to IFR compiler), we advise to use the ORBacus's IFR and
its loader.

On Unix systems:
----------------

To obtain the two needed ORBacus tools, you need to build the ORBacus 3.x
for C++ product:
* download the ORBacus 3.x for C++ product from http://www.ooc.com/,
* uncompress it,
* read carefully all README files, because some platforms need special options,
* start the 'runconfig' script to configurate it,
* select your environment settings (OS, C++ compiler, compilation preferences),
* make it.

After that, you only need to keep:
* the 'irserv' binary which is the Interface Repository server,
* the 'irfeed' and 'idlcpp' binaries which are the IDL to IFR compiler/loader.
* the 'irdel' binary to remove IDL definitions from the Interface Repository.
* the 'libJTC.so' library if you have compiled ORBacus in multithreaded mode.
* the 'libIDL.so' and 'libOB.so' libraries if you have compiled ORBacus
  in shared libraries mode.
By keeping them, we would like to say "copy them into another directory".
So when you compile CorbaScript, you must indicate this directory as extra
binary and library paths.

After that, you could remove the ORBacus product if needed.

On Windows systems:
-------------------

To obtain these two ORBacus tools, you need to build the ORBacus 3.x
for C++ product:
* download the ORBacus 3.x for C++ product from http://www.ooc.com/,
* uncompress it,
* read carefully the INSTALL.WINDOWS file,
* configurate the config/Make.rules.mak file correctly,
* make it.

After that, you only need to keep:
* the 'irserv.exe' binary which is the Interface Repository server,
* the 'irfeed.exe' and 'idlcpp.exe' binaries which are the IDL to IFR compiler/loader.
* the 'irdel.exe' binary to remove IDL definitions from the Interface Repository.
* the 'JTC.dll' library if you have compiled ORBacus in multithreaded mode.
* the 'IDL.dll' and 'OB.dll' libraries if you have compiled ORBacus
  in dynamic shared libraries mode.
By keeping them, we would like to say "copy them into another directory".

After that, you could remove the ORBacus product if needed.

-----------------------------------
Running CorbaScript on TAO/Windows.
-----------------------------------

Running the CorbaScript engine and demonstrations need the ORBacus's Interface Repository.
DON'T FORGET to put the directory containing these programs into your PATH environment variable.

---------------
Known problems.
---------------

* marshaling/unmarshaling of OMG IDL Unions.

* polling deferred requests (only on TAO 1.0.11 and 1.0.12).
